PyDTMC 9.0.0__tar.gz → 10.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pydtmc-9.0.0 → pydtmc-10.1.0}/MANIFEST.in +1 -0
- pydtmc-10.1.0/PKG-INFO +262 -0
- pydtmc-10.1.0/PyDTMC.egg-info/PKG-INFO +262 -0
- pydtmc-10.1.0/PyDTMC.egg-info/SOURCES.txt +109 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/PyDTMC.egg-info/requires.txt +3 -2
- pydtmc-10.1.0/README.md +193 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/docs/source/_static/css/style.css +17 -20
- pydtmc-10.1.0/docs/source/advanced_topics/absorbing_markov_chains.rst +146 -0
- pydtmc-10.1.0/docs/source/advanced_topics/assessments.rst +214 -0
- pydtmc-10.1.0/docs/source/advanced_topics/chain_comparison.rst +155 -0
- pydtmc-10.1.0/docs/source/advanced_topics/hidden_markov_models.rst +159 -0
- pydtmc-10.1.0/docs/source/advanced_topics/hitting_passage.rst +149 -0
- pydtmc-10.1.0/docs/source/advanced_topics/index.rst +21 -0
- pydtmc-10.1.0/docs/source/advanced_topics/long_term_behavior.rst +138 -0
- pydtmc-10.1.0/docs/source/advanced_topics/markov_chain_analysis.rst +146 -0
- pydtmc-10.1.0/docs/source/advanced_topics/mixing_convergence.rst +203 -0
- pydtmc-10.1.0/docs/source/advanced_topics/reduction_aggregation.rst +139 -0
- pydtmc-10.1.0/docs/source/advanced_topics/simulation_empirical_analysis.rst +132 -0
- pydtmc-10.1.0/docs/source/advanced_topics/transition_paths_analysis.rst +131 -0
- pydtmc-10.1.0/docs/source/advanced_topics/visualization.rst +152 -0
- {pydtmc-9.0.0/docs/source → pydtmc-10.1.0/docs/source/api_reference}/custom_exceptions.rst +5 -5
- pydtmc-10.1.0/docs/source/api_reference/hidden_markov_model.rst +15 -0
- pydtmc-10.1.0/docs/source/api_reference/hidden_markov_model_methods_instance.rst +28 -0
- pydtmc-10.1.0/docs/source/api_reference/hidden_markov_model_methods_static.rst +15 -0
- pydtmc-10.1.0/docs/source/api_reference/hidden_markov_model_properties.rst +20 -0
- pydtmc-10.1.0/docs/source/api_reference/index.rst +15 -0
- pydtmc-10.1.0/docs/source/api_reference/markov_chain.rst +14 -0
- pydtmc-10.1.0/docs/source/api_reference/markov_chain_methods_instance.rst +66 -0
- pydtmc-10.1.0/docs/source/api_reference/markov_chain_methods_static.rst +23 -0
- pydtmc-10.1.0/docs/source/api_reference/markov_chain_properties.rst +62 -0
- pydtmc-10.1.0/docs/source/api_reference/other_assessment_functions.rst +14 -0
- pydtmc-10.1.0/docs/source/api_reference/other_comparison_functions.rst +8 -0
- {pydtmc-9.0.0/docs/source → pydtmc-10.1.0/docs/source/api_reference}/other_plotting_functions.rst +4 -1
- {pydtmc-9.0.0 → pydtmc-10.1.0}/docs/source/conf.py +201 -51
- {pydtmc-9.0.0 → pydtmc-10.1.0}/docs/source/genindex.rst +1 -1
- pydtmc-10.1.0/docs/source/getting_started/first_hidden_markov_model.rst +52 -0
- pydtmc-10.1.0/docs/source/getting_started/first_markov_chain.rst +57 -0
- pydtmc-10.1.0/docs/source/getting_started/index.rst +11 -0
- pydtmc-10.1.0/docs/source/getting_started/installation.rst +27 -0
- pydtmc-10.1.0/docs/source/index.rst +17 -0
- pydtmc-10.1.0/pydtmc/__init__.py +76 -0
- pydtmc-10.1.0/pydtmc/_analysis.py +1700 -0
- pydtmc-9.0.0/pydtmc/base_classes.py → pydtmc-10.1.0/pydtmc/_base_classes.py +20 -2
- pydtmc-10.1.0/pydtmc/_constants.py +25 -0
- pydtmc-9.0.0/pydtmc/custom_types.py → pydtmc-10.1.0/pydtmc/_custom_types.py +47 -27
- pydtmc-9.0.0/pydtmc/decorators.py → pydtmc-10.1.0/pydtmc/_decorators.py +96 -8
- pydtmc-10.1.0/pydtmc/_dynamics.py +396 -0
- pydtmc-9.0.0/pydtmc/files_io.py → pydtmc-10.1.0/pydtmc/_files_io.py +4 -4
- pydtmc-10.1.0/pydtmc/_fitting.py +486 -0
- pydtmc-9.0.0/pydtmc/generators.py → pydtmc-10.1.0/pydtmc/_generators.py +877 -503
- pydtmc-10.1.0/pydtmc/_numerical.py +408 -0
- pydtmc-9.0.0/pydtmc/utilities.py → pydtmc-10.1.0/pydtmc/_utilities.py +17 -29
- pydtmc-9.0.0/pydtmc/validation.py → pydtmc-10.1.0/pydtmc/_validation.py +119 -67
- pydtmc-10.1.0/pydtmc/assessments.py +906 -0
- pydtmc-10.1.0/pydtmc/comparisons.py +195 -0
- pydtmc-10.1.0/pydtmc/hidden_markov_model.py +1445 -0
- pydtmc-10.1.0/pydtmc/markov_chain.py +3772 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/pydtmc/plotting.py +289 -201
- pydtmc-10.1.0/pyproject.toml +3 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/setup.cfg +21 -11
- {pydtmc-9.0.0 → pydtmc-10.1.0}/setup.py +2 -13
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/conftest.py +57 -11
- pydtmc-10.1.0/tests/files/file_filled.txt +1 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/fixtures/fixtures_aliases.json +27 -18
- pydtmc-10.1.0/tests/fixtures/fixtures_assessments.json +1054 -0
- pydtmc-10.1.0/tests/fixtures/fixtures_benchmarks.json +4 -0
- pydtmc-10.1.0/tests/fixtures/fixtures_comparisons.json +407 -0
- pydtmc-9.0.0/tests/fixtures/fixtures_simulations.json → pydtmc-10.1.0/tests/fixtures/fixtures_dynamics.json +472 -50
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/fixtures/fixtures_fitting.json +56 -0
- pydtmc-10.1.0/tests/fixtures/fixtures_generators_instance.json +2157 -0
- pydtmc-10.1.0/tests/fixtures/fixtures_generators_static.json +1576 -0
- pydtmc-10.1.0/tests/fixtures/fixtures_hmm.json +3371 -0
- pydtmc-10.1.0/tests/fixtures/fixtures_measures.json +3623 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/fixtures/fixtures_plotting.json +11 -0
- pydtmc-10.1.0/tests/fixtures/fixtures_properties.json +2724 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/fixtures/fixtures_validation.json +213 -79
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/test_aliases.py +32 -2
- pydtmc-10.1.0/tests/test_assessments.py +166 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/test_classification.py +0 -2
- pydtmc-10.1.0/tests/test_comparisons.py +84 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/test_conversions.py +1 -0
- pydtmc-10.1.0/tests/test_decorators.py +349 -0
- pydtmc-9.0.0/tests/test_simulations.py → pydtmc-10.1.0/tests/test_dynamics.py +33 -5
- pydtmc-10.1.0/tests/test_generators_instance.py +276 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/test_generators_static.py +4 -8
- pydtmc-10.1.0/tests/test_hmm.py +595 -0
- pydtmc-10.1.0/tests/test_measures.py +421 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/test_plotting.py +55 -0
- pydtmc-10.1.0/tests/test_properties.py +612 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/test_utilities.py +2 -15
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/test_validation.py +86 -43
- pydtmc-9.0.0/PKG-INFO +0 -349
- pydtmc-9.0.0/PyDTMC.egg-info/PKG-INFO +0 -349
- pydtmc-9.0.0/PyDTMC.egg-info/SOURCES.txt +0 -84
- pydtmc-9.0.0/README.md +0 -284
- pydtmc-9.0.0/docs/source/hidden_markov_model.rst +0 -15
- pydtmc-9.0.0/docs/source/hidden_markov_model_methods_instance.rst +0 -19
- pydtmc-9.0.0/docs/source/hidden_markov_model_methods_static.rst +0 -15
- pydtmc-9.0.0/docs/source/hidden_markov_model_properties.rst +0 -17
- pydtmc-9.0.0/docs/source/index.rst +0 -19
- pydtmc-9.0.0/docs/source/markov_chain.rst +0 -15
- pydtmc-9.0.0/docs/source/markov_chain_methods_instance.rst +0 -50
- pydtmc-9.0.0/docs/source/markov_chain_methods_static.rst +0 -23
- pydtmc-9.0.0/docs/source/markov_chain_properties.rst +0 -50
- pydtmc-9.0.0/docs/source/other_assessment_functions.rst +0 -10
- pydtmc-9.0.0/pydtmc/__init__.py +0 -42
- pydtmc-9.0.0/pydtmc/assessments.py +0 -413
- pydtmc-9.0.0/pydtmc/computations.py +0 -348
- pydtmc-9.0.0/pydtmc/fitting.py +0 -330
- pydtmc-9.0.0/pydtmc/hidden_markov_model.py +0 -973
- pydtmc-9.0.0/pydtmc/markov_chain.py +0 -2766
- pydtmc-9.0.0/pydtmc/measures.py +0 -685
- pydtmc-9.0.0/pydtmc/simulations.py +0 -231
- pydtmc-9.0.0/tests/files/file_noextension +0 -0
- pydtmc-9.0.0/tests/fixtures/fixtures_assessments.json +0 -362
- pydtmc-9.0.0/tests/fixtures/fixtures_benchmarks.json +0 -6
- pydtmc-9.0.0/tests/fixtures/fixtures_generators_instance.json +0 -500
- pydtmc-9.0.0/tests/fixtures/fixtures_generators_static.json +0 -1014
- pydtmc-9.0.0/tests/fixtures/fixtures_hmm.json +0 -1765
- pydtmc-9.0.0/tests/fixtures/fixtures_measures.json +0 -1702
- pydtmc-9.0.0/tests/fixtures/fixtures_properties.json +0 -902
- pydtmc-9.0.0/tests/test_assessments.py +0 -88
- pydtmc-9.0.0/tests/test_generators_instance.py +0 -142
- pydtmc-9.0.0/tests/test_hmm.py +0 -285
- pydtmc-9.0.0/tests/test_measures.py +0 -270
- pydtmc-9.0.0/tests/test_properties.py +0 -367
- {pydtmc-9.0.0 → pydtmc-10.1.0}/LICENSE.md +0 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/PyDTMC.egg-info/dependency_links.txt +0 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/PyDTMC.egg-info/top_level.txt +0 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/data/empty +0 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/docs/Makefile +0 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/docs/build/empty +0 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/docs/make.bat +0 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/docs/source/_templates/empty +0 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/pydtmc/exceptions.py +0 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/requirements.txt +0 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/__init__.py +0 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/benchmarks.py +0 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/files/file_empty.txt +0 -0
- /pydtmc-9.0.0/tests/files/file_filled.txt → /pydtmc-10.1.0/tests/files/file_noext +0 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/fixtures/fixtures_classification.json +0 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/fixtures/fixtures_conversions.json +0 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/fixtures/fixtures_utilities.json +0 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/test_fitting.py +0 -0
- {pydtmc-9.0.0 → pydtmc-10.1.0}/tests/utilities.py +0 -0
pydtmc-10.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: PyDTMC
|
|
3
|
+
Version: 10.1.0
|
|
4
|
+
Summary: Python library for analyzing, simulating, and visualizing discrete-time Markov chains and hidden Markov models.
|
|
5
|
+
Home-page: https://github.com/TommasoBelluzzo/PyDTMC
|
|
6
|
+
Author: Tommaso Belluzzo
|
|
7
|
+
Author-email: tommaso.belluzzo@gmail.com
|
|
8
|
+
Maintainer: Tommaso Belluzzo
|
|
9
|
+
Maintainer-email: tommaso.belluzzo@gmail.com
|
|
10
|
+
License: MIT
|
|
11
|
+
Project-URL: Documentation, https://pydtmc.readthedocs.io/
|
|
12
|
+
Project-URL: Bug Tracker, https://github.com/TommasoBelluzzo/PyDTMC/issues
|
|
13
|
+
Project-URL: Donation, https://www.paypal.com/donate?hosted_button_id=D8LH6DNYN7EN8
|
|
14
|
+
Keywords: markov-chain,markov-chains,hidden-markov-model,hidden-markov-models,markov-model,markov-models,markov-state-model,markov-state-models,mathematics,statistics,probability,stochastic-process,stochastic-processes,scientific-computing,analysis,simulation,simulations,plot,plots,plotting
|
|
15
|
+
Platform: any
|
|
16
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
17
|
+
Classifier: Natural Language :: English
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
25
|
+
Classifier: Intended Audience :: Developers
|
|
26
|
+
Classifier: Intended Audience :: Education
|
|
27
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
28
|
+
Classifier: Intended Audience :: Science/Research
|
|
29
|
+
Classifier: Topic :: Education
|
|
30
|
+
Classifier: Topic :: Scientific/Engineering
|
|
31
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
32
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
33
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
34
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
35
|
+
Classifier: Topic :: Other/Nonlisted Topic
|
|
36
|
+
Requires-Python: >=3.12
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
License-File: LICENSE.md
|
|
39
|
+
Requires-Dist: matplotlib>=3.10
|
|
40
|
+
Requires-Dist: networkx
|
|
41
|
+
Requires-Dist: numpy
|
|
42
|
+
Requires-Dist: scipy
|
|
43
|
+
Provides-Extra: build
|
|
44
|
+
Requires-Dist: build; extra == "build"
|
|
45
|
+
Requires-Dist: setuptools; extra == "build"
|
|
46
|
+
Requires-Dist: wheel; extra == "build"
|
|
47
|
+
Requires-Dist: twine; extra == "build"
|
|
48
|
+
Provides-Extra: docs
|
|
49
|
+
Requires-Dist: docutils; extra == "docs"
|
|
50
|
+
Requires-Dist: typing-extensions; extra == "docs"
|
|
51
|
+
Requires-Dist: sphinx; extra == "docs"
|
|
52
|
+
Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
|
|
53
|
+
Requires-Dist: sphinx-rtd-theme; extra == "docs"
|
|
54
|
+
Provides-Extra: lint
|
|
55
|
+
Requires-Dist: flake8; extra == "lint"
|
|
56
|
+
Requires-Dist: pylint; extra == "lint"
|
|
57
|
+
Provides-Extra: package
|
|
58
|
+
Requires-Dist: defusedxml; extra == "package"
|
|
59
|
+
Requires-Dist: numpydoc; extra == "package"
|
|
60
|
+
Requires-Dist: pandas; extra == "package"
|
|
61
|
+
Requires-Dist: pydot; extra == "package"
|
|
62
|
+
Provides-Extra: tests
|
|
63
|
+
Requires-Dist: coverage; extra == "tests"
|
|
64
|
+
Requires-Dist: pytest; extra == "tests"
|
|
65
|
+
Requires-Dist: pytest-benchmark; extra == "tests"
|
|
66
|
+
Requires-Dist: pytest-cov; extra == "tests"
|
|
67
|
+
Requires-Dist: coveralls; extra == "tests"
|
|
68
|
+
Dynamic: description
|
|
69
|
+
Dynamic: description-content-type
|
|
70
|
+
Dynamic: license-file
|
|
71
|
+
|
|
72
|
+
PyDTMC is a lightweight Python library focused on discrete-time Markov chains and hidden Markov models. It provides a comprehensive set of classes and functions for creating, manipulating, analyzing, simulating, and visualizing Markovian stochastic processes.
|
|
73
|
+
|
|
74
|
+
<table>
|
|
75
|
+
<tr>
|
|
76
|
+
<td align="right">Status:</td>
|
|
77
|
+
<td align="left">
|
|
78
|
+
<a href="https://github.com/TommasoBelluzzo/PyDTMC/actions/workflows/continuous_integration.yml"><img alt="Build" src="https://img.shields.io/github/actions/workflow/status/TommasoBelluzzo/PyDTMC/continuous_integration.yml?branch=master&style=flat&label=Build&color=1081C2"/></a>
|
|
79
|
+
<a href="https://pydtmc.readthedocs.io/"><img alt="Docs" src="https://img.shields.io/readthedocs/pydtmc?style=flat&label=Docs&color=1081C2"/></a>
|
|
80
|
+
<a href="https://coveralls.io/github/TommasoBelluzzo/PyDTMC?branch=master"><img alt="Coverage" src="https://img.shields.io/coveralls/github/TommasoBelluzzo/PyDTMC?style=flat&label=Coverage&color=1081C2"/></a>
|
|
81
|
+
</td>
|
|
82
|
+
</tr>
|
|
83
|
+
<tr>
|
|
84
|
+
<td align="right">Info:</td>
|
|
85
|
+
<td align="left">
|
|
86
|
+
<a href="https://github.com/TommasoBelluzzo/PyDTMC/blob/master/LICENSE.md"><img alt="License" src="https://img.shields.io/github/license/TommasoBelluzzo/PyDTMC?style=flat&label=License&color=1081C2"/></a>
|
|
87
|
+
<a href="https://doi.org/10.5281/zenodo.23363778"><img alt="DOI" src="https://zenodo.org/badge/DOI/10.5281/zenodo.23363778.svg"/></a>
|
|
88
|
+
<a href="#"><img alt="Size" src="https://img.shields.io/github/repo-size/TommasoBelluzzo/PyDTMC?style=flat&label=Size&color=1081C2"/></a>
|
|
89
|
+
</td>
|
|
90
|
+
</tr>
|
|
91
|
+
<tr>
|
|
92
|
+
<td align="right">PyPI:</td>
|
|
93
|
+
<td align="left">
|
|
94
|
+
<a href="https://pypi.org/project/PyDTMC/"><img alt="Version" src="https://img.shields.io/pypi/v/PyDTMC?style=flat&label=Version&color=1081C2"/></a>
|
|
95
|
+
<a href="https://pypi.org/project/PyDTMC/"><img alt="Python" src="https://img.shields.io/pypi/pyversions/PyDTMC?style=flat&label=Python&color=1081C2"/></a>
|
|
96
|
+
<a href="https://pypi.org/project/PyDTMC/"><img alt="Wheel" src="https://img.shields.io/pypi/wheel/PyDTMC?style=flat&label=Wheel&color=1081C2"/></a>
|
|
97
|
+
<a href="https://pypi.org/project/PyDTMC/"><img alt="Downloads" src="https://img.shields.io/pypi/dm/PyDTMC?style=flat&label=Downloads&color=1081C2"/></a>
|
|
98
|
+
</td>
|
|
99
|
+
</tr>
|
|
100
|
+
<tr>
|
|
101
|
+
<td align="right">Conda:</td>
|
|
102
|
+
<td align="left">
|
|
103
|
+
<a href="https://anaconda.org/conda-forge/pydtmc/"><img alt="Version" src="https://img.shields.io/conda/vn/conda-forge/pydtmc?style=flat&label=Version"/></a>
|
|
104
|
+
<a href="https://anaconda.org/conda-forge/pydtmc/"><img alt="Python" src="https://img.shields.io/pypi/pyversions/PyDTMC?style=flat&label=Python&color=1081C2"/></a>
|
|
105
|
+
<a href="https://anaconda.org/conda-forge/pydtmc/"><img alt="Platforms" src="https://img.shields.io/conda/pn/conda-forge/pydtmc?style=flat&label=Platforms&color=1081C2"/></a>
|
|
106
|
+
<a href="https://anaconda.org/conda-forge/pydtmc/"><img alt="Downloads" src="https://img.shields.io/conda/dn/conda-forge/pydtmc?style=flat&label=Downloads&color=1081C2"/></a>
|
|
107
|
+
</td>
|
|
108
|
+
</tr>
|
|
109
|
+
<tr>
|
|
110
|
+
<td align="right">Donation:</td>
|
|
111
|
+
<td align="left">
|
|
112
|
+
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=D8LH6DNYN7EN8"><img alt="PayPal" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif"/></a>
|
|
113
|
+
</td>
|
|
114
|
+
</tr>
|
|
115
|
+
</table>
|
|
116
|
+
|
|
117
|
+
## Installation
|
|
118
|
+
|
|
119
|
+
PyDTMC requires **Python 3.12 or greater** and depends on [NumPy](https://numpy.org/), [SciPy](https://scipy.org/), [NetworkX](https://networkx.org/), and [Matplotlib](https://matplotlib.org/).
|
|
120
|
+
|
|
121
|
+
For the [PyPI](https://pypi.org/) installation:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
pip install pydtmc
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
For the [Conda](https://docs.conda.io/) installation:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
conda install -c conda-forge pydtmc
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
For the latest development version:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
pip install git+https://github.com/TommasoBelluzzo/PyDTMC.git
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Note:** [Graphviz](https://graphviz.org/) and [pydot](https://pypi.org/project/pydot/) are recommended for graph visualization using the `plot_graph` function.
|
|
140
|
+
|
|
141
|
+
## Resources
|
|
142
|
+
|
|
143
|
+
For additional functionality, mathematical definitions, and usage examples, refer to the [documentation](https://pydtmc.readthedocs.io/).
|
|
144
|
+
|
|
145
|
+
If you use PyDTMC in your work, please cite the software using its [Zenodo DOI](https://doi.org/10.5281/zenodo.23363778).\
|
|
146
|
+
Citation metadata is also available in the [CITATION.cff](https://github.com/TommasoBelluzzo/PyDTMC/blob/master/CITATION.cff) file.
|
|
147
|
+
|
|
148
|
+
## Quick Start
|
|
149
|
+
|
|
150
|
+
Import the classes from PyDTMC and create instances of a discrete-time Markov chain and a hidden Markov model:
|
|
151
|
+
|
|
152
|
+
```python
|
|
153
|
+
from pydtmc import MarkovChain, HiddenMarkovModel
|
|
154
|
+
|
|
155
|
+
# Markov Chain
|
|
156
|
+
|
|
157
|
+
p = [
|
|
158
|
+
[0.2, 0.7, 0.0, 0.1],
|
|
159
|
+
[0.0, 0.6, 0.3, 0.1],
|
|
160
|
+
[0.0, 0.0, 1.0, 0.0],
|
|
161
|
+
[0.5, 0.0, 0.5, 0.0]
|
|
162
|
+
]
|
|
163
|
+
|
|
164
|
+
mc = MarkovChain(p, ['A', 'B', 'C', 'D'])
|
|
165
|
+
|
|
166
|
+
# Hidden Markov Model
|
|
167
|
+
|
|
168
|
+
p = [
|
|
169
|
+
[0.4, 0.6],
|
|
170
|
+
[0.8, 0.2]
|
|
171
|
+
]
|
|
172
|
+
|
|
173
|
+
e = [
|
|
174
|
+
[0.5, 0.0, 0.0, 0.5],
|
|
175
|
+
[0.2, 0.2, 0.2, 0.4]
|
|
176
|
+
]
|
|
177
|
+
|
|
178
|
+
hmm = HiddenMarkovModel(p, e, ['A', 'B'], ['H1', 'H2', 'H3', 'H4'])
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Usage: MarkovChain Class
|
|
182
|
+
|
|
183
|
+
Using the `mc` instance created in the [Quick Start](#quick-start) section, the following examples showcase some of the class properties, methods, and visualization functions:
|
|
184
|
+
|
|
185
|
+
**Properties**
|
|
186
|
+
|
|
187
|
+
```python
|
|
188
|
+
print(mc.is_absorbing)
|
|
189
|
+
print(mc.is_ergodic)
|
|
190
|
+
print(mc.is_irreducible)
|
|
191
|
+
print(mc.recurrent_states)
|
|
192
|
+
print(mc.transient_states)
|
|
193
|
+
print(mc.communicating_classes)
|
|
194
|
+
print(mc.period)
|
|
195
|
+
print(mc.pi)
|
|
196
|
+
print(mc.fundamental_matrix)
|
|
197
|
+
print(mc.entropy_rate)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Methods**
|
|
201
|
+
|
|
202
|
+
```python
|
|
203
|
+
print(mc.absorption_probabilities())
|
|
204
|
+
print(mc.expected_rewards(10, [2.0, -3.0, 8.0, -7.0]))
|
|
205
|
+
print(mc.expected_transitions(2))
|
|
206
|
+
print(mc.first_passage_probabilities(5, 3))
|
|
207
|
+
print(mc.hitting_probabilities([0, 1]))
|
|
208
|
+
print(mc.mean_number_visits())
|
|
209
|
+
print(mc.simulate(10, seed=32))
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Visualization**
|
|
213
|
+
|
|
214
|
+
```python
|
|
215
|
+
from pydtmc import plot_eigenvalues, plot_graph, plot_redistributions, plot_sequence, plot_trellis
|
|
216
|
+
|
|
217
|
+
plot_eigenvalues(mc, dpi=300)
|
|
218
|
+
plot_graph(mc, dpi=300)
|
|
219
|
+
plot_sequence(mc, 10, plot_type='histogram', dpi=300)
|
|
220
|
+
plot_sequence(mc, 10, plot_type='heatmap', dpi=300)
|
|
221
|
+
plot_sequence(mc, 10, plot_type='matrix', dpi=300)
|
|
222
|
+
plot_redistributions(mc, 10, plot_type='heatmap', dpi=300)
|
|
223
|
+
plot_redistributions(mc, 10, plot_type='projection', dpi=300)
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+

|
|
227
|
+
|
|
228
|
+
## Usage: HiddenMarkovModel Class
|
|
229
|
+
|
|
230
|
+
Using the `hmm` instance created in the [Quick Start](#quick-start) section, the following examples showcase some of the class properties, methods, and visualization functions:
|
|
231
|
+
|
|
232
|
+
**Properties**
|
|
233
|
+
|
|
234
|
+
```python
|
|
235
|
+
print(hmm.is_ergodic)
|
|
236
|
+
print(hmm.is_regular)
|
|
237
|
+
print(hmm.pi)
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Methods**
|
|
241
|
+
|
|
242
|
+
```python
|
|
243
|
+
print(hmm.emission_probability('H1', 'A'))
|
|
244
|
+
print(hmm.transition_probability('A', 'B'))
|
|
245
|
+
print(hmm.decode(['H1', 'H2', 'H3']))
|
|
246
|
+
print(hmm.predict('viterbi', ['H1', 'H2', 'H3']))
|
|
247
|
+
print(hmm.simulate(12, seed=1488))
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
**Visualization**
|
|
251
|
+
|
|
252
|
+
```python
|
|
253
|
+
from pydtmc import plot_graph, plot_sequence, plot_trellis
|
|
254
|
+
|
|
255
|
+
plot_graph(hmm, dpi=300)
|
|
256
|
+
plot_sequence(hmm, 10, plot_type='histogram', dpi=300)
|
|
257
|
+
plot_sequence(hmm, 10, plot_type='heatmap', dpi=300)
|
|
258
|
+
plot_sequence(hmm, 10, plot_type='matrix', dpi=300)
|
|
259
|
+
plot_trellis(hmm, 10, dpi=300)
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+

|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: PyDTMC
|
|
3
|
+
Version: 10.1.0
|
|
4
|
+
Summary: Python library for analyzing, simulating, and visualizing discrete-time Markov chains and hidden Markov models.
|
|
5
|
+
Home-page: https://github.com/TommasoBelluzzo/PyDTMC
|
|
6
|
+
Author: Tommaso Belluzzo
|
|
7
|
+
Author-email: tommaso.belluzzo@gmail.com
|
|
8
|
+
Maintainer: Tommaso Belluzzo
|
|
9
|
+
Maintainer-email: tommaso.belluzzo@gmail.com
|
|
10
|
+
License: MIT
|
|
11
|
+
Project-URL: Documentation, https://pydtmc.readthedocs.io/
|
|
12
|
+
Project-URL: Bug Tracker, https://github.com/TommasoBelluzzo/PyDTMC/issues
|
|
13
|
+
Project-URL: Donation, https://www.paypal.com/donate?hosted_button_id=D8LH6DNYN7EN8
|
|
14
|
+
Keywords: markov-chain,markov-chains,hidden-markov-model,hidden-markov-models,markov-model,markov-models,markov-state-model,markov-state-models,mathematics,statistics,probability,stochastic-process,stochastic-processes,scientific-computing,analysis,simulation,simulations,plot,plots,plotting
|
|
15
|
+
Platform: any
|
|
16
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
17
|
+
Classifier: Natural Language :: English
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
25
|
+
Classifier: Intended Audience :: Developers
|
|
26
|
+
Classifier: Intended Audience :: Education
|
|
27
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
28
|
+
Classifier: Intended Audience :: Science/Research
|
|
29
|
+
Classifier: Topic :: Education
|
|
30
|
+
Classifier: Topic :: Scientific/Engineering
|
|
31
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
32
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
33
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
34
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
35
|
+
Classifier: Topic :: Other/Nonlisted Topic
|
|
36
|
+
Requires-Python: >=3.12
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
License-File: LICENSE.md
|
|
39
|
+
Requires-Dist: matplotlib>=3.10
|
|
40
|
+
Requires-Dist: networkx
|
|
41
|
+
Requires-Dist: numpy
|
|
42
|
+
Requires-Dist: scipy
|
|
43
|
+
Provides-Extra: build
|
|
44
|
+
Requires-Dist: build; extra == "build"
|
|
45
|
+
Requires-Dist: setuptools; extra == "build"
|
|
46
|
+
Requires-Dist: wheel; extra == "build"
|
|
47
|
+
Requires-Dist: twine; extra == "build"
|
|
48
|
+
Provides-Extra: docs
|
|
49
|
+
Requires-Dist: docutils; extra == "docs"
|
|
50
|
+
Requires-Dist: typing-extensions; extra == "docs"
|
|
51
|
+
Requires-Dist: sphinx; extra == "docs"
|
|
52
|
+
Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
|
|
53
|
+
Requires-Dist: sphinx-rtd-theme; extra == "docs"
|
|
54
|
+
Provides-Extra: lint
|
|
55
|
+
Requires-Dist: flake8; extra == "lint"
|
|
56
|
+
Requires-Dist: pylint; extra == "lint"
|
|
57
|
+
Provides-Extra: package
|
|
58
|
+
Requires-Dist: defusedxml; extra == "package"
|
|
59
|
+
Requires-Dist: numpydoc; extra == "package"
|
|
60
|
+
Requires-Dist: pandas; extra == "package"
|
|
61
|
+
Requires-Dist: pydot; extra == "package"
|
|
62
|
+
Provides-Extra: tests
|
|
63
|
+
Requires-Dist: coverage; extra == "tests"
|
|
64
|
+
Requires-Dist: pytest; extra == "tests"
|
|
65
|
+
Requires-Dist: pytest-benchmark; extra == "tests"
|
|
66
|
+
Requires-Dist: pytest-cov; extra == "tests"
|
|
67
|
+
Requires-Dist: coveralls; extra == "tests"
|
|
68
|
+
Dynamic: description
|
|
69
|
+
Dynamic: description-content-type
|
|
70
|
+
Dynamic: license-file
|
|
71
|
+
|
|
72
|
+
PyDTMC is a lightweight Python library focused on discrete-time Markov chains and hidden Markov models. It provides a comprehensive set of classes and functions for creating, manipulating, analyzing, simulating, and visualizing Markovian stochastic processes.
|
|
73
|
+
|
|
74
|
+
<table>
|
|
75
|
+
<tr>
|
|
76
|
+
<td align="right">Status:</td>
|
|
77
|
+
<td align="left">
|
|
78
|
+
<a href="https://github.com/TommasoBelluzzo/PyDTMC/actions/workflows/continuous_integration.yml"><img alt="Build" src="https://img.shields.io/github/actions/workflow/status/TommasoBelluzzo/PyDTMC/continuous_integration.yml?branch=master&style=flat&label=Build&color=1081C2"/></a>
|
|
79
|
+
<a href="https://pydtmc.readthedocs.io/"><img alt="Docs" src="https://img.shields.io/readthedocs/pydtmc?style=flat&label=Docs&color=1081C2"/></a>
|
|
80
|
+
<a href="https://coveralls.io/github/TommasoBelluzzo/PyDTMC?branch=master"><img alt="Coverage" src="https://img.shields.io/coveralls/github/TommasoBelluzzo/PyDTMC?style=flat&label=Coverage&color=1081C2"/></a>
|
|
81
|
+
</td>
|
|
82
|
+
</tr>
|
|
83
|
+
<tr>
|
|
84
|
+
<td align="right">Info:</td>
|
|
85
|
+
<td align="left">
|
|
86
|
+
<a href="https://github.com/TommasoBelluzzo/PyDTMC/blob/master/LICENSE.md"><img alt="License" src="https://img.shields.io/github/license/TommasoBelluzzo/PyDTMC?style=flat&label=License&color=1081C2"/></a>
|
|
87
|
+
<a href="https://doi.org/10.5281/zenodo.23363778"><img alt="DOI" src="https://zenodo.org/badge/DOI/10.5281/zenodo.23363778.svg"/></a>
|
|
88
|
+
<a href="#"><img alt="Size" src="https://img.shields.io/github/repo-size/TommasoBelluzzo/PyDTMC?style=flat&label=Size&color=1081C2"/></a>
|
|
89
|
+
</td>
|
|
90
|
+
</tr>
|
|
91
|
+
<tr>
|
|
92
|
+
<td align="right">PyPI:</td>
|
|
93
|
+
<td align="left">
|
|
94
|
+
<a href="https://pypi.org/project/PyDTMC/"><img alt="Version" src="https://img.shields.io/pypi/v/PyDTMC?style=flat&label=Version&color=1081C2"/></a>
|
|
95
|
+
<a href="https://pypi.org/project/PyDTMC/"><img alt="Python" src="https://img.shields.io/pypi/pyversions/PyDTMC?style=flat&label=Python&color=1081C2"/></a>
|
|
96
|
+
<a href="https://pypi.org/project/PyDTMC/"><img alt="Wheel" src="https://img.shields.io/pypi/wheel/PyDTMC?style=flat&label=Wheel&color=1081C2"/></a>
|
|
97
|
+
<a href="https://pypi.org/project/PyDTMC/"><img alt="Downloads" src="https://img.shields.io/pypi/dm/PyDTMC?style=flat&label=Downloads&color=1081C2"/></a>
|
|
98
|
+
</td>
|
|
99
|
+
</tr>
|
|
100
|
+
<tr>
|
|
101
|
+
<td align="right">Conda:</td>
|
|
102
|
+
<td align="left">
|
|
103
|
+
<a href="https://anaconda.org/conda-forge/pydtmc/"><img alt="Version" src="https://img.shields.io/conda/vn/conda-forge/pydtmc?style=flat&label=Version"/></a>
|
|
104
|
+
<a href="https://anaconda.org/conda-forge/pydtmc/"><img alt="Python" src="https://img.shields.io/pypi/pyversions/PyDTMC?style=flat&label=Python&color=1081C2"/></a>
|
|
105
|
+
<a href="https://anaconda.org/conda-forge/pydtmc/"><img alt="Platforms" src="https://img.shields.io/conda/pn/conda-forge/pydtmc?style=flat&label=Platforms&color=1081C2"/></a>
|
|
106
|
+
<a href="https://anaconda.org/conda-forge/pydtmc/"><img alt="Downloads" src="https://img.shields.io/conda/dn/conda-forge/pydtmc?style=flat&label=Downloads&color=1081C2"/></a>
|
|
107
|
+
</td>
|
|
108
|
+
</tr>
|
|
109
|
+
<tr>
|
|
110
|
+
<td align="right">Donation:</td>
|
|
111
|
+
<td align="left">
|
|
112
|
+
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=D8LH6DNYN7EN8"><img alt="PayPal" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif"/></a>
|
|
113
|
+
</td>
|
|
114
|
+
</tr>
|
|
115
|
+
</table>
|
|
116
|
+
|
|
117
|
+
## Installation
|
|
118
|
+
|
|
119
|
+
PyDTMC requires **Python 3.12 or greater** and depends on [NumPy](https://numpy.org/), [SciPy](https://scipy.org/), [NetworkX](https://networkx.org/), and [Matplotlib](https://matplotlib.org/).
|
|
120
|
+
|
|
121
|
+
For the [PyPI](https://pypi.org/) installation:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
pip install pydtmc
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
For the [Conda](https://docs.conda.io/) installation:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
conda install -c conda-forge pydtmc
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
For the latest development version:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
pip install git+https://github.com/TommasoBelluzzo/PyDTMC.git
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Note:** [Graphviz](https://graphviz.org/) and [pydot](https://pypi.org/project/pydot/) are recommended for graph visualization using the `plot_graph` function.
|
|
140
|
+
|
|
141
|
+
## Resources
|
|
142
|
+
|
|
143
|
+
For additional functionality, mathematical definitions, and usage examples, refer to the [documentation](https://pydtmc.readthedocs.io/).
|
|
144
|
+
|
|
145
|
+
If you use PyDTMC in your work, please cite the software using its [Zenodo DOI](https://doi.org/10.5281/zenodo.23363778).\
|
|
146
|
+
Citation metadata is also available in the [CITATION.cff](https://github.com/TommasoBelluzzo/PyDTMC/blob/master/CITATION.cff) file.
|
|
147
|
+
|
|
148
|
+
## Quick Start
|
|
149
|
+
|
|
150
|
+
Import the classes from PyDTMC and create instances of a discrete-time Markov chain and a hidden Markov model:
|
|
151
|
+
|
|
152
|
+
```python
|
|
153
|
+
from pydtmc import MarkovChain, HiddenMarkovModel
|
|
154
|
+
|
|
155
|
+
# Markov Chain
|
|
156
|
+
|
|
157
|
+
p = [
|
|
158
|
+
[0.2, 0.7, 0.0, 0.1],
|
|
159
|
+
[0.0, 0.6, 0.3, 0.1],
|
|
160
|
+
[0.0, 0.0, 1.0, 0.0],
|
|
161
|
+
[0.5, 0.0, 0.5, 0.0]
|
|
162
|
+
]
|
|
163
|
+
|
|
164
|
+
mc = MarkovChain(p, ['A', 'B', 'C', 'D'])
|
|
165
|
+
|
|
166
|
+
# Hidden Markov Model
|
|
167
|
+
|
|
168
|
+
p = [
|
|
169
|
+
[0.4, 0.6],
|
|
170
|
+
[0.8, 0.2]
|
|
171
|
+
]
|
|
172
|
+
|
|
173
|
+
e = [
|
|
174
|
+
[0.5, 0.0, 0.0, 0.5],
|
|
175
|
+
[0.2, 0.2, 0.2, 0.4]
|
|
176
|
+
]
|
|
177
|
+
|
|
178
|
+
hmm = HiddenMarkovModel(p, e, ['A', 'B'], ['H1', 'H2', 'H3', 'H4'])
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Usage: MarkovChain Class
|
|
182
|
+
|
|
183
|
+
Using the `mc` instance created in the [Quick Start](#quick-start) section, the following examples showcase some of the class properties, methods, and visualization functions:
|
|
184
|
+
|
|
185
|
+
**Properties**
|
|
186
|
+
|
|
187
|
+
```python
|
|
188
|
+
print(mc.is_absorbing)
|
|
189
|
+
print(mc.is_ergodic)
|
|
190
|
+
print(mc.is_irreducible)
|
|
191
|
+
print(mc.recurrent_states)
|
|
192
|
+
print(mc.transient_states)
|
|
193
|
+
print(mc.communicating_classes)
|
|
194
|
+
print(mc.period)
|
|
195
|
+
print(mc.pi)
|
|
196
|
+
print(mc.fundamental_matrix)
|
|
197
|
+
print(mc.entropy_rate)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Methods**
|
|
201
|
+
|
|
202
|
+
```python
|
|
203
|
+
print(mc.absorption_probabilities())
|
|
204
|
+
print(mc.expected_rewards(10, [2.0, -3.0, 8.0, -7.0]))
|
|
205
|
+
print(mc.expected_transitions(2))
|
|
206
|
+
print(mc.first_passage_probabilities(5, 3))
|
|
207
|
+
print(mc.hitting_probabilities([0, 1]))
|
|
208
|
+
print(mc.mean_number_visits())
|
|
209
|
+
print(mc.simulate(10, seed=32))
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Visualization**
|
|
213
|
+
|
|
214
|
+
```python
|
|
215
|
+
from pydtmc import plot_eigenvalues, plot_graph, plot_redistributions, plot_sequence, plot_trellis
|
|
216
|
+
|
|
217
|
+
plot_eigenvalues(mc, dpi=300)
|
|
218
|
+
plot_graph(mc, dpi=300)
|
|
219
|
+
plot_sequence(mc, 10, plot_type='histogram', dpi=300)
|
|
220
|
+
plot_sequence(mc, 10, plot_type='heatmap', dpi=300)
|
|
221
|
+
plot_sequence(mc, 10, plot_type='matrix', dpi=300)
|
|
222
|
+
plot_redistributions(mc, 10, plot_type='heatmap', dpi=300)
|
|
223
|
+
plot_redistributions(mc, 10, plot_type='projection', dpi=300)
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+

|
|
227
|
+
|
|
228
|
+
## Usage: HiddenMarkovModel Class
|
|
229
|
+
|
|
230
|
+
Using the `hmm` instance created in the [Quick Start](#quick-start) section, the following examples showcase some of the class properties, methods, and visualization functions:
|
|
231
|
+
|
|
232
|
+
**Properties**
|
|
233
|
+
|
|
234
|
+
```python
|
|
235
|
+
print(hmm.is_ergodic)
|
|
236
|
+
print(hmm.is_regular)
|
|
237
|
+
print(hmm.pi)
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Methods**
|
|
241
|
+
|
|
242
|
+
```python
|
|
243
|
+
print(hmm.emission_probability('H1', 'A'))
|
|
244
|
+
print(hmm.transition_probability('A', 'B'))
|
|
245
|
+
print(hmm.decode(['H1', 'H2', 'H3']))
|
|
246
|
+
print(hmm.predict('viterbi', ['H1', 'H2', 'H3']))
|
|
247
|
+
print(hmm.simulate(12, seed=1488))
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
**Visualization**
|
|
251
|
+
|
|
252
|
+
```python
|
|
253
|
+
from pydtmc import plot_graph, plot_sequence, plot_trellis
|
|
254
|
+
|
|
255
|
+
plot_graph(hmm, dpi=300)
|
|
256
|
+
plot_sequence(hmm, 10, plot_type='histogram', dpi=300)
|
|
257
|
+
plot_sequence(hmm, 10, plot_type='heatmap', dpi=300)
|
|
258
|
+
plot_sequence(hmm, 10, plot_type='matrix', dpi=300)
|
|
259
|
+
plot_trellis(hmm, 10, dpi=300)
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+

|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
LICENSE.md
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
requirements.txt
|
|
6
|
+
setup.cfg
|
|
7
|
+
setup.py
|
|
8
|
+
PyDTMC.egg-info/PKG-INFO
|
|
9
|
+
PyDTMC.egg-info/SOURCES.txt
|
|
10
|
+
PyDTMC.egg-info/dependency_links.txt
|
|
11
|
+
PyDTMC.egg-info/requires.txt
|
|
12
|
+
PyDTMC.egg-info/top_level.txt
|
|
13
|
+
data/empty
|
|
14
|
+
docs/Makefile
|
|
15
|
+
docs/make.bat
|
|
16
|
+
docs/build/empty
|
|
17
|
+
docs/source/conf.py
|
|
18
|
+
docs/source/genindex.rst
|
|
19
|
+
docs/source/index.rst
|
|
20
|
+
docs/source/_static/css/style.css
|
|
21
|
+
docs/source/_templates/empty
|
|
22
|
+
docs/source/advanced_topics/absorbing_markov_chains.rst
|
|
23
|
+
docs/source/advanced_topics/assessments.rst
|
|
24
|
+
docs/source/advanced_topics/chain_comparison.rst
|
|
25
|
+
docs/source/advanced_topics/hidden_markov_models.rst
|
|
26
|
+
docs/source/advanced_topics/hitting_passage.rst
|
|
27
|
+
docs/source/advanced_topics/index.rst
|
|
28
|
+
docs/source/advanced_topics/long_term_behavior.rst
|
|
29
|
+
docs/source/advanced_topics/markov_chain_analysis.rst
|
|
30
|
+
docs/source/advanced_topics/mixing_convergence.rst
|
|
31
|
+
docs/source/advanced_topics/reduction_aggregation.rst
|
|
32
|
+
docs/source/advanced_topics/simulation_empirical_analysis.rst
|
|
33
|
+
docs/source/advanced_topics/transition_paths_analysis.rst
|
|
34
|
+
docs/source/advanced_topics/visualization.rst
|
|
35
|
+
docs/source/api_reference/custom_exceptions.rst
|
|
36
|
+
docs/source/api_reference/hidden_markov_model.rst
|
|
37
|
+
docs/source/api_reference/hidden_markov_model_methods_instance.rst
|
|
38
|
+
docs/source/api_reference/hidden_markov_model_methods_static.rst
|
|
39
|
+
docs/source/api_reference/hidden_markov_model_properties.rst
|
|
40
|
+
docs/source/api_reference/index.rst
|
|
41
|
+
docs/source/api_reference/markov_chain.rst
|
|
42
|
+
docs/source/api_reference/markov_chain_methods_instance.rst
|
|
43
|
+
docs/source/api_reference/markov_chain_methods_static.rst
|
|
44
|
+
docs/source/api_reference/markov_chain_properties.rst
|
|
45
|
+
docs/source/api_reference/other_assessment_functions.rst
|
|
46
|
+
docs/source/api_reference/other_comparison_functions.rst
|
|
47
|
+
docs/source/api_reference/other_plotting_functions.rst
|
|
48
|
+
docs/source/getting_started/first_hidden_markov_model.rst
|
|
49
|
+
docs/source/getting_started/first_markov_chain.rst
|
|
50
|
+
docs/source/getting_started/index.rst
|
|
51
|
+
docs/source/getting_started/installation.rst
|
|
52
|
+
pydtmc/__init__.py
|
|
53
|
+
pydtmc/_analysis.py
|
|
54
|
+
pydtmc/_base_classes.py
|
|
55
|
+
pydtmc/_constants.py
|
|
56
|
+
pydtmc/_custom_types.py
|
|
57
|
+
pydtmc/_decorators.py
|
|
58
|
+
pydtmc/_dynamics.py
|
|
59
|
+
pydtmc/_files_io.py
|
|
60
|
+
pydtmc/_fitting.py
|
|
61
|
+
pydtmc/_generators.py
|
|
62
|
+
pydtmc/_numerical.py
|
|
63
|
+
pydtmc/_utilities.py
|
|
64
|
+
pydtmc/_validation.py
|
|
65
|
+
pydtmc/assessments.py
|
|
66
|
+
pydtmc/comparisons.py
|
|
67
|
+
pydtmc/exceptions.py
|
|
68
|
+
pydtmc/hidden_markov_model.py
|
|
69
|
+
pydtmc/markov_chain.py
|
|
70
|
+
pydtmc/plotting.py
|
|
71
|
+
tests/__init__.py
|
|
72
|
+
tests/benchmarks.py
|
|
73
|
+
tests/conftest.py
|
|
74
|
+
tests/test_aliases.py
|
|
75
|
+
tests/test_assessments.py
|
|
76
|
+
tests/test_classification.py
|
|
77
|
+
tests/test_comparisons.py
|
|
78
|
+
tests/test_conversions.py
|
|
79
|
+
tests/test_decorators.py
|
|
80
|
+
tests/test_dynamics.py
|
|
81
|
+
tests/test_fitting.py
|
|
82
|
+
tests/test_generators_instance.py
|
|
83
|
+
tests/test_generators_static.py
|
|
84
|
+
tests/test_hmm.py
|
|
85
|
+
tests/test_measures.py
|
|
86
|
+
tests/test_plotting.py
|
|
87
|
+
tests/test_properties.py
|
|
88
|
+
tests/test_utilities.py
|
|
89
|
+
tests/test_validation.py
|
|
90
|
+
tests/utilities.py
|
|
91
|
+
tests/files/file_empty.txt
|
|
92
|
+
tests/files/file_filled.txt
|
|
93
|
+
tests/files/file_noext
|
|
94
|
+
tests/fixtures/fixtures_aliases.json
|
|
95
|
+
tests/fixtures/fixtures_assessments.json
|
|
96
|
+
tests/fixtures/fixtures_benchmarks.json
|
|
97
|
+
tests/fixtures/fixtures_classification.json
|
|
98
|
+
tests/fixtures/fixtures_comparisons.json
|
|
99
|
+
tests/fixtures/fixtures_conversions.json
|
|
100
|
+
tests/fixtures/fixtures_dynamics.json
|
|
101
|
+
tests/fixtures/fixtures_fitting.json
|
|
102
|
+
tests/fixtures/fixtures_generators_instance.json
|
|
103
|
+
tests/fixtures/fixtures_generators_static.json
|
|
104
|
+
tests/fixtures/fixtures_hmm.json
|
|
105
|
+
tests/fixtures/fixtures_measures.json
|
|
106
|
+
tests/fixtures/fixtures_plotting.json
|
|
107
|
+
tests/fixtures/fixtures_properties.json
|
|
108
|
+
tests/fixtures/fixtures_utilities.json
|
|
109
|
+
tests/fixtures/fixtures_validation.json
|