PyDTMC 8.7.0__tar.gz → 9.0.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-8.7.0 → pydtmc-9.0.0}/LICENSE.md +1 -1
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/PKG-INFO +32 -8
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/PyDTMC.egg-info/PKG-INFO +32 -8
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/PyDTMC.egg-info/requires.txt +2 -2
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/pydtmc/__init__.py +1 -1
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/pydtmc/markov_chain.py +3 -10
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/pydtmc/plotting.py +2 -2
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/pydtmc/utilities.py +1 -1
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/setup.cfg +7 -8
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/setup.py +2 -2
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/conftest.py +1 -1
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/fixtures/fixtures_aliases.json +95 -95
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/fixtures/fixtures_classification.json +91 -91
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/fixtures/fixtures_conversions.json +41 -41
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/fixtures/fixtures_fitting.json +159 -159
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/fixtures/fixtures_measures.json +1701 -1701
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/fixtures/fixtures_properties.json +1 -1
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/fixtures/fixtures_simulations.json +881 -881
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/test_aliases.py +7 -9
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/test_generators_static.py +1 -1
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/utilities.py +17 -2
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/MANIFEST.in +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/PyDTMC.egg-info/SOURCES.txt +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/PyDTMC.egg-info/dependency_links.txt +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/PyDTMC.egg-info/top_level.txt +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/README.md +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/data/empty +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/Makefile +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/build/empty +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/make.bat +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/source/_static/css/style.css +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/source/_templates/empty +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/source/conf.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/source/custom_exceptions.rst +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/source/genindex.rst +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/source/hidden_markov_model.rst +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/source/hidden_markov_model_methods_instance.rst +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/source/hidden_markov_model_methods_static.rst +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/source/hidden_markov_model_properties.rst +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/source/index.rst +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/source/markov_chain.rst +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/source/markov_chain_methods_instance.rst +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/source/markov_chain_methods_static.rst +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/source/markov_chain_properties.rst +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/source/other_assessment_functions.rst +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/docs/source/other_plotting_functions.rst +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/pydtmc/assessments.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/pydtmc/base_classes.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/pydtmc/computations.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/pydtmc/custom_types.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/pydtmc/decorators.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/pydtmc/exceptions.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/pydtmc/files_io.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/pydtmc/fitting.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/pydtmc/generators.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/pydtmc/hidden_markov_model.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/pydtmc/measures.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/pydtmc/simulations.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/pydtmc/validation.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/requirements.txt +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/__init__.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/benchmarks.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/files/file_empty.txt +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/files/file_filled.txt +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/files/file_noextension +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/fixtures/fixtures_assessments.json +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/fixtures/fixtures_benchmarks.json +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/fixtures/fixtures_generators_instance.json +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/fixtures/fixtures_generators_static.json +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/fixtures/fixtures_hmm.json +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/fixtures/fixtures_plotting.json +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/fixtures/fixtures_utilities.json +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/fixtures/fixtures_validation.json +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/test_assessments.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/test_classification.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/test_conversions.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/test_fitting.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/test_generators_instance.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/test_hmm.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/test_measures.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/test_plotting.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/test_properties.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/test_simulations.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/test_utilities.py +0 -0
- {PyDTMC-8.7.0 → pydtmc-9.0.0}/tests/test_validation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: PyDTMC
|
|
3
|
-
Version:
|
|
3
|
+
Version: 9.0.0
|
|
4
4
|
Summary: A full-featured and lightweight library for discrete-time Markov chains analysis.
|
|
5
5
|
Home-page: https://github.com/TommasoBelluzzo/PyDTMC
|
|
6
6
|
Author: Tommaso Belluzzo
|
|
@@ -18,11 +18,9 @@ Classifier: Natural Language :: English
|
|
|
18
18
|
Classifier: Operating System :: OS Independent
|
|
19
19
|
Classifier: Programming Language :: Python :: 3
|
|
20
20
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
23
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
24
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
25
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
26
24
|
Classifier: Intended Audience :: Education
|
|
27
25
|
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
28
26
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -32,14 +30,40 @@ Classifier: Topic :: Office/Business
|
|
|
32
30
|
Classifier: Topic :: Scientific/Engineering
|
|
33
31
|
Classifier: Topic :: Text Processing
|
|
34
32
|
Classifier: Topic :: Other/Nonlisted Topic
|
|
35
|
-
Requires-Python: >=3.
|
|
33
|
+
Requires-Python: >=3.12
|
|
36
34
|
Description-Content-Type: text/markdown
|
|
35
|
+
License-File: LICENSE.md
|
|
36
|
+
Requires-Dist: matplotlib>=3.10
|
|
37
|
+
Requires-Dist: networkx
|
|
38
|
+
Requires-Dist: numpy
|
|
39
|
+
Requires-Dist: scipy
|
|
37
40
|
Provides-Extra: build
|
|
41
|
+
Requires-Dist: setuptools; extra == "build"
|
|
42
|
+
Requires-Dist: wheel; extra == "build"
|
|
43
|
+
Requires-Dist: twine; extra == "build"
|
|
38
44
|
Provides-Extra: docs
|
|
45
|
+
Requires-Dist: docutils<0.21,>=0.18.1; extra == "docs"
|
|
46
|
+
Requires-Dist: typing-extensions; extra == "docs"
|
|
47
|
+
Requires-Dist: sphinx<=7.1.2; extra == "docs"
|
|
48
|
+
Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
|
|
49
|
+
Requires-Dist: sphinx-rtd-theme; extra == "docs"
|
|
39
50
|
Provides-Extra: lint
|
|
51
|
+
Requires-Dist: flake8; extra == "lint"
|
|
52
|
+
Requires-Dist: pylint; extra == "lint"
|
|
40
53
|
Provides-Extra: package
|
|
54
|
+
Requires-Dist: defusedxml; extra == "package"
|
|
55
|
+
Requires-Dist: numpydoc; extra == "package"
|
|
56
|
+
Requires-Dist: pandas; extra == "package"
|
|
57
|
+
Requires-Dist: pydot; extra == "package"
|
|
41
58
|
Provides-Extra: tests
|
|
42
|
-
|
|
59
|
+
Requires-Dist: coverage; extra == "tests"
|
|
60
|
+
Requires-Dist: pytest; extra == "tests"
|
|
61
|
+
Requires-Dist: pytest-benchmark; extra == "tests"
|
|
62
|
+
Requires-Dist: pytest-cov; extra == "tests"
|
|
63
|
+
Requires-Dist: coveralls; extra == "tests"
|
|
64
|
+
Dynamic: description
|
|
65
|
+
Dynamic: description-content-type
|
|
66
|
+
Dynamic: license-file
|
|
43
67
|
|
|
44
68
|
PyDTMC is a full-featured and lightweight library for discrete-time Markov chains analysis. It provides classes and functions for creating, manipulating, simulating and visualizing Markov processes.
|
|
45
69
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: PyDTMC
|
|
3
|
-
Version:
|
|
3
|
+
Version: 9.0.0
|
|
4
4
|
Summary: A full-featured and lightweight library for discrete-time Markov chains analysis.
|
|
5
5
|
Home-page: https://github.com/TommasoBelluzzo/PyDTMC
|
|
6
6
|
Author: Tommaso Belluzzo
|
|
@@ -18,11 +18,9 @@ Classifier: Natural Language :: English
|
|
|
18
18
|
Classifier: Operating System :: OS Independent
|
|
19
19
|
Classifier: Programming Language :: Python :: 3
|
|
20
20
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
23
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
24
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
25
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
26
24
|
Classifier: Intended Audience :: Education
|
|
27
25
|
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
28
26
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -32,14 +30,40 @@ Classifier: Topic :: Office/Business
|
|
|
32
30
|
Classifier: Topic :: Scientific/Engineering
|
|
33
31
|
Classifier: Topic :: Text Processing
|
|
34
32
|
Classifier: Topic :: Other/Nonlisted Topic
|
|
35
|
-
Requires-Python: >=3.
|
|
33
|
+
Requires-Python: >=3.12
|
|
36
34
|
Description-Content-Type: text/markdown
|
|
35
|
+
License-File: LICENSE.md
|
|
36
|
+
Requires-Dist: matplotlib>=3.10
|
|
37
|
+
Requires-Dist: networkx
|
|
38
|
+
Requires-Dist: numpy
|
|
39
|
+
Requires-Dist: scipy
|
|
37
40
|
Provides-Extra: build
|
|
41
|
+
Requires-Dist: setuptools; extra == "build"
|
|
42
|
+
Requires-Dist: wheel; extra == "build"
|
|
43
|
+
Requires-Dist: twine; extra == "build"
|
|
38
44
|
Provides-Extra: docs
|
|
45
|
+
Requires-Dist: docutils<0.21,>=0.18.1; extra == "docs"
|
|
46
|
+
Requires-Dist: typing-extensions; extra == "docs"
|
|
47
|
+
Requires-Dist: sphinx<=7.1.2; extra == "docs"
|
|
48
|
+
Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
|
|
49
|
+
Requires-Dist: sphinx-rtd-theme; extra == "docs"
|
|
39
50
|
Provides-Extra: lint
|
|
51
|
+
Requires-Dist: flake8; extra == "lint"
|
|
52
|
+
Requires-Dist: pylint; extra == "lint"
|
|
40
53
|
Provides-Extra: package
|
|
54
|
+
Requires-Dist: defusedxml; extra == "package"
|
|
55
|
+
Requires-Dist: numpydoc; extra == "package"
|
|
56
|
+
Requires-Dist: pandas; extra == "package"
|
|
57
|
+
Requires-Dist: pydot; extra == "package"
|
|
41
58
|
Provides-Extra: tests
|
|
42
|
-
|
|
59
|
+
Requires-Dist: coverage; extra == "tests"
|
|
60
|
+
Requires-Dist: pytest; extra == "tests"
|
|
61
|
+
Requires-Dist: pytest-benchmark; extra == "tests"
|
|
62
|
+
Requires-Dist: pytest-cov; extra == "tests"
|
|
63
|
+
Requires-Dist: coveralls; extra == "tests"
|
|
64
|
+
Dynamic: description
|
|
65
|
+
Dynamic: description-content-type
|
|
66
|
+
Dynamic: license-file
|
|
43
67
|
|
|
44
68
|
PyDTMC is a full-featured and lightweight library for discrete-time Markov chains analysis. It provides classes and functions for creating, manipulating, simulating and visualizing Markov processes.
|
|
45
69
|
|
|
@@ -632,19 +632,12 @@ class MarkovChain(_Model):
|
|
|
632
632
|
|
|
633
633
|
@_cached_property
|
|
634
634
|
def is_aperiodic(self) -> bool:
|
|
635
|
-
|
|
636
635
|
"""
|
|
637
636
|
A property indicating whether the Markov chain is aperiodic.
|
|
638
637
|
"""
|
|
639
|
-
|
|
640
638
|
if self.is_irreducible:
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
result = True
|
|
644
|
-
else: # pragma: no cover
|
|
645
|
-
result = _nx.is_aperiodic(self.__digraph)
|
|
646
|
-
|
|
647
|
-
return result
|
|
639
|
+
return set(self.periods).pop() == 1
|
|
640
|
+
return all(period == 1 for period in self.periods)
|
|
648
641
|
|
|
649
642
|
@_cached_property
|
|
650
643
|
def is_canonical(self) -> bool:
|
|
@@ -1618,7 +1611,7 @@ class MarkovChain(_Model):
|
|
|
1618
1611
|
@_object_mark(instance_generator=True)
|
|
1619
1612
|
def merge_with(self, other: _tmc, gamma: float) -> _tmc:
|
|
1620
1613
|
|
|
1621
|
-
"""
|
|
1614
|
+
r"""
|
|
1622
1615
|
The method returns a Markov chain whose transition matrix is defined below.
|
|
1623
1616
|
|
|
1624
1617
|
| :math:`p_{new} = (1 - \gamma) p_{current} + \gamma p_{other}`
|
|
@@ -291,7 +291,7 @@ def plot_eigenvalues(model: _tmodel, dpi: int = 100) -> _oplot:
|
|
|
291
291
|
z_spectral_gap = x_spectral_gap**2.0 + y_spectral_gap**2.0
|
|
292
292
|
|
|
293
293
|
h = ax.contourf(x_spectral_gap, y_spectral_gap, z_spectral_gap, alpha=0.2, colors='r', levels=[mu**2.0, 1.0])
|
|
294
|
-
handles.append(_mplp.Rectangle((0.0, 0.0), 1.0, 1.0, fc=h.
|
|
294
|
+
handles.append(_mplp.Rectangle((0.0, 0.0), 1.0, 1.0, fc=h.get_facecolor()[0]))
|
|
295
295
|
labels.append('Spectral Gap')
|
|
296
296
|
|
|
297
297
|
ax.plot(x_slem_circle, y_slem_circle, color='red', linestyle='--', linewidth=1.5)
|
|
@@ -1420,7 +1420,7 @@ def plot_trellis(hmm: _thmm, steps: int, initial_state: _ostate = None, seed: _o
|
|
|
1420
1420
|
|
|
1421
1421
|
node_index += 1
|
|
1422
1422
|
|
|
1423
|
-
headers = ["$\mathregular{T_0}$"] + [hmm.symbols[symbol] for symbol in gts_symbols[1:]]
|
|
1423
|
+
headers = [r"$\mathregular{T_0}$"] + [hmm.symbols[symbol] for symbol in gts_symbols[1:]]
|
|
1424
1424
|
|
|
1425
1425
|
for col, header in enumerate(headers):
|
|
1426
1426
|
|
|
@@ -171,7 +171,7 @@ def create_models_names(models: _tlist_model) -> _tlist_str:
|
|
|
171
171
|
else:
|
|
172
172
|
models_label = 'MODEL'
|
|
173
173
|
|
|
174
|
-
models_names = [
|
|
174
|
+
models_names = [fr'$\mathregular{{{models_label}_{index + 1}}}$' for index, model in enumerate(models)]
|
|
175
175
|
|
|
176
176
|
return models_names
|
|
177
177
|
|
|
@@ -20,11 +20,9 @@ classifiers =
|
|
|
20
20
|
Operating System :: OS Independent
|
|
21
21
|
Programming Language :: Python :: 3
|
|
22
22
|
Programming Language :: Python :: 3 :: Only
|
|
23
|
-
Programming Language :: Python :: 3.8
|
|
24
|
-
Programming Language :: Python :: 3.9
|
|
25
|
-
Programming Language :: Python :: 3.10
|
|
26
|
-
Programming Language :: Python :: 3.11
|
|
27
23
|
Programming Language :: Python :: 3.12
|
|
24
|
+
Programming Language :: Python :: 3.13
|
|
25
|
+
Programming Language :: Python :: 3.14
|
|
28
26
|
Intended Audience :: Education
|
|
29
27
|
Intended Audience :: Financial and Insurance Industry
|
|
30
28
|
Intended Audience :: Science/Research
|
|
@@ -53,11 +51,11 @@ keywords =
|
|
|
53
51
|
simulation
|
|
54
52
|
|
|
55
53
|
[options]
|
|
56
|
-
python_requires = >=3.
|
|
54
|
+
python_requires = >=3.12
|
|
57
55
|
setup_requires =
|
|
58
56
|
setuptools
|
|
59
57
|
install_requires =
|
|
60
|
-
matplotlib
|
|
58
|
+
matplotlib>=3.10
|
|
61
59
|
networkx
|
|
62
60
|
numpy
|
|
63
61
|
scipy
|
|
@@ -68,7 +66,7 @@ build =
|
|
|
68
66
|
wheel
|
|
69
67
|
twine
|
|
70
68
|
docs =
|
|
71
|
-
docutils
|
|
69
|
+
docutils>=0.18.1,<0.21
|
|
72
70
|
typing-extensions
|
|
73
71
|
sphinx<=7.1.2
|
|
74
72
|
sphinx-autodoc-typehints
|
|
@@ -97,7 +95,7 @@ omit =
|
|
|
97
95
|
docs/*
|
|
98
96
|
tests/*
|
|
99
97
|
pydtmc/__init__.py
|
|
100
|
-
pydtmc/
|
|
98
|
+
pydtmc/base_classes.py
|
|
101
99
|
pydtmc/custom_types.py
|
|
102
100
|
pydtmc/decorators.py
|
|
103
101
|
pydtmc/exceptions.py
|
|
@@ -141,6 +139,7 @@ disable =
|
|
|
141
139
|
R0913,
|
|
142
140
|
R0914,
|
|
143
141
|
R0915,
|
|
142
|
+
R0917,
|
|
144
143
|
R1702,
|
|
145
144
|
W0107,
|
|
146
145
|
W0123,
|
|
@@ -21,8 +21,8 @@ import setuptools as _st
|
|
|
21
21
|
# PYTHON CHECK #
|
|
22
22
|
################
|
|
23
23
|
|
|
24
|
-
if _sys.version_info < (3,
|
|
25
|
-
_sys.exit('Python 3.
|
|
24
|
+
if _sys.version_info < (3, 12):
|
|
25
|
+
_sys.exit('Python 3.12 or greater is required.')
|
|
26
26
|
|
|
27
27
|
#################
|
|
28
28
|
# DYNAMIC SETUP #
|
|
@@ -206,7 +206,7 @@ def pytest_configure(config):
|
|
|
206
206
|
config.addinivalue_line('filterwarnings', 'ignore::PendingDeprecationWarning')
|
|
207
207
|
|
|
208
208
|
try:
|
|
209
|
-
if _hasattr_deep(_mpl, 'cbook',
|
|
209
|
+
if _hasattr_deep(_mpl, 'cbook', 'mplDeprecation'):
|
|
210
210
|
config.addinivalue_line('filterwarnings', 'ignore::matplotlib.cbook.mplDeprecation')
|
|
211
211
|
except Exception:
|
|
212
212
|
pass
|
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
{
|
|
2
|
-
"aliased_methods_data": [
|
|
3
|
-
{
|
|
4
|
-
"p": [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]],
|
|
5
|
-
"params": {
|
|
6
|
-
"committor_probabilities": ["backward", 0, 1],
|
|
7
|
-
"conditional_probabilities": [1],
|
|
8
|
-
"expected_rewards": [4, [-2.0, -0.7, -8.0]],
|
|
9
|
-
"expected_transitions": [6, null],
|
|
10
|
-
"first_passage_probabilities": [3, 1, null],
|
|
11
|
-
"first_passage_reward": [21, 1, 0, [-4.4, 7.5, 4.8]],
|
|
12
|
-
"hitting_probabilities": [null],
|
|
13
|
-
"hitting_times": [null],
|
|
14
|
-
"mean_absorption_times": null,
|
|
15
|
-
"mean_first_passage_times_between": [0, 2],
|
|
16
|
-
"mean_first_passage_times_to": null,
|
|
17
|
-
"mean_number_visits": null,
|
|
18
|
-
"mean_recurrence_times": null,
|
|
19
|
-
"mixing_time": [null, 3, "natural"],
|
|
20
|
-
"next_state": [1, false, 7331],
|
|
21
|
-
"time_correlations": [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], null, [1, 10, 100]],
|
|
22
|
-
"time_relaxations": [[0, 1, 1, 1, 1, 0], null, [1, 10, 100]],
|
|
23
|
-
"to_bounded_chain": ["absorbing"],
|
|
24
|
-
"to_canonical_form": null,
|
|
25
|
-
"to_lazy_chain": [0.6],
|
|
26
|
-
"to_nth_order": [3],
|
|
27
|
-
"to_subchain": [[1, 2]]
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"p": [[0.70, 0.15, 0.15], [0.15, 0.70, 0.15], [0.15, 0.15, 0.70]],
|
|
32
|
-
"params": {
|
|
33
|
-
"committor_probabilities": ["backward", 0, 2],
|
|
34
|
-
"conditional_probabilities": [0],
|
|
35
|
-
"expected_rewards": [12, [1.4, 0.0, -6.1]],
|
|
36
|
-
"expected_transitions": [32, [0.1, 0.45, 0.45]],
|
|
37
|
-
"first_passage_probabilities": [7, 0, [1, 2]],
|
|
38
|
-
"first_passage_reward": [18, 1, 2, [-1.9, 8.9, 0.0]],
|
|
39
|
-
"hitting_probabilities": [null],
|
|
40
|
-
"hitting_times": [null],
|
|
41
|
-
"mean_absorption_times": null,
|
|
42
|
-
"mean_first_passage_times_between": [0, 1],
|
|
43
|
-
"mean_first_passage_times_to": null,
|
|
44
|
-
"mean_number_visits": null,
|
|
45
|
-
"mean_recurrence_times": null,
|
|
46
|
-
"mixing_time": [null, 12, "traditional"],
|
|
47
|
-
"next_state": [1, false, 7331],
|
|
48
|
-
"time_correlations": [[0, 0, 0, 1, 2, 2, 2, 2, 2], null, 50],
|
|
49
|
-
"time_relaxations": [[0, 1, 1, 1, 1, 0], null, 50],
|
|
50
|
-
"to_bounded_chain": ["reflecting"],
|
|
51
|
-
"to_canonical_form": null,
|
|
52
|
-
"to_lazy_chain": [[0.1, 0.2, 0.1]],
|
|
53
|
-
"to_nth_order": [6],
|
|
54
|
-
"to_subchain": [[0, 2]]
|
|
55
|
-
}
|
|
56
|
-
} ,
|
|
57
|
-
{
|
|
58
|
-
"p": [[0.0, 1.0, 0.0, 0.0, 0.0, 0.0], [0.1, 0.8, 0.0, 0.1, 0.0, 0.0], [0.3, 0.0, 0.3, 0.2, 0.2, 0.0], [0.5, 0.0, 0.0, 0.0, 0.0, 0.5], [0.2, 0.2, 0.2, 0.0, 0.2, 0.2], [0.0, 0.0, 0.0, 0.0, 0.0, 1.0]],
|
|
59
|
-
"params": {
|
|
60
|
-
"committor_probabilities": ["forward", 3, 5],
|
|
61
|
-
"conditional_probabilities": [4],
|
|
62
|
-
"expected_rewards": [1, [-0.4, 0.0, -3.9, 2.1, 3.6, 0.0]],
|
|
63
|
-
"expected_transitions": [9, null],
|
|
64
|
-
"first_passage_probabilities": [3, 0, [1, 2, 5]],
|
|
65
|
-
"first_passage_reward": [12, 0, [1, 4], [2.3, 3.2, 0.0, 2.1, 5.5, -9.2]],
|
|
66
|
-
"hitting_probabilities": [[2, 3]],
|
|
67
|
-
"hitting_times": [[0, 1, 2]],
|
|
68
|
-
"mean_absorption_times": null,
|
|
69
|
-
"mean_first_passage_times_between": [[0, 2], [1, 3]],
|
|
70
|
-
"mean_first_passage_times_to": [[0, 3, 4]],
|
|
71
|
-
"mean_number_visits": null,
|
|
72
|
-
"mean_recurrence_times": null,
|
|
73
|
-
"next_state": [1, false, 7331],
|
|
74
|
-
"mixing_time": [[0.4, 0.0, 0.2, 0.2, 0.2, 0.0], 5, "natural"],
|
|
75
|
-
"time_correlations": [[0, 1, 1, 1, 1, 0], [2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 2, 3, 4, 5]],
|
|
76
|
-
"time_relaxations": [[0, 1, 1, 1, 1, 0], [0.0, 0.0, 0.8, 0.0, 0.0, 0.2], [0, 1, 2, 3, 4, 5]],
|
|
77
|
-
"to_bounded_chain": [0.75],
|
|
78
|
-
"to_canonical_form": null,
|
|
79
|
-
"to_lazy_chain": [0.1],
|
|
80
|
-
"to_nth_order": [2],
|
|
81
|
-
"to_subchain": [[1, 2, 3]]
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
],
|
|
85
|
-
"aliased_properties_data": [
|
|
86
|
-
{
|
|
87
|
-
"p": [[1.0, 0.0], [0.0, 1.0]]
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"p": [[0.0, 0.0, 1.0], [0.15, 0.70, 0.15], [0.0, 0.0, 1.0]]
|
|
91
|
-
} ,
|
|
92
|
-
{
|
|
93
|
-
"p": [[0.3, 0.4, 0.3], [0.6, 0.2, 0.2], [0.2, 0.7, 0.1]]
|
|
94
|
-
}
|
|
95
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"aliased_methods_data": [
|
|
3
|
+
{
|
|
4
|
+
"p": [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]],
|
|
5
|
+
"params": {
|
|
6
|
+
"committor_probabilities": ["backward", 0, 1],
|
|
7
|
+
"conditional_probabilities": [1],
|
|
8
|
+
"expected_rewards": [4, [-2.0, -0.7, -8.0]],
|
|
9
|
+
"expected_transitions": [6, null],
|
|
10
|
+
"first_passage_probabilities": [3, 1, null],
|
|
11
|
+
"first_passage_reward": [21, 1, 0, [-4.4, 7.5, 4.8]],
|
|
12
|
+
"hitting_probabilities": [null],
|
|
13
|
+
"hitting_times": [null],
|
|
14
|
+
"mean_absorption_times": null,
|
|
15
|
+
"mean_first_passage_times_between": [0, 2],
|
|
16
|
+
"mean_first_passage_times_to": null,
|
|
17
|
+
"mean_number_visits": null,
|
|
18
|
+
"mean_recurrence_times": null,
|
|
19
|
+
"mixing_time": [null, 3, "natural"],
|
|
20
|
+
"next_state": [1, false, 7331],
|
|
21
|
+
"time_correlations": [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], null, [1, 10, 100]],
|
|
22
|
+
"time_relaxations": [[0, 1, 1, 1, 1, 0], null, [1, 10, 100]],
|
|
23
|
+
"to_bounded_chain": ["absorbing"],
|
|
24
|
+
"to_canonical_form": null,
|
|
25
|
+
"to_lazy_chain": [0.6],
|
|
26
|
+
"to_nth_order": [3],
|
|
27
|
+
"to_subchain": [[1, 2]]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"p": [[0.70, 0.15, 0.15], [0.15, 0.70, 0.15], [0.15, 0.15, 0.70]],
|
|
32
|
+
"params": {
|
|
33
|
+
"committor_probabilities": ["backward", 0, 2],
|
|
34
|
+
"conditional_probabilities": [0],
|
|
35
|
+
"expected_rewards": [12, [1.4, 0.0, -6.1]],
|
|
36
|
+
"expected_transitions": [32, [0.1, 0.45, 0.45]],
|
|
37
|
+
"first_passage_probabilities": [7, 0, [1, 2]],
|
|
38
|
+
"first_passage_reward": [18, 1, 2, [-1.9, 8.9, 0.0]],
|
|
39
|
+
"hitting_probabilities": [null],
|
|
40
|
+
"hitting_times": [null],
|
|
41
|
+
"mean_absorption_times": null,
|
|
42
|
+
"mean_first_passage_times_between": [0, 1],
|
|
43
|
+
"mean_first_passage_times_to": null,
|
|
44
|
+
"mean_number_visits": null,
|
|
45
|
+
"mean_recurrence_times": null,
|
|
46
|
+
"mixing_time": [null, 12, "traditional"],
|
|
47
|
+
"next_state": [1, false, 7331],
|
|
48
|
+
"time_correlations": [[0, 0, 0, 1, 2, 2, 2, 2, 2], null, 50],
|
|
49
|
+
"time_relaxations": [[0, 1, 1, 1, 1, 0], null, 50],
|
|
50
|
+
"to_bounded_chain": ["reflecting"],
|
|
51
|
+
"to_canonical_form": null,
|
|
52
|
+
"to_lazy_chain": [[0.1, 0.2, 0.1]],
|
|
53
|
+
"to_nth_order": [6],
|
|
54
|
+
"to_subchain": [[0, 2]]
|
|
55
|
+
}
|
|
56
|
+
} ,
|
|
57
|
+
{
|
|
58
|
+
"p": [[0.0, 1.0, 0.0, 0.0, 0.0, 0.0], [0.1, 0.8, 0.0, 0.1, 0.0, 0.0], [0.3, 0.0, 0.3, 0.2, 0.2, 0.0], [0.5, 0.0, 0.0, 0.0, 0.0, 0.5], [0.2, 0.2, 0.2, 0.0, 0.2, 0.2], [0.0, 0.0, 0.0, 0.0, 0.0, 1.0]],
|
|
59
|
+
"params": {
|
|
60
|
+
"committor_probabilities": ["forward", 3, 5],
|
|
61
|
+
"conditional_probabilities": [4],
|
|
62
|
+
"expected_rewards": [1, [-0.4, 0.0, -3.9, 2.1, 3.6, 0.0]],
|
|
63
|
+
"expected_transitions": [9, null],
|
|
64
|
+
"first_passage_probabilities": [3, 0, [1, 2, 5]],
|
|
65
|
+
"first_passage_reward": [12, 0, [1, 4], [2.3, 3.2, 0.0, 2.1, 5.5, -9.2]],
|
|
66
|
+
"hitting_probabilities": [[2, 3]],
|
|
67
|
+
"hitting_times": [[0, 1, 2]],
|
|
68
|
+
"mean_absorption_times": null,
|
|
69
|
+
"mean_first_passage_times_between": [[0, 2], [1, 3]],
|
|
70
|
+
"mean_first_passage_times_to": [[0, 3, 4]],
|
|
71
|
+
"mean_number_visits": null,
|
|
72
|
+
"mean_recurrence_times": null,
|
|
73
|
+
"next_state": [1, false, 7331],
|
|
74
|
+
"mixing_time": [[0.4, 0.0, 0.2, 0.2, 0.2, 0.0], 5, "natural"],
|
|
75
|
+
"time_correlations": [[0, 1, 1, 1, 1, 0], [2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 2, 3, 4, 5]],
|
|
76
|
+
"time_relaxations": [[0, 1, 1, 1, 1, 0], [0.0, 0.0, 0.8, 0.0, 0.0, 0.2], [0, 1, 2, 3, 4, 5]],
|
|
77
|
+
"to_bounded_chain": [0.75],
|
|
78
|
+
"to_canonical_form": null,
|
|
79
|
+
"to_lazy_chain": [0.1],
|
|
80
|
+
"to_nth_order": [2],
|
|
81
|
+
"to_subchain": [[1, 2, 3]]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"aliased_properties_data": [
|
|
86
|
+
{
|
|
87
|
+
"p": [[1.0, 0.0], [0.0, 1.0]]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"p": [[0.0, 0.0, 1.0], [0.15, 0.70, 0.15], [0.0, 0.0, 1.0]]
|
|
91
|
+
} ,
|
|
92
|
+
{
|
|
93
|
+
"p": [[0.3, 0.4, 0.3], [0.6, 0.2, 0.2], [0.2, 0.7, 0.1]]
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
96
|
}
|