Skip to content

Commit

Permalink
expose _markov_chain, _nn, _markov_switching through the public API
Browse files Browse the repository at this point in the history
  • Loading branch information
aadya940 committed Jul 20, 2024
1 parent 87bcde7 commit 983e6de
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions chainopy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from ._markov_chain import MarkovChain
from ._nn import MarkovChainNeuralNetwork, divergance_analysis
from ._markov_switching import MarkovSwitchingModel
from .markov_chain import MarkovChain
from .nn import MarkovChainNeuralNetwork, divergance_analysis
from .markov_switching import MarkovSwitchingModel

__all__ = [
"MarkovChain",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import List, Tuple
from statsmodels.tsa.ar_model import AutoReg

from ._markov_chain import MarkovChain
from .markov_chain import MarkovChain


class MarkovSwitchingModel:
Expand Down
2 changes: 1 addition & 1 deletion chainopy/_nn.py → chainopy/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import warnings
import random

from ._markov_chain import MarkovChain
from .markov_chain import MarkovChain
from ._backend import _learn_matrix


Expand Down
2 changes: 1 addition & 1 deletion chainopy/tests/test_markovchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np
import os

from .._markov_chain import MarkovChain
from ..markov_chain import MarkovChain


def test_init():
Expand Down
4 changes: 2 additions & 2 deletions chainopy/tests/test_nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import numpy as np
import torch

from .._nn import MarkovChainNeuralNetwork, divergance_analysis
from .._markov_chain import MarkovChain
from ..nn import MarkovChainNeuralNetwork, divergance_analysis
from ..markov_chain import MarkovChain


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion chainopy/tests/test_switching.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
import random

from .._markov_switching import MarkovSwitchingModel
from ..markov_switching import MarkovSwitchingModel


def test_model_fit():
Expand Down
4 changes: 3 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ Autosummary
.. autosummary::
:toctree: _autosummary

chainopy
chainopy.markov_chain
chainopy.markov_switching
chainopy.nn

Readme
------
Expand Down

0 comments on commit 983e6de

Please sign in to comment.