Skip to content

Commit

Permalink
Fix typing inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
aadya940 committed Aug 12, 2024
1 parent 1d8726b commit 8fe5f45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions JOSS/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ bibliography: paper.bib
Modeling time series data, such as stock prices and text sequences, is effectively achieved using Markov Chains. ChainoPy facilitates the modeling of time series data with Markov Chains and Markov Switching Models, optimizing for computational efficiency in terms of speed and memory usage. Additionally, ChainoPy enables the integration of probabilistic models like Markov Chains with Neural Networks, traditionally considered deterministic, through the MarkovChainNeuralNetwork class. This hybrid approach leverages the strengths of both probabilistic and neural network methodologies.

### Statement of Need
There are limitations in current Markov Chain packages like PyDTMC [@pydtmc], simple-markov [@simple-markov], mchmm [@mchmm] that rely solely on NumPy [@harris2020array] and Python for implementation. Markov Chains often require iterative convergence-based algorithms [@rosenthal1995convergence], where Python's dynamic typing, Global Interpreter Lock (GIL), and garbage collection can hinder potential performance improvements like parallelism. To address these issues, we enhance our library with extensions like Cython for efficient algorithm implementation. Additionally, we introduce a Markov Chain Neural Network [@awiszus2018markov] that simulates given Markov Chains while preserving statistical properties from the training data. This approach eliminates the need for post-processing steps such as sampling from the outcome distribution while giving neural networks stochastic properties rather than deterministic behavior. Finally, we implement the famous Markov Switching Models [@hamilton2010regime] which are one of the fundamental and widely used models in applications such as Stock Market price prediction. ChainoPy enables new workflows through its advanced algorithms, such as Markov Chain Neural Networks and Markov Switching Models, which are not available in pyDTMC. These capabilities, combined with significant performance improvements in both fast and slow functions, provide added value for complex stochastic analysis tasks.
There are limitations in current Markov Chain packages like PyDTMC [@pydtmc], simple-markov [@simple-markov], mchmm [@mchmm] that rely solely on NumPy [@harris2020array] and Python for implementation. Markov Chains often require iterative convergence-based algorithms [@rosenthal1995convergence], where Python's dynamic typing, Global Interpreter Lock (GIL), and garbage collection can hinder potential performance improvements like parallelism. To address these issues, we enhance our library with extensions like Cython for efficient algorithm implementation. Additionally, we introduce a Markov Chain Neural Network [@awiszus2018markov] that simulates given Markov Chains while preserving statistical properties from the training data. This approach eliminates the need for post-processing steps such as sampling from the outcome distribution while giving neural networks stochastic properties rather than deterministic behavior. Finally, we implement the famous Markov Switching Models [@hamilton2010regime] which are one of the fundamental and widely used models in applications such as Stock Market price prediction. ChainoPy enables new workflows through its advanced algorithms, such as Markov Chain Neural Networks and Markov Switching Models, which are not available in PyDTMC. These capabilities, combined with significant performance improvements in both fast and slow functions, provide added value for complex stochastic analysis tasks.

### Implementation

We implement three public classes `MarkovChain`, `MarkovChainNeuralNetwork` and `MarkovSwitchingModel` that contain core functionalities of the package. Performance intensive functions for the `MarkovChain` class are implemented in the `_backend` directory where a custom cython [@behnel2010cython] backend is implemented circumventing drawbacks of python like the GIL, dynamic typing etc. The `MarkovChain` class implements various functionalities for discrete-time Markov chains. It provides methods for fitting the transition matrix from data, simulating the chain, calculating properties. It also supports visualization for markov chains.
We implement three public classes `MarkovChain`, `MarkovChainNeuralNetwork` and `MarkovSwitchingModel` that contain core functionalities of the package. Performance intensive functions for the `MarkovChain` class are implemented in the `_backend` directory where a custom Cython [@behnel2010cython] backend is implemented circumventing drawbacks of Python like the GIL, dynamic typing etc. The `MarkovChain` class implements various functionalities for discrete-time Markov chains. It provides methods for fitting the transition matrix from data, simulating the chain, calculating properties. It also supports visualization for Markov chains.

We do the following key optimizations:

Expand Down

0 comments on commit 8fe5f45

Please sign in to comment.