Skip to content

Commit

Permalink
ipython doc
Browse files Browse the repository at this point in the history
  • Loading branch information
aadya940 committed Aug 7, 2024
1 parent e015dd4 commit e0868c1
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 59 deletions.
43 changes: 18 additions & 25 deletions docs/source/demo.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Library Examples - ChainoPy Vs. PyDTMC"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand All @@ -18,7 +25,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Initialize a Dummy TPM for Chainopy Implementation and PyDTMC"
"### Initialization "
]
},
{
Expand Down Expand Up @@ -133,7 +140,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Now let's compare the Runtime"
"### Runtime Comparision"
]
},
{
Expand Down Expand Up @@ -196,14 +203,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### ChainoPy is approx 5x Faster than PyDTMC"
"#### ChainoPy is approx 5x Faster than PyDTMC"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Now let's run a simulation using my implementation"
"### Simulation"
]
},
{
Expand Down Expand Up @@ -292,7 +299,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### You can also use my Implementation to calculate distribution of the chain after `n` steps"
"### N-Step Distribution"
]
},
{
Expand Down Expand Up @@ -321,7 +328,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### You can also save the Model as a JSON file "
"### Model Saving"
]
},
{
Expand All @@ -337,7 +344,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### If the matrix is TPM is sparse, with 40% or more elements equal/less than 0.0001, it will save the matrix in sparse format"
"### Sparisty & Model Saving"
]
},
{
Expand Down Expand Up @@ -396,7 +403,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### You can also load the saved models as a new MarkovChain Object"
"### Load Saved Models"
]
},
{
Expand Down Expand Up @@ -464,7 +471,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### You can also load a model containing TPM as a Sparse COO Matrix"
"### Load Sparse Models"
]
},
{
Expand Down Expand Up @@ -532,7 +539,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Now we'll look at \"How you can transform a Markov Chain to an equivalent Neural Network using ChainoPy's MarkovChainNeuralNetwork Class "
"### Transform a Markov Chain to a Neural Network "
]
},
{
Expand Down Expand Up @@ -4685,14 +4692,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### NOTE: A better Accuracy can be achieved using Complex Hyperparameter - Search Methods"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Now let's see How can we use this library for Stock Predictions using Markov Switching Models"
"### Stock Predictions using Markov Switching Models"
]
},
{
Expand Down Expand Up @@ -4906,13 +4906,6 @@
"ax.set_title(\"Data and Prediction\")\n",
"ax.legend()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
18 changes: 9 additions & 9 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@ Welcome to Chainopy's documentation!

_autosummary

Examples
--------

.. toctree::
:maxdepth: 2
:caption: Notebooks

examples/demo.ipynb

Autosummary
-----------

Expand All @@ -25,6 +16,15 @@ Autosummary
chainopy.markov_switching
chainopy.nn

Examples
--------

.. toctree::
:maxdepth: 2
:caption: Notebooks

demo.ipynb

Readme
------

Expand Down
43 changes: 18 additions & 25 deletions examples/demo.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Library Examples - ChainoPy Vs. PyDTMC"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand All @@ -18,7 +25,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Initialize a Dummy TPM for Chainopy Implementation and PyDTMC"
"### Initialization "
]
},
{
Expand Down Expand Up @@ -133,7 +140,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Now let's compare the Runtime"
"### Runtime Comparision"
]
},
{
Expand Down Expand Up @@ -196,14 +203,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### ChainoPy is approx 5x Faster than PyDTMC"
"#### ChainoPy is approx 5x Faster than PyDTMC"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Now let's run a simulation using my implementation"
"### Simulation"
]
},
{
Expand Down Expand Up @@ -292,7 +299,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### You can also use my Implementation to calculate distribution of the chain after `n` steps"
"### N-Step Distribution"
]
},
{
Expand Down Expand Up @@ -321,7 +328,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### You can also save the Model as a JSON file "
"### Model Saving"
]
},
{
Expand All @@ -337,7 +344,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### If the matrix is TPM is sparse, with 40% or more elements equal/less than 0.0001, it will save the matrix in sparse format"
"### Sparisty & Model Saving"
]
},
{
Expand Down Expand Up @@ -396,7 +403,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### You can also load the saved models as a new MarkovChain Object"
"### Load Saved Models"
]
},
{
Expand Down Expand Up @@ -464,7 +471,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### You can also load a model containing TPM as a Sparse COO Matrix"
"### Load Sparse Models"
]
},
{
Expand Down Expand Up @@ -532,7 +539,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Now we'll look at \"How you can transform a Markov Chain to an equivalent Neural Network using ChainoPy's MarkovChainNeuralNetwork Class "
"### Transform a Markov Chain to a Neural Network "
]
},
{
Expand Down Expand Up @@ -4685,14 +4692,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### NOTE: A better Accuracy can be achieved using Complex Hyperparameter - Search Methods"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Now let's see How can we use this library for Stock Predictions using Markov Switching Models"
"### Stock Predictions using Markov Switching Models"
]
},
{
Expand Down Expand Up @@ -4906,13 +4906,6 @@
"ax.set_title(\"Data and Prediction\")\n",
"ax.legend()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit e0868c1

Please sign in to comment.