Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
aadya940 committed Feb 14, 2024
1 parent 5a4b2a2 commit f0c88c7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion chainopy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"MarkovChain",
"MarkovChainNeuralNetwork",
"divergance_analysis",
]
]
6 changes: 4 additions & 2 deletions chainopy/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MarkovChainNeuralNetwork(nn.Module):
num_layers : int
Number of layers in the neural network.
Raises:
ValueError: If markov_chain is not of type MarkovChain.
Expand Down Expand Up @@ -269,7 +269,9 @@ def _generate_fit_string():
_observed_seq_list = nn.simulate_random_walk(
random.choice(mc.states), len(mc.states) * 200
)
_estimated_tpm = _learn_matrix.learn_matrix_cython(_observed_seq_list, epsilon=_epsilon)
_estimated_tpm = _learn_matrix.learn_matrix_cython(
_observed_seq_list, epsilon=_epsilon
)
return _estimated_tpm

_est_tpm = _generate_fit_string().flatten()
Expand Down
2 changes: 1 addition & 1 deletion chainopy/test_nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@pytest.fixture
def mock_markov_chain():
tpm = np.array([[0.5, 0.5], [0.3, 0.7]])
states = ['Rain', 'No-Rain']
states = ["Rain", "No-Rain"]
mc = MarkovChain(tpm, states)
return mc

Expand Down

0 comments on commit f0c88c7

Please sign in to comment.