Skip to content

Commit 546ccd6

Browse files
committed
doc
1 parent 2268139 commit 546ccd6

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

chainopy/markov_switching.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,10 @@ def fit(self, ts_data, regime_sequence, lags=1):
4848
4949
Args:
5050
-----
51-
ts_data: ndarray,
51+
ts_data: ndarray
5252
1D Target values at different timepoints
5353
regime_sequence: list
54-
Training data consisting of Regimes in chronological
55-
Order.
54+
Training data consisting of Regimes in chronological Order.
5655
lags: int,
5756
Time lags to consider during autoregression
5857
"""
@@ -70,8 +69,7 @@ def _learn_regime_proba(self, regime_sequence: str) -> np.ndarray:
7069
Args:
7170
-----
7271
regime_sequence: list,
73-
Training data consisting of Regimes in chronological
74-
Order.
72+
Training data consisting of Regimes in chronological Order.
7573
"""
7674
__regime_str = ""
7775
for i, regime in enumerate(regime_sequence):
@@ -119,7 +117,7 @@ def predict(
119117
120118
Returns:
121119
--------
122-
Tuple[np.ndarray, np.ndarray]
120+
Tuple[np.ndarray, np.ndarray]:
123121
Tuple containing the array of predicted target values and the predicted regime sequence.
124122
"""
125123
predictions = np.zeros(steps, dtype=np.float32)

chainopy/nn.py

-3
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@ class MarkovChainNeuralNetwork(nn.Module):
2121
num_layers : int
2222
Number of layers in the neural network.
2323
24-
2524
Raises:
2625
-------
2726
ValueError: If markov_chain is not of type MarkovChain.
28-
2927
"""
3028

3129
def __init__(self, markov_chain, num_layers):
@@ -167,7 +165,6 @@ def train_model(
167165
Patience parameter for learning rate scheduler (default is 500).
168166
factor : float, optional
169167
Factor by which the learning rate will be reduced (default is 0.5).
170-
171168
"""
172169

173170
self.optimizer = optim.SGD(

0 commit comments

Comments
 (0)