diff --git a/.gitignore b/.gitignore index 01cdb07..5b20a7b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ __pycache__ ./data/ ./venv/ ./PyCTBN/.scannerwork +./results/ diff --git a/PyCTBN.egg-info/PKG-INFO b/PyCTBN.egg-info/PKG-INFO deleted file mode 100644 index 53ed588..0000000 --- a/PyCTBN.egg-info/PKG-INFO +++ /dev/null @@ -1,10 +0,0 @@ -Metadata-Version: 1.0 -Name: PyCTBN -Version: 1.0 -Summary: A Continuous Time Bayesian Network Library -Home-page: https://github.com/philipMartini/CTBN_Project -Author: Filippo Martini -Author-email: f.martini@campus.unimib.it -License: MIT -Description: # CTBN_Project -Platform: UNKNOWN diff --git a/PyCTBN.egg-info/SOURCES.txt b/PyCTBN.egg-info/SOURCES.txt deleted file mode 100644 index 69228f4..0000000 --- a/PyCTBN.egg-info/SOURCES.txt +++ /dev/null @@ -1,22 +0,0 @@ -README.md -setup.py -PyCTBN.egg-info/PKG-INFO -PyCTBN.egg-info/SOURCES.txt -PyCTBN.egg-info/dependency_links.txt -PyCTBN.egg-info/not-zip-safe -PyCTBN.egg-info/requires.txt -PyCTBN.egg-info/top_level.txt -classes/__init__.py -classes/abstract_importer.py -classes/cache.py -classes/conditional_intensity_matrix.py -classes/json_importer.py -classes/json_importer_mod.py -classes/network_graph.py -classes/parameters_estimator.py -classes/sample_path.py -classes/set_of_cims.py -classes/simple_cvs_importer.py -classes/structure.py -classes/structure_estimator.py -classes/trajectory.py \ No newline at end of file diff --git a/PyCTBN.egg-info/dependency_links.txt b/PyCTBN.egg-info/dependency_links.txt deleted file mode 100644 index 3e47e43..0000000 --- a/PyCTBN.egg-info/dependency_links.txt +++ /dev/null @@ -1,3 +0,0 @@ -https://github.com/numpy/numpy -https://github.com/pandas-dev/pandas -https://github.com/networkx/networkx diff --git a/PyCTBN.egg-info/not-zip-safe b/PyCTBN.egg-info/not-zip-safe deleted file mode 100644 index 8b13789..0000000 --- a/PyCTBN.egg-info/not-zip-safe +++ /dev/null @@ -1 +0,0 @@ - diff --git a/PyCTBN.egg-info/requires.txt b/PyCTBN.egg-info/requires.txt deleted file mode 100644 index 46d8b85..0000000 --- a/PyCTBN.egg-info/requires.txt +++ /dev/null @@ -1,3 +0,0 @@ -numpy -pandas -networkx diff --git a/PyCTBN.egg-info/top_level.txt b/PyCTBN.egg-info/top_level.txt deleted file mode 100644 index 90b07e9..0000000 --- a/PyCTBN.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -classes diff --git a/PyCTBN/.scannerwork/.sonar_lock b/PyCTBN/.scannerwork/.sonar_lock deleted file mode 100644 index e69de29..0000000 diff --git a/PyCTBN/.scannerwork/report-task.txt b/PyCTBN/.scannerwork/report-task.txt deleted file mode 100644 index 5394593..0000000 --- a/PyCTBN/.scannerwork/report-task.txt +++ /dev/null @@ -1,6 +0,0 @@ -projectKey=Ctbn_Project -serverUrl=http://localhost:9000 -serverVersion=8.4.1.35646 -dashboardUrl=http://localhost:9000/dashboard?id=Ctbn_Project -ceTaskId=AXPs4gCNB9mzoAo2hiLI -ceTaskUrl=http://localhost:9000/api/ce/task?id=AXPs4gCNB9mzoAo2hiLI diff --git a/PyCTBN/PyCTBN/__init__.py b/PyCTBN/PyCTBN/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/PyCTBN/__init__.py b/PyCTBN/__init__.py index e69de29..80a6111 100644 --- a/PyCTBN/__init__.py +++ b/PyCTBN/__init__.py @@ -0,0 +1,2 @@ +import PyCTBN.classes +from PyCTBN.classes import * diff --git a/PyCTBN/classes/__init__.py b/PyCTBN/classes/__init__.py new file mode 100644 index 0000000..b987b5b --- /dev/null +++ b/PyCTBN/classes/__init__.py @@ -0,0 +1,11 @@ +from .json_importer import JsonImporter +from .abstract_importer import AbstractImporter +from .network_graph import NetworkGraph +from .sample_path import SamplePath +from .parameters_estimator import ParametersEstimator +from .structure import Structure +from .structure_estimator import StructureEstimator +from .trajectory import Trajectory +from .conditional_intensity_matrix import ConditionalIntensityMatrix +from .cache import Cache +from .set_of_cims import SetOfCims \ No newline at end of file diff --git a/PyCTBN/PyCTBN/abstract_importer.py b/PyCTBN/classes/abstract_importer.py similarity index 100% rename from PyCTBN/PyCTBN/abstract_importer.py rename to PyCTBN/classes/abstract_importer.py diff --git a/PyCTBN/PyCTBN/cache.py b/PyCTBN/classes/cache.py similarity index 100% rename from PyCTBN/PyCTBN/cache.py rename to PyCTBN/classes/cache.py diff --git a/PyCTBN/PyCTBN/conditional_intensity_matrix.py b/PyCTBN/classes/conditional_intensity_matrix.py similarity index 100% rename from PyCTBN/PyCTBN/conditional_intensity_matrix.py rename to PyCTBN/classes/conditional_intensity_matrix.py diff --git a/PyCTBN/PyCTBN/json_importer.py b/PyCTBN/classes/json_importer.py similarity index 100% rename from PyCTBN/PyCTBN/json_importer.py rename to PyCTBN/classes/json_importer.py diff --git a/PyCTBN/PyCTBN/network_graph.py b/PyCTBN/classes/network_graph.py similarity index 100% rename from PyCTBN/PyCTBN/network_graph.py rename to PyCTBN/classes/network_graph.py diff --git a/PyCTBN/PyCTBN/parameters_estimator.py b/PyCTBN/classes/parameters_estimator.py similarity index 100% rename from PyCTBN/PyCTBN/parameters_estimator.py rename to PyCTBN/classes/parameters_estimator.py diff --git a/PyCTBN/PyCTBN/sample_path.py b/PyCTBN/classes/sample_path.py similarity index 91% rename from PyCTBN/PyCTBN/sample_path.py rename to PyCTBN/classes/sample_path.py index 2fc8c1f..2f7fe9b 100644 --- a/PyCTBN/PyCTBN/sample_path.py +++ b/PyCTBN/classes/sample_path.py @@ -19,11 +19,9 @@ class SamplePath(object): """Constructor Method """ self._importer = importer - if (self._importer._df_variables is None or self._importer._df_structure is None - or self._importer._concatenated_samples is None): + if (self._importer._df_variables is None or self._importer._concatenated_samples is None): raise RuntimeError('The importer object has to contain the all processed data!') - if(self._importer._df_variables.empty or self._importer._df_structure.empty - or self._importer._concatenated_samples.empty): + if(self._importer._df_variables.empty or self._importer._concatenated_samples.empty): raise RuntimeError('The importer object has to contain the all processed data!') self._trajectories = None self._structure = None @@ -49,7 +47,10 @@ class SamplePath(object): labels = self._importer.variables.iloc[:, 0].to_list() indxs = self._importer.variables.index.to_numpy() vals = self._importer.variables.iloc[:, 1].to_numpy() - edges = list(self._importer.structure.to_records(index=False)) + if self._importer.structure is None or self._importer.structure.empty: + edges = [] + else: + edges = list(self._importer.structure.to_records(index=False)) self._structure = Structure(labels, indxs, vals, edges, self._total_variables_count) diff --git a/PyCTBN/PyCTBN/set_of_cims.py b/PyCTBN/classes/set_of_cims.py similarity index 100% rename from PyCTBN/PyCTBN/set_of_cims.py rename to PyCTBN/classes/set_of_cims.py diff --git a/PyCTBN/PyCTBN/structure.py b/PyCTBN/classes/structure.py similarity index 100% rename from PyCTBN/PyCTBN/structure.py rename to PyCTBN/classes/structure.py diff --git a/PyCTBN/PyCTBN/structure_estimator.py b/PyCTBN/classes/structure_estimator.py similarity index 100% rename from PyCTBN/PyCTBN/structure_estimator.py rename to PyCTBN/classes/structure_estimator.py diff --git a/PyCTBN/PyCTBN/trajectory.py b/PyCTBN/classes/trajectory.py similarity index 100% rename from PyCTBN/PyCTBN/trajectory.py rename to PyCTBN/classes/trajectory.py diff --git a/PyCTBN/deprecated/simple_cvs_importer.py b/PyCTBN/deprecated/simple_cvs_importer.py index 1b63c17..e53f7ac 100644 --- a/PyCTBN/deprecated/simple_cvs_importer.py +++ b/PyCTBN/deprecated/simple_cvs_importer.py @@ -3,8 +3,8 @@ import glob import os import typing -from PyCTBN.PyCTBN.abstract_importer import AbstractImporter -from PyCTBN.PyCTBN.sample_path import SamplePath +from PyCTBN.classes.abstract_importer import AbstractImporter +from PyCTBN.classes.sample_path import SamplePath class CSVImporter(AbstractImporter): diff --git a/PyCTBN/tests/original_ctpc_algorithm.py b/PyCTBN/tests/original_ctpc_algorithm.py index 1a9456c..e63154b 100644 --- a/PyCTBN/tests/original_ctpc_algorithm.py +++ b/PyCTBN/tests/original_ctpc_algorithm.py @@ -9,7 +9,7 @@ from scipy.stats import chi2 as chi2_dist from scipy.stats import f as f_dist from tqdm import tqdm -from PyCTBN.PyCTBN.abstract_importer import AbstractImporter +from PyCTBN.classes.abstract_importer import AbstractImporter class OriginalCTPCAlgorithm(AbstractImporter): diff --git a/PyCTBN/tests/performance_comparisons.py b/PyCTBN/tests/performance_comparisons.py index cc93f1c..08b6d1f 100644 --- a/PyCTBN/tests/performance_comparisons.py +++ b/PyCTBN/tests/performance_comparisons.py @@ -7,9 +7,9 @@ import networkx as nx import timeit import psutil -from ..PyCTBN.sample_path import SamplePath -from ..PyCTBN.structure_estimator import StructureEstimator -from ..PyCTBN.json_importer import JsonImporter +from ..classes.sample_path import SamplePath +from ..classes.structure_estimator import StructureEstimator +from ..classes.json_importer import JsonImporter from .original_ctpc_algorithm import OriginalCTPCAlgorithm diff --git a/PyCTBN/tests/test_cache.py b/PyCTBN/tests/test_cache.py index 7cb6706..8aa6900 100644 --- a/PyCTBN/tests/test_cache.py +++ b/PyCTBN/tests/test_cache.py @@ -2,8 +2,8 @@ import unittest import numpy as np -from ..PyCTBN.cache import Cache -from ..PyCTBN.set_of_cims import SetOfCims +from ..classes.cache import Cache +from ..classes.set_of_cims import SetOfCims class TestCache(unittest.TestCase): diff --git a/PyCTBN/tests/test_cim.py b/PyCTBN/tests/test_cim.py index e3228db..f1c2447 100644 --- a/PyCTBN/tests/test_cim.py +++ b/PyCTBN/tests/test_cim.py @@ -2,7 +2,7 @@ import unittest import numpy as np -from ..PyCTBN.conditional_intensity_matrix import ConditionalIntensityMatrix +from ..classes.conditional_intensity_matrix import ConditionalIntensityMatrix class TestConditionalIntensityMatrix(unittest.TestCase): diff --git a/PyCTBN/tests/test_json_importer.py b/PyCTBN/tests/test_json_importer.py index 2ac1baa..fde0067 100644 --- a/PyCTBN/tests/test_json_importer.py +++ b/PyCTBN/tests/test_json_importer.py @@ -7,7 +7,7 @@ import pandas as pd import json -from ..PyCTBN.json_importer import JsonImporter +from ..classes.json_importer import JsonImporter class TestJsonImporter(unittest.TestCase): diff --git a/PyCTBN/tests/test_networkgraph.py b/PyCTBN/tests/test_networkgraph.py index f9794a4..2f2cc66 100644 --- a/PyCTBN/tests/test_networkgraph.py +++ b/PyCTBN/tests/test_networkgraph.py @@ -6,9 +6,9 @@ import networkx as nx import numpy as np import itertools -from ..PyCTBN.sample_path import SamplePath -from ..PyCTBN.network_graph import NetworkGraph -from ..PyCTBN.json_importer import JsonImporter +from ..classes.sample_path import SamplePath +from ..classes.network_graph import NetworkGraph +from ..classes.json_importer import JsonImporter class TestNetworkGraph(unittest.TestCase): diff --git a/PyCTBN/tests/test_parameters_estimator.py b/PyCTBN/tests/test_parameters_estimator.py index 38994b9..640ddd8 100644 --- a/PyCTBN/tests/test_parameters_estimator.py +++ b/PyCTBN/tests/test_parameters_estimator.py @@ -4,11 +4,11 @@ import numpy as np import glob import os -from ..PyCTBN.network_graph import NetworkGraph -from ..PyCTBN.sample_path import SamplePath -from ..PyCTBN.set_of_cims import SetOfCims -from ..PyCTBN.parameters_estimator import ParametersEstimator -from ..PyCTBN.json_importer import JsonImporter +from ..classes.network_graph import NetworkGraph +from ..classes.sample_path import SamplePath +from ..classes.set_of_cims import SetOfCims +from ..classes.parameters_estimator import ParametersEstimator +from ..classes.json_importer import JsonImporter class TestParametersEstimatior(unittest.TestCase): diff --git a/PyCTBN/tests/test_sample_path.py b/PyCTBN/tests/test_sample_path.py index 4286bac..f61fe72 100644 --- a/PyCTBN/tests/test_sample_path.py +++ b/PyCTBN/tests/test_sample_path.py @@ -4,10 +4,10 @@ import glob import os import random -from ..PyCTBN.json_importer import JsonImporter -from ..PyCTBN.sample_path import SamplePath -from ..PyCTBN.trajectory import Trajectory -from ..PyCTBN.structure import Structure +from ..classes.json_importer import JsonImporter +from ..classes.sample_path import SamplePath +from ..classes.trajectory import Trajectory +from ..classes.structure import Structure class TestSamplePath(unittest.TestCase): @@ -57,6 +57,16 @@ class TestSamplePath(unittest.TestCase): random.shuffle(importer._sorter) self.assertRaises(RuntimeError, s1.build_structure) + def test_build_saplepath_no_prior_net_structure(self): + importer = JsonImporter(self.read_files[0], 'samples', 'dyn.str', 'variables', 'Time', 'Name') + importer.import_data(0) + importer._df_structure = None + s1 = SamplePath(importer) + s1.build_trajectories() + s1.build_structure() + self.assertFalse(s1.structure.edges) + + if __name__ == '__main__': unittest.main() diff --git a/PyCTBN/tests/test_setofcims.py b/PyCTBN/tests/test_setofcims.py index daed9f0..abcd6a2 100644 --- a/PyCTBN/tests/test_setofcims.py +++ b/PyCTBN/tests/test_setofcims.py @@ -3,7 +3,7 @@ import unittest import numpy as np import itertools -from ..PyCTBN.set_of_cims import SetOfCims +from ..classes.set_of_cims import SetOfCims class TestSetOfCims(unittest.TestCase): diff --git a/PyCTBN/tests/test_structure.py b/PyCTBN/tests/test_structure.py index b6b4493..19f892e 100644 --- a/PyCTBN/tests/test_structure.py +++ b/PyCTBN/tests/test_structure.py @@ -1,7 +1,7 @@ import unittest import numpy as np -from ..PyCTBN.structure import Structure +from ..classes.structure import Structure class TestStructure(unittest.TestCase): diff --git a/PyCTBN/tests/test_structure_estimator.py b/PyCTBN/tests/test_structure_estimator.py index e3d63d7..5e98fa0 100644 --- a/PyCTBN/tests/test_structure_estimator.py +++ b/PyCTBN/tests/test_structure_estimator.py @@ -8,10 +8,10 @@ import networkx as nx import numpy as np import timeit -from ..PyCTBN.cache import Cache -from ..PyCTBN.sample_path import SamplePath -from ..PyCTBN.structure_estimator import StructureEstimator -from ..PyCTBN.json_importer import JsonImporter +from ..classes.cache import Cache +from ..classes.sample_path import SamplePath +from ..classes.structure_estimator import StructureEstimator +from ..classes.json_importer import JsonImporter class TestStructureEstimator(unittest.TestCase): diff --git a/PyCTBN/tests/test_trajectory.py b/PyCTBN/tests/test_trajectory.py index f826632..6c3d808 100644 --- a/PyCTBN/tests/test_trajectory.py +++ b/PyCTBN/tests/test_trajectory.py @@ -2,7 +2,7 @@ import unittest import numpy as np -from ..PyCTBN.trajectory import Trajectory +from ..classes.trajectory import Trajectory class TestTrajectory(unittest.TestCase): diff --git a/dist/PyCTBN-1.0.tar.gz b/dist/PyCTBN-1.0.tar.gz deleted file mode 100644 index 439cde6..0000000 Binary files a/dist/PyCTBN-1.0.tar.gz and /dev/null differ diff --git a/documentation/PyCTBN.rst b/documentation/PyCTBN.rst deleted file mode 100644 index a41536a..0000000 --- a/documentation/PyCTBN.rst +++ /dev/null @@ -1,101 +0,0 @@ -PyCTBN package -============== - -Submodules ----------- - -PyCTBN.abstract\_importer module --------------------------------- - -.. automodule:: PyCTBN.abstract_importer - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.cache module -------------------- - -.. automodule:: PyCTBN.cache - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.conditional\_intensity\_matrix module --------------------------------------------- - -.. automodule:: PyCTBN.conditional_intensity_matrix - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.json\_importer module ----------------------------- - -.. automodule:: PyCTBN.json_importer - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.network\_graph module ----------------------------- - -.. automodule:: PyCTBN.network_graph - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.parameters\_estimator module ------------------------------------ - -.. automodule:: PyCTBN.parameters_estimator - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.sample\_path module --------------------------- - -.. automodule:: PyCTBN.sample_path - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.set\_of\_cims module ---------------------------- - -.. automodule:: PyCTBN.set_of_cims - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.structure module ------------------------ - -.. automodule:: PyCTBN.structure - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.structure\_estimator module ----------------------------------- - -.. automodule:: PyCTBN.structure_estimator - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.trajectory module ------------------------- - -.. automodule:: PyCTBN.trajectory - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: PyCTBN - :members: - :undoc-members: - :show-inheritance: diff --git a/documentation/_build/doctrees/PyCTBN.doctree b/documentation/_build/doctrees/PyCTBN.doctree deleted file mode 100644 index 94c9ec4..0000000 Binary files a/documentation/_build/doctrees/PyCTBN.doctree and /dev/null differ diff --git a/documentation/_build/doctrees/environment.pickle b/documentation/_build/doctrees/environment.pickle deleted file mode 100644 index aea8734..0000000 Binary files a/documentation/_build/doctrees/environment.pickle and /dev/null differ diff --git a/documentation/_build/html/_sources/PyCTBN.rst.txt b/documentation/_build/html/_sources/PyCTBN.rst.txt deleted file mode 100644 index a41536a..0000000 --- a/documentation/_build/html/_sources/PyCTBN.rst.txt +++ /dev/null @@ -1,101 +0,0 @@ -PyCTBN package -============== - -Submodules ----------- - -PyCTBN.abstract\_importer module --------------------------------- - -.. automodule:: PyCTBN.abstract_importer - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.cache module -------------------- - -.. automodule:: PyCTBN.cache - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.conditional\_intensity\_matrix module --------------------------------------------- - -.. automodule:: PyCTBN.conditional_intensity_matrix - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.json\_importer module ----------------------------- - -.. automodule:: PyCTBN.json_importer - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.network\_graph module ----------------------------- - -.. automodule:: PyCTBN.network_graph - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.parameters\_estimator module ------------------------------------ - -.. automodule:: PyCTBN.parameters_estimator - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.sample\_path module --------------------------- - -.. automodule:: PyCTBN.sample_path - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.set\_of\_cims module ---------------------------- - -.. automodule:: PyCTBN.set_of_cims - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.structure module ------------------------ - -.. automodule:: PyCTBN.structure - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.structure\_estimator module ----------------------------------- - -.. automodule:: PyCTBN.structure_estimator - :members: - :undoc-members: - :show-inheritance: - -PyCTBN.trajectory module ------------------------- - -.. automodule:: PyCTBN.trajectory - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: PyCTBN - :members: - :undoc-members: - :show-inheritance: diff --git a/documentation/_build/html/genindex.html b/documentation/_build/html/genindex.html deleted file mode 100644 index 3ebecb1..0000000 --- a/documentation/_build/html/genindex.html +++ /dev/null @@ -1,665 +0,0 @@ - - - - - - - - - - - Index — PyCTBN 1.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
-
-
-
-
- -
-
- - - - - - - - - - - - -
- -
- -
- -

Index

- -
- A - | B - | C - | D - | E - | F - | G - | I - | J - | M - | N - | O - | P - | R - | S - | T - | V - -
-

A

- - - -
- -

B

- - - -
- -

C

- - - -
- -

D

- - -
- -

E

- - -
- -

F

- - - -
- -

G

- - - -
- -

I

- - - -
- -

J

- - -
- -

M

- - -
- -

N

- - - -
- -

O

- - - -
- -

P

- - - -
    -
  • - PyCTBN.network_graph - -
  • -
  • - PyCTBN.parameters_estimator - -
  • -
  • - PyCTBN.sample_path - -
  • -
  • - PyCTBN.set_of_cims - -
  • -
  • - PyCTBN.structure - -
  • -
  • - PyCTBN.structure_estimator - -
  • -
  • - PyCTBN.trajectory - -
  • -
- -

R

- - -
- -

S

- - - -
- -

T

- - - -
- -

V

- - -
- - - -
-
- - -
- -
-

- © Copyright 2020, Alessandro Bregoli, Filippo Martini. -

-
- - Built with Sphinx using a theme provided by Porão do Juca. - -
-
-
- - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/documentation/_build/html/objects.inv b/documentation/_build/html/objects.inv deleted file mode 100644 index 46976fa..0000000 Binary files a/documentation/_build/html/objects.inv and /dev/null differ diff --git a/documentation/_build/html/searchindex.js b/documentation/_build/html/searchindex.js deleted file mode 100644 index 4b24da6..0000000 --- a/documentation/_build/html/searchindex.js +++ /dev/null @@ -1 +0,0 @@ -Search.setIndex({docnames:["PyCTBN","examples","index","modules"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["PyCTBN.rst","examples.rst","index.rst","modules.rst"],objects:{"":{PyCTBN:[0,0,0,"-"]},"PyCTBN.abstract_importer":{AbstractImporter:[0,1,1,""]},"PyCTBN.abstract_importer.AbstractImporter":{build_list_of_samples_array:[0,2,1,""],build_sorter:[0,2,1,""],clear_concatenated_frame:[0,2,1,""],compute_row_delta_in_all_samples_frames:[0,2,1,""],compute_row_delta_sigle_samples_frame:[0,2,1,""],concatenated_samples:[0,2,1,""],dataset_id:[0,2,1,""],file_path:[0,2,1,""],sorter:[0,2,1,""],structure:[0,2,1,""],variables:[0,2,1,""]},"PyCTBN.cache":{Cache:[0,1,1,""]},"PyCTBN.cache.Cache":{clear:[0,2,1,""],find:[0,2,1,""],put:[0,2,1,""]},"PyCTBN.conditional_intensity_matrix":{ConditionalIntensityMatrix:[0,1,1,""]},"PyCTBN.conditional_intensity_matrix.ConditionalIntensityMatrix":{cim:[0,2,1,""],compute_cim_coefficients:[0,2,1,""],state_residence_times:[0,2,1,""],state_transition_matrix:[0,2,1,""]},"PyCTBN.json_importer":{JsonImporter:[0,1,1,""]},"PyCTBN.json_importer.JsonImporter":{build_sorter:[0,2,1,""],clear_data_frame_list:[0,2,1,""],dataset_id:[0,2,1,""],import_data:[0,2,1,""],import_sampled_cims:[0,2,1,""],import_structure:[0,2,1,""],import_trajectories:[0,2,1,""],import_variables:[0,2,1,""],normalize_trajectories:[0,2,1,""],one_level_normalizing:[0,2,1,""],read_json_file:[0,2,1,""]},"PyCTBN.network_graph":{NetworkGraph:[0,1,1,""]},"PyCTBN.network_graph.NetworkGraph":{add_edges:[0,2,1,""],add_nodes:[0,2,1,""],build_p_comb_structure_for_a_node:[0,2,1,""],build_time_columns_filtering_for_a_node:[0,2,1,""],build_time_scalar_indexing_structure_for_a_node:[0,2,1,""],build_transition_filtering_for_a_node:[0,2,1,""],build_transition_scalar_indexing_structure_for_a_node:[0,2,1,""],edges:[0,2,1,""],fast_init:[0,2,1,""],get_node_indx:[0,2,1,""],get_ordered_by_indx_set_of_parents:[0,2,1,""],get_parents_by_id:[0,2,1,""],get_positional_node_indx:[0,2,1,""],get_states_number:[0,2,1,""],nodes:[0,2,1,""],nodes_indexes:[0,2,1,""],nodes_values:[0,2,1,""],p_combs:[0,2,1,""],time_filtering:[0,2,1,""],time_scalar_indexing_strucure:[0,2,1,""],transition_filtering:[0,2,1,""],transition_scalar_indexing_structure:[0,2,1,""]},"PyCTBN.parameters_estimator":{ParametersEstimator:[0,1,1,""]},"PyCTBN.parameters_estimator.ParametersEstimator":{compute_parameters_for_node:[0,2,1,""],compute_state_res_time_for_node:[0,2,1,""],compute_state_transitions_for_a_node:[0,2,1,""],fast_init:[0,2,1,""]},"PyCTBN.sample_path":{SamplePath:[0,1,1,""]},"PyCTBN.sample_path.SamplePath":{build_structure:[0,2,1,""],build_trajectories:[0,2,1,""],structure:[0,2,1,""],total_variables_count:[0,2,1,""],trajectories:[0,2,1,""]},"PyCTBN.set_of_cims":{SetOfCims:[0,1,1,""]},"PyCTBN.set_of_cims.SetOfCims":{actual_cims:[0,2,1,""],build_cims:[0,2,1,""],build_times_and_transitions_structures:[0,2,1,""],filter_cims_with_mask:[0,2,1,""],get_cims_number:[0,2,1,""],p_combs:[0,2,1,""]},"PyCTBN.structure":{Structure:[0,1,1,""]},"PyCTBN.structure.Structure":{edges:[0,2,1,""],get_node_id:[0,2,1,""],get_node_indx:[0,2,1,""],get_positional_node_indx:[0,2,1,""],get_states_number:[0,2,1,""],nodes_indexes:[0,2,1,""],nodes_labels:[0,2,1,""],nodes_values:[0,2,1,""],total_variables_number:[0,2,1,""]},"PyCTBN.structure_estimator":{StructureEstimator:[0,1,1,""]},"PyCTBN.structure_estimator.StructureEstimator":{adjacency_matrix:[0,2,1,""],build_complete_graph:[0,2,1,""],complete_test:[0,2,1,""],ctpc_algorithm:[0,2,1,""],generate_possible_sub_sets_of_size:[0,2,1,""],independence_test:[0,2,1,""],one_iteration_of_CTPC_algorithm:[0,2,1,""],save_results:[0,2,1,""]},"PyCTBN.trajectory":{Trajectory:[0,1,1,""]},"PyCTBN.trajectory.Trajectory":{complete_trajectory:[0,2,1,""],size:[0,2,1,""],times:[0,2,1,""],trajectory:[0,2,1,""]},PyCTBN:{abstract_importer:[0,0,0,"-"],cache:[0,0,0,"-"],conditional_intensity_matrix:[0,0,0,"-"],json_importer:[0,0,0,"-"],network_graph:[0,0,0,"-"],parameters_estimator:[0,0,0,"-"],sample_path:[0,0,0,"-"],set_of_cims:[0,0,0,"-"],structure:[0,0,0,"-"],structure_estimator:[0,0,0,"-"],trajectory:[0,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method"},terms:{"abstract":[0,1],"boolean":0,"class":[0,1],"float":0,"import":[0,2],"int":0,"null":0,"return":[0,1],"super":1,"true":[0,1],"var":1,HAS:0,Has:0,NOT:0,The:[0,1],Use:1,__init__:1,_actual_cach:0,_actual_cim:0,_actual_trajectori:0,_aggregated_info_about_nodes_par:0,_array_indx:0,_cach:0,_cim:0,_complete_graph:0,_concatenated_sampl:0,_df_samples_list:[0,1],_df_structur:[0,1],_df_variabl:[0,1],_file_path:1,_graph:[0,1],_import:0,_list_of_sets_of_par:0,_net_graph:0,_node:0,_node_id:0,_nodes_indx:0,_nodes_v:0,_p_combs_structur:0,_raw_data:0,_sample_path:0,_single_set_of_cim:0,_sorter:[0,1],_state_residence_tim:0,_structur:0,_structure_label:0,_time:0,_time_filt:0,_time_scalar_indexing_structur:0,_total_variables_count:0,_trajectori:0,_transition_filt:0,_transition_matric:0,_transition_scalar_indexing_structur:0,_variables_label:0,abc:0,about:0,abstract_import:[1,2,3],abstractimport:[0,1],act:0,actual:0,actual_cim:[0,1],add:0,add_edg:0,add_nod:0,added:0,addit:0,adjac:[0,1],adjacency_matrix:[0,1],after:0,aggreg:0,algorithm:[0,1],all:[0,1],alreadi:1,also:0,anoth:0,append:0,arc:0,arrai:[0,1],axi:1,base:0,belong:0,between:0,bool:0,both:0,bound:0,build:[0,1],build_cim:0,build_complete_graph:0,build_list_of_samples_arrai:0,build_p_comb_structure_for_a_nod:0,build_sort:[0,1],build_structur:[0,1],build_time_columns_filtering_for_a_nod:0,build_time_scalar_indexing_structure_for_a_nod:0,build_times_and_transitions_structur:0,build_trajectori:[0,1],build_transition_filtering_for_a_nod:0,build_transition_scalar_indexing_structure_for_a_nod:0,built:0,cach:[2,3],call:[0,1],cardin:0,cardinalit:0,caridin:0,caridinalit:0,chang:0,chi:0,chi_test:0,chi_test_alfa:0,child:0,child_states_numb:0,cim1:0,cim2:0,cim:[0,1],cims_kei:0,clear:0,clear_concatenated_fram:0,clear_data_frame_list:0,coeffici:0,col:0,cols_filt:0,column:[0,1],columns_head:0,comb:0,combin:0,combinatori:0,common:0,complet:0,complete_test:0,complete_trajectori:0,comput:[0,1],compute_cim_coeffici:0,compute_parameters_for_nod:[0,1],compute_row_delta_in_all_samples_fram:[0,1],compute_row_delta_sigle_samples_fram:0,compute_state_res_time_for_nod:0,compute_state_transitions_for_a_nod:0,concatanated_sampl:0,concaten:0,concatenated_sampl:0,condit:0,conditional_intensity_matrix:[2,3],conditionalintensitymatrix:0,consid:0,construct:[0,1],conta:0,contain:0,content:[2,3],convert:0,copi:0,core:0,correct:0,count:0,creat:[0,1],csv:1,csvimport:1,ctpc:[0,1],ctpc_algorithm:[0,1],current:0,cut:0,dafram:0,data:[0,2],data_fram:0,datafram:[0,1],dataset:0,dataset_id:[0,1],datfram:0,def:1,definit:0,delta:0,demonstr:1,desir:0,df_samples_list:0,dict:[0,1],dictionari:0,differ:0,digraph:0,dimens:0,dir:1,direct:0,doc:0,doubl:0,drop:1,duplic:0,dyn:1,each:0,edg:[0,1],edges_list:0,end:0,entir:0,equal:0,est:1,estim:[0,2],everi:0,exam:1,exampl:[0,2],exclud:0,exctract:0,exp_test_alfa:0,exponenti:0,expos:0,extend:1,extens:0,extract:0,fals:0,fast_init:[0,1],file:[0,1],file_path:[0,1],filepath:0,fill:[0,1],filter:0,filter_cims_with_mask:0,find:0,first:[0,1],follow:0,form:0,format:1,found:0,frame:0,from:[0,1],from_nod:0,gener:0,generate_possible_sub_sets_of_s:0,get_cims_numb:0,get_node_id:0,get_node_indx:0,get_ordered_by_indx_set_of_par:0,get_parents_by_id:0,get_positional_node_indx:0,get_states_numb:0,given:0,glob:1,graph:[0,1],graph_struct:0,grid:0,grpah:1,has:[0,1],have:0,header:0,hold:0,hypothesi:0,identifi:0,iff:0,implement:[0,2],import_data:[0,1],import_sampled_cim:0,import_structur:[0,1],import_trajectori:0,import_vari:[0,1],independ:0,independence_test:0,index:[0,1,2],indic:0,indx:0,info:[0,1],inform:0,init:1,initi:[0,1],inplac:1,input:0,insid:1,instal:2,interest:0,intes:0,iter:0,join:1,json:[0,1],json_import:[1,2,3],jsonarrai:0,jsonimport:[0,1],keep:0,kei:0,label:0,level:0,list:[0,1],list_of_column:0,list_of_edg:0,list_of_nod:0,load:0,loop:0,main:1,mask:0,mask_arr:0,matric:0,matrix:[0,1],member:0,mention:0,merg:0,method:0,modul:[2,3],multipl:0,name:[0,1],ndarrai:0,necessari:0,nest:0,net:[0,1],net_graph:0,network:0,network_graph:[1,2,3],networkgraph:[0,1],networkx:0,node:[0,1],node_id:0,node_index:0,node_indx:0,node_states_numb:0,nodes_index:0,nodes_indexes_arr:0,nodes_label:0,nodes_labels_list:0,nodes_vals_arr:0,nodes_valu:[0,1],none:[0,1],normal:0,normalize_trajectori:0,number:0,numpi:0,obj:1,object:[0,1],one:0,one_iteration_of_ctpc_algorithm:0,one_level_norm:0,onli:0,origin:0,original_cols_numb:0,otherwis:0,out:0,outer:[0,1],over:0,own:2,p_comb:0,p_indx:0,packag:[2,3],page:2,panda:[0,1],param:0,paramet:[0,2],parameters_estim:[1,2,3],parametersestim:[0,1],parent:0,parent_label:0,parent_set:0,parents_cardin:0,parents_comb:0,parents_index:0,parents_label:0,parents_states_numb:0,parents_v:0,parents_valu:0,particular:0,pass:1,path:[0,1],peest:1,perform:0,place:0,posit:0,possibl:0,prepar:0,present:0,print:1,process:0,properli:0,properti:0,put:0,pyctbn:1,q_xx:0,raw:0,raw_data:0,read:[0,1],read_csv:1,read_csv_fil:1,read_fil:1,read_json_fil:0,real:[0,1],refer:0,reject:0,rel:0,relat:0,remain:0,remov:0,repres:0,represent:0,res:0,resid:0,result:[0,1],results_:0,rtype:0,same:0,sampl:[0,1],sample_fram:[0,1],sample_path:[1,2,3],samplepath:[0,1],samples_label:0,save:[0,1],save_result:[0,1],scalar_index:0,scalar_indexes_struct:0,se1:1,search:2,see:0,select:1,self:[0,1],sep_set:0,set:0,set_of_cim:[2,3],setofcim:[0,1],shift:0,shifted_cols_head:0,signific:0,simbol:0,simpl:1,size:0,socim:0,sofc1:1,sorter:0,specif:1,start:0,state:0,state_res_tim:0,state_residence_tim:0,state_transition_matrix:0,str:[0,1],string:0,structrur:0,structur:[2,3],structure_estim:[1,2,3],structure_estimation_exampl:1,structure_label:0,structureestim:[0,1],structut:0,submodul:[2,3],subset:0,symbol:0,synthet:0,take:1,task:0,ternari:1,test:0,test_child:0,test_par:0,tha:0,them:0,thi:[0,1],three:1,time:[0,1],time_filt:0,time_kei:0,time_scalar_indexing_strucur:0,timestamp:0,to_nod:0,tot_vars_count:0,total:0,total_variables_count:0,total_variables_numb:0,traj:0,trajectori:[1,2,3],trajectories_kei:0,trajectri:1,transit:0,transition_filt:0,transition_matric:0,transition_scalar_indexing_structur:0,tri:0,tupl:0,two:0,type:[0,1],uniqu:0,unus:0,usag:2,used:0,using:0,valu:[0,1],values_list:1,var_id:0,variabl:[0,1],variable_cardin:0,variable_label:0,variables_kei:0,variables_label:0,vector:0,want:1,where:0,which:0,without:0,word:0,you:1,your:2},titles:["PyCTBN package","Examples","Welcome to PyCTBN\u2019s documentation!","PyCTBN"],titleterms:{"import":1,abstract_import:0,cach:0,conditional_intensity_matrix:0,content:0,data:1,document:2,estim:1,exampl:1,implement:1,indic:2,instal:1,json_import:0,modul:0,network_graph:0,own:1,packag:0,paramet:1,parameters_estim:0,pyctbn:[0,2,3],sample_path:0,set_of_cim:0,structur:[0,1],structure_estim:0,submodul:0,tabl:2,trajectori:0,usag:1,welcom:2,your:1}}) \ No newline at end of file diff --git a/parameters_estimation_example.py b/examples/parameters_estimation_example.py similarity index 76% rename from parameters_estimation_example.py rename to examples/parameters_estimation_example.py index be97a28..f5aa3ce 100644 --- a/parameters_estimation_example.py +++ b/examples/parameters_estimation_example.py @@ -3,14 +3,14 @@ import os import glob -from PyCTBN.PyCTBN.json_importer import JsonImporter -from PyCTBN.PyCTBN.sample_path import SamplePath -from PyCTBN.PyCTBN.network_graph import NetworkGraph -from PyCTBN.PyCTBN.parameters_estimator import ParametersEstimator +from PyCTBN.classes.json_importer import JsonImporter +from PyCTBN.classes.sample_path import SamplePath +from PyCTBN.classes.network_graph import NetworkGraph +from PyCTBN.classes.parameters_estimator import ParametersEstimator def main(): - read_files = glob.glob(os.path.join('./data', "*.json")) #Take all json files in this dir + read_files = glob.glob(os.path.join('../data', "*.json")) #Take all json files in this dir #import data importer = JsonImporter(read_files[0], 'samples', 'dyn.str', 'variables', 'Time', 'Name') importer.import_data(0) diff --git a/structure_estimation_example.py b/examples/structure_estimation_example.py similarity index 78% rename from structure_estimation_example.py rename to examples/structure_estimation_example.py index cc8ce75..b1ef609 100644 --- a/structure_estimation_example.py +++ b/examples/structure_estimation_example.py @@ -1,15 +1,15 @@ import os import glob -from PyCTBN.PyCTBN.json_importer import JsonImporter -from PyCTBN.PyCTBN.sample_path import SamplePath -from PyCTBN.PyCTBN.structure_estimator import StructureEstimator +from PyCTBN.classes.json_importer import JsonImporter +from PyCTBN.classes.sample_path import SamplePath +from PyCTBN.classes.structure_estimator import StructureEstimator def structure_estimation_example(): # read the json files in ./data path - read_files = glob.glob(os.path.join('./data', "*.json")) + read_files = glob.glob(os.path.join('../data', "*.json")) # initialize a JsonImporter object for the first file importer = JsonImporter(read_files[0], 'samples', 'dyn.str', 'variables', 'Time', 'Name') # import the data at index 0 of the outer json array diff --git a/setup.py b/setup.py index d15d928..fbb2182 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,7 @@ from setuptools import setup, find_packages +print(find_packages('.', exclude=['PyCTBN.tests'])) + setup(name='PyCTBN', version='1.0', url='https://github.com/philipMartini/PyCTBN', @@ -7,11 +9,14 @@ setup(name='PyCTBN', author=['Alessandro Bregoli', 'Filippo Martini'], author_email=['a.bregoli1@campus.unimib.it', 'f.martini@campus.unimib.it'], description='A Continuous Time Bayesian Networks Library', - packages=find_packages(exclude=['tests', 'data']), + packages=find_packages('.', exclude=['PyCTBN.tests']), + #packages=['PyCTBN.classes'], install_requires=[ 'numpy', 'pandas', 'networkx', 'scipy', 'tqdm'], dependency_links=['https://github.com/numpy/numpy', 'https://github.com/pandas-dev/pandas', 'https://github.com/networkx/networkx', 'https://github.com/scipy/scipy', 'https://github.com/tqdm/tqdm'], long_description=open('README.md').read(), - zip_safe=False) + zip_safe=False, + python_requires='>=3.6') + diff --git a/documentation/Makefile b/sphinx_output/Makefile similarity index 100% rename from documentation/Makefile rename to sphinx_output/Makefile diff --git a/sphinx_output/_build/doctrees/classes.doctree b/sphinx_output/_build/doctrees/classes.doctree new file mode 100644 index 0000000..2b806b1 Binary files /dev/null and b/sphinx_output/_build/doctrees/classes.doctree differ diff --git a/sphinx_output/_build/doctrees/environment.pickle b/sphinx_output/_build/doctrees/environment.pickle new file mode 100644 index 0000000..81de167 Binary files /dev/null and b/sphinx_output/_build/doctrees/environment.pickle differ diff --git a/documentation/_build/doctrees/examples.doctree b/sphinx_output/_build/doctrees/examples.doctree similarity index 90% rename from documentation/_build/doctrees/examples.doctree rename to sphinx_output/_build/doctrees/examples.doctree index 8408d0b..e83c409 100644 Binary files a/documentation/_build/doctrees/examples.doctree and b/sphinx_output/_build/doctrees/examples.doctree differ diff --git a/documentation/_build/doctrees/index.doctree b/sphinx_output/_build/doctrees/index.doctree similarity index 90% rename from documentation/_build/doctrees/index.doctree rename to sphinx_output/_build/doctrees/index.doctree index 12971da..6d9f356 100644 Binary files a/documentation/_build/doctrees/index.doctree and b/sphinx_output/_build/doctrees/index.doctree differ diff --git a/documentation/_build/doctrees/modules.doctree b/sphinx_output/_build/doctrees/modules.doctree similarity index 85% rename from documentation/_build/doctrees/modules.doctree rename to sphinx_output/_build/doctrees/modules.doctree index 854d01e..32c63d2 100644 Binary files a/documentation/_build/doctrees/modules.doctree and b/sphinx_output/_build/doctrees/modules.doctree differ diff --git a/documentation/_build/html/.buildinfo b/sphinx_output/_build/html/.buildinfo similarity index 100% rename from documentation/_build/html/.buildinfo rename to sphinx_output/_build/html/.buildinfo diff --git a/sphinx_output/_build/html/_sources/classes.rst.txt b/sphinx_output/_build/html/_sources/classes.rst.txt new file mode 100644 index 0000000..ad26a8c --- /dev/null +++ b/sphinx_output/_build/html/_sources/classes.rst.txt @@ -0,0 +1,101 @@ +classes package +=============== + +Submodules +---------- + +classes.abstract\_importer module +--------------------------------- + +.. automodule:: classes.abstract_importer + :members: + :undoc-members: + :show-inheritance: + +classes.cache module +-------------------- + +.. automodule:: classes.cache + :members: + :undoc-members: + :show-inheritance: + +classes.conditional\_intensity\_matrix module +--------------------------------------------- + +.. automodule:: classes.conditional_intensity_matrix + :members: + :undoc-members: + :show-inheritance: + +classes.json\_importer module +----------------------------- + +.. automodule:: classes.json_importer + :members: + :undoc-members: + :show-inheritance: + +classes.network\_graph module +----------------------------- + +.. automodule:: classes.network_graph + :members: + :undoc-members: + :show-inheritance: + +classes.parameters\_estimator module +------------------------------------ + +.. automodule:: classes.parameters_estimator + :members: + :undoc-members: + :show-inheritance: + +classes.sample\_path module +--------------------------- + +.. automodule:: classes.sample_path + :members: + :undoc-members: + :show-inheritance: + +classes.set\_of\_cims module +---------------------------- + +.. automodule:: classes.set_of_cims + :members: + :undoc-members: + :show-inheritance: + +classes.structure module +------------------------ + +.. automodule:: classes.structure + :members: + :undoc-members: + :show-inheritance: + +classes.structure\_estimator module +----------------------------------- + +.. automodule:: classes.structure_estimator + :members: + :undoc-members: + :show-inheritance: + +classes.trajectory module +------------------------- + +.. automodule:: classes.trajectory + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: classes + :members: + :undoc-members: + :show-inheritance: diff --git a/documentation/_build/html/_sources/examples.rst.txt b/sphinx_output/_build/html/_sources/examples.rst.txt similarity index 94% rename from documentation/_build/html/_sources/examples.rst.txt rename to sphinx_output/_build/html/_sources/examples.rst.txt index a30e4c7..01c6630 100644 --- a/documentation/_build/html/_sources/examples.rst.txt +++ b/sphinx_output/_build/html/_sources/examples.rst.txt @@ -10,7 +10,7 @@ Implementing your own data importer .. code-block:: python """This example demonstrates the implementation of a simple data importer the extends the class abstract importer to import data in csv format. - The net in exam has three ternary nodes. + The net in exam has three ternary nodes and no prior net structure. """ from .abstract_importer import AbstractImporter @@ -25,7 +25,6 @@ Implementing your own data importer self.read_csv_file() self._sorter = self.build_sorter(self._df_samples_list[0]) self.import_variables() - self.import_structure() self.compute_row_delta_in_all_samples_frames(self._df_samples_list) def read_csv_file(self): @@ -43,10 +42,6 @@ Implementing your own data importer def build_sorter(self, sample_frame: pd.DataFrame) -> typing.List: return list(sample_frame.columns)[1:] - def import_structure(self): - data = {'From':['X','Y','Z'], 'To':['Z','Z','Y']} - self._df_structure = pd.DataFrame(data) - def dataset_id(self) -> object: pass diff --git a/documentation/_build/html/_sources/index.rst.txt b/sphinx_output/_build/html/_sources/index.rst.txt similarity index 86% rename from documentation/_build/html/_sources/index.rst.txt rename to sphinx_output/_build/html/_sources/index.rst.txt index fe88b2e..cc4dc2d 100644 --- a/documentation/_build/html/_sources/index.rst.txt +++ b/sphinx_output/_build/html/_sources/index.rst.txt @@ -1,5 +1,5 @@ .. PyCTBN documentation master file, created by - sphinx-quickstart on Mon Dec 7 15:11:12 2020. + sphinx-quickstart on Mon Dec 14 20:33:17 2020. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. @@ -10,7 +10,7 @@ Welcome to PyCTBN's documentation! :maxdepth: 2 :caption: Contents: - PyCTBN + classes examples Indices and tables diff --git a/documentation/_build/html/_sources/modules.rst.txt b/sphinx_output/_build/html/_sources/modules.rst.txt similarity index 53% rename from documentation/_build/html/_sources/modules.rst.txt rename to sphinx_output/_build/html/_sources/modules.rst.txt index 447544d..6af3efe 100644 --- a/documentation/_build/html/_sources/modules.rst.txt +++ b/sphinx_output/_build/html/_sources/modules.rst.txt @@ -1,7 +1,7 @@ -PyCTBN -====== +classes +======= .. toctree:: :maxdepth: 4 - PyCTBN + classes diff --git a/sphinx_output/_build/html/_static/alabaster.css b/sphinx_output/_build/html/_static/alabaster.css new file mode 100644 index 0000000..0eddaeb --- /dev/null +++ b/sphinx_output/_build/html/_static/alabaster.css @@ -0,0 +1,701 @@ +@import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: Georgia, serif; + font-size: 17px; + background-color: #fff; + color: #000; + margin: 0; + padding: 0; +} + + +div.document { + width: 940px; + margin: 30px auto 0 auto; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 220px; +} + +div.sphinxsidebar { + width: 220px; + font-size: 14px; + line-height: 1.5; +} + +hr { + border: 1px solid #B1B4B6; +} + +div.body { + background-color: #fff; + color: #3E4349; + padding: 0 30px 0 30px; +} + +div.body > .section { + text-align: left; +} + +div.footer { + width: 940px; + margin: 20px auto 30px auto; + font-size: 14px; + color: #888; + text-align: right; +} + +div.footer a { + color: #888; +} + +p.caption { + font-family: inherit; + font-size: inherit; +} + + +div.relations { + display: none; +} + + +div.sphinxsidebar a { + color: #444; + text-decoration: none; + border-bottom: 1px dotted #999; +} + +div.sphinxsidebar a:hover { + border-bottom: 1px solid #999; +} + +div.sphinxsidebarwrapper { + padding: 18px 10px; +} + +div.sphinxsidebarwrapper p.logo { + padding: 0; + margin: -10px 0 0 0px; + text-align: center; +} + +div.sphinxsidebarwrapper h1.logo { + margin-top: -10px; + text-align: center; + margin-bottom: 5px; + text-align: left; +} + +div.sphinxsidebarwrapper h1.logo-name { + margin-top: 0px; +} + +div.sphinxsidebarwrapper p.blurb { + margin-top: 0; + font-style: normal; +} + +div.sphinxsidebar h3, +div.sphinxsidebar h4 { + font-family: Georgia, serif; + color: #444; + font-size: 24px; + font-weight: normal; + margin: 0 0 5px 0; + padding: 0; +} + +div.sphinxsidebar h4 { + font-size: 20px; +} + +div.sphinxsidebar h3 a { + color: #444; +} + +div.sphinxsidebar p.logo a, +div.sphinxsidebar h3 a, +div.sphinxsidebar p.logo a:hover, +div.sphinxsidebar h3 a:hover { + border: none; +} + +div.sphinxsidebar p { + color: #555; + margin: 10px 0; +} + +div.sphinxsidebar ul { + margin: 10px 0; + padding: 0; + color: #000; +} + +div.sphinxsidebar ul li.toctree-l1 > a { + font-size: 120%; +} + +div.sphinxsidebar ul li.toctree-l2 > a { + font-size: 110%; +} + +div.sphinxsidebar input { + border: 1px solid #CCC; + font-family: Georgia, serif; + font-size: 1em; +} + +div.sphinxsidebar hr { + border: none; + height: 1px; + color: #AAA; + background: #AAA; + + text-align: left; + margin-left: 0; + width: 50%; +} + +div.sphinxsidebar .badge { + border-bottom: none; +} + +div.sphinxsidebar .badge:hover { + border-bottom: none; +} + +/* To address an issue with donation coming after search */ +div.sphinxsidebar h3.donation { + margin-top: 10px; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #004B6B; + text-decoration: underline; +} + +a:hover { + color: #6D4100; + text-decoration: underline; +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: Georgia, serif; + font-weight: normal; + margin: 30px 0px 10px 0px; + padding: 0; +} + +div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } +div.body h2 { font-size: 180%; } +div.body h3 { font-size: 150%; } +div.body h4 { font-size: 130%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #DDD; + padding: 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + color: #444; + background: #EAEAEA; +} + +div.body p, div.body dd, div.body li { + line-height: 1.4em; +} + +div.admonition { + margin: 20px 0px; + padding: 10px 30px; + background-color: #EEE; + border: 1px solid #CCC; +} + +div.admonition tt.xref, div.admonition code.xref, div.admonition a tt { + background-color: #FBFBFB; + border-bottom: 1px solid #fafafa; +} + +div.admonition p.admonition-title { + font-family: Georgia, serif; + font-weight: normal; + font-size: 24px; + margin: 0 0 10px 0; + padding: 0; + line-height: 1; +} + +div.admonition p.last { + margin-bottom: 0; +} + +div.highlight { + background-color: #fff; +} + +dt:target, .highlight { + background: #FAF3E8; +} + +div.warning { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.danger { + background-color: #FCC; + border: 1px solid #FAA; + -moz-box-shadow: 2px 2px 4px #D52C2C; + -webkit-box-shadow: 2px 2px 4px #D52C2C; + box-shadow: 2px 2px 4px #D52C2C; +} + +div.error { + background-color: #FCC; + border: 1px solid #FAA; + -moz-box-shadow: 2px 2px 4px #D52C2C; + -webkit-box-shadow: 2px 2px 4px #D52C2C; + box-shadow: 2px 2px 4px #D52C2C; +} + +div.caution { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.attention { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.important { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.note { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.tip { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.hint { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.seealso { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.topic { + background-color: #EEE; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre, tt, code { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.9em; +} + +.hll { + background-color: #FFC; + margin: 0 -12px; + padding: 0 12px; + display: block; +} + +img.screenshot { +} + +tt.descname, tt.descclassname, code.descname, code.descclassname { + font-size: 0.95em; +} + +tt.descname, code.descname { + padding-right: 0.08em; +} + +img.screenshot { + -moz-box-shadow: 2px 2px 4px #EEE; + -webkit-box-shadow: 2px 2px 4px #EEE; + box-shadow: 2px 2px 4px #EEE; +} + +table.docutils { + border: 1px solid #888; + -moz-box-shadow: 2px 2px 4px #EEE; + -webkit-box-shadow: 2px 2px 4px #EEE; + box-shadow: 2px 2px 4px #EEE; +} + +table.docutils td, table.docutils th { + border: 1px solid #888; + padding: 0.25em 0.7em; +} + +table.field-list, table.footnote { + border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +table.footnote { + margin: 15px 0; + width: 100%; + border: 1px solid #EEE; + background: #FDFDFD; + font-size: 0.9em; +} + +table.footnote + table.footnote { + margin-top: -15px; + border-top: none; +} + +table.field-list th { + padding: 0 0.8em 0 0; +} + +table.field-list td { + padding: 0; +} + +table.field-list p { + margin-bottom: 0.8em; +} + +/* Cloned from + * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68 + */ +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +table.footnote td.label { + width: .1px; + padding: 0.3em 0 0.3em 0.5em; +} + +table.footnote td { + padding: 0.3em 0.5em; +} + +dl { + margin: 0; + padding: 0; +} + +dl dd { + margin-left: 30px; +} + +blockquote { + margin: 0 0 0 30px; + padding: 0; +} + +ul, ol { + /* Matches the 30px from the narrow-screen "li > ul" selector below */ + margin: 10px 0 10px 30px; + padding: 0; +} + +pre { + background: #EEE; + padding: 7px 30px; + margin: 15px 0px; + line-height: 1.3em; +} + +div.viewcode-block:target { + background: #ffd; +} + +dl pre, blockquote pre, li pre { + margin-left: 0; + padding-left: 30px; +} + +tt, code { + background-color: #ecf0f3; + color: #222; + /* padding: 1px 2px; */ +} + +tt.xref, code.xref, a tt { + background-color: #FBFBFB; + border-bottom: 1px solid #fff; +} + +a.reference { + text-decoration: none; + border-bottom: 1px dotted #004B6B; +} + +/* Don't put an underline on images */ +a.image-reference, a.image-reference:hover { + border-bottom: none; +} + +a.reference:hover { + border-bottom: 1px solid #6D4100; +} + +a.footnote-reference { + text-decoration: none; + font-size: 0.7em; + vertical-align: top; + border-bottom: 1px dotted #004B6B; +} + +a.footnote-reference:hover { + border-bottom: 1px solid #6D4100; +} + +a:hover tt, a:hover code { + background: #EEE; +} + + +@media screen and (max-width: 870px) { + + div.sphinxsidebar { + display: none; + } + + div.document { + width: 100%; + + } + + div.documentwrapper { + margin-left: 0; + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + } + + div.bodywrapper { + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + margin-left: 0; + } + + ul { + margin-left: 0; + } + + li > ul { + /* Matches the 30px from the "ul, ol" selector above */ + margin-left: 30px; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .bodywrapper { + margin: 0; + } + + .footer { + width: auto; + } + + .github { + display: none; + } + + + +} + + + +@media screen and (max-width: 875px) { + + body { + margin: 0; + padding: 20px 30px; + } + + div.documentwrapper { + float: none; + background: #fff; + } + + div.sphinxsidebar { + display: block; + float: none; + width: 102.5%; + margin: 50px -30px -20px -30px; + padding: 10px 20px; + background: #333; + color: #FFF; + } + + div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, + div.sphinxsidebar h3 a { + color: #fff; + } + + div.sphinxsidebar a { + color: #AAA; + } + + div.sphinxsidebar p.logo { + display: none; + } + + div.document { + width: 100%; + margin: 0; + } + + div.footer { + display: none; + } + + div.bodywrapper { + margin: 0; + } + + div.body { + min-height: 0; + padding: 0; + } + + .rtd_doc_footer { + display: none; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .footer { + width: auto; + } + + .github { + display: none; + } +} + + +/* misc. */ + +.revsys-inline { + display: none!important; +} + +/* Make nested-list/multi-paragraph items look better in Releases changelog + * pages. Without this, docutils' magical list fuckery causes inconsistent + * formatting between different release sub-lists. + */ +div#changelog > div.section > ul > li > p:only-child { + margin-bottom: 0; +} + +/* Hide fugly table cell borders in ..bibliography:: directive output */ +table.docutils.citation, table.docutils.citation td, table.docutils.citation th { + border: none; + /* Below needed in some edge cases; if not applied, bottom shadows appear */ + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + + +/* relbar */ + +.related { + line-height: 30px; + width: 100%; + font-size: 0.9rem; +} + +.related.top { + border-bottom: 1px solid #EEE; + margin-bottom: 20px; +} + +.related.bottom { + border-top: 1px solid #EEE; +} + +.related ul { + padding: 0; + margin: 0; + list-style: none; +} + +.related li { + display: inline; +} + +nav#rellinks { + float: right; +} + +nav#rellinks li+li:before { + content: "|"; +} + +nav#breadcrumbs li+li:before { + content: "\00BB"; +} + +/* Hide certain items when printing */ +@media print { + div.related { + display: none; + } +} \ No newline at end of file diff --git a/documentation/_build/html/_static/basic.css b/sphinx_output/_build/html/_static/basic.css similarity index 100% rename from documentation/_build/html/_static/basic.css rename to sphinx_output/_build/html/_static/basic.css diff --git a/documentation/_build/html/_static/css/badge_only.css b/sphinx_output/_build/html/_static/css/badge_only.css similarity index 100% rename from documentation/_build/html/_static/css/badge_only.css rename to sphinx_output/_build/html/_static/css/badge_only.css diff --git a/documentation/_build/html/_static/css/darker.css b/sphinx_output/_build/html/_static/css/darker.css similarity index 100% rename from documentation/_build/html/_static/css/darker.css rename to sphinx_output/_build/html/_static/css/darker.css diff --git a/documentation/_build/html/_static/css/pdj.css b/sphinx_output/_build/html/_static/css/pdj.css similarity index 100% rename from documentation/_build/html/_static/css/pdj.css rename to sphinx_output/_build/html/_static/css/pdj.css diff --git a/documentation/_build/html/_static/css/theme.css b/sphinx_output/_build/html/_static/css/theme.css similarity index 100% rename from documentation/_build/html/_static/css/theme.css rename to sphinx_output/_build/html/_static/css/theme.css diff --git a/sphinx_output/_build/html/_static/custom.css b/sphinx_output/_build/html/_static/custom.css new file mode 100644 index 0000000..2a924f1 --- /dev/null +++ b/sphinx_output/_build/html/_static/custom.css @@ -0,0 +1 @@ +/* This file intentionally left blank. */ diff --git a/documentation/_build/html/_static/doctools.js b/sphinx_output/_build/html/_static/doctools.js similarity index 100% rename from documentation/_build/html/_static/doctools.js rename to sphinx_output/_build/html/_static/doctools.js diff --git a/documentation/_build/html/_static/documentation_options.js b/sphinx_output/_build/html/_static/documentation_options.js similarity index 100% rename from documentation/_build/html/_static/documentation_options.js rename to sphinx_output/_build/html/_static/documentation_options.js diff --git a/documentation/_build/html/_static/file.png b/sphinx_output/_build/html/_static/file.png similarity index 100% rename from documentation/_build/html/_static/file.png rename to sphinx_output/_build/html/_static/file.png diff --git a/documentation/_build/html/_static/fonts/fontawesome-webfont.eot b/sphinx_output/_build/html/_static/fonts/fontawesome-webfont.eot similarity index 100% rename from documentation/_build/html/_static/fonts/fontawesome-webfont.eot rename to sphinx_output/_build/html/_static/fonts/fontawesome-webfont.eot diff --git a/documentation/_build/html/_static/fonts/fontawesome-webfont.svg b/sphinx_output/_build/html/_static/fonts/fontawesome-webfont.svg similarity index 100% rename from documentation/_build/html/_static/fonts/fontawesome-webfont.svg rename to sphinx_output/_build/html/_static/fonts/fontawesome-webfont.svg diff --git a/documentation/_build/html/_static/fonts/fontawesome-webfont.ttf b/sphinx_output/_build/html/_static/fonts/fontawesome-webfont.ttf similarity index 100% rename from documentation/_build/html/_static/fonts/fontawesome-webfont.ttf rename to sphinx_output/_build/html/_static/fonts/fontawesome-webfont.ttf diff --git a/documentation/_build/html/_static/fonts/fontawesome-webfont.woff b/sphinx_output/_build/html/_static/fonts/fontawesome-webfont.woff similarity index 100% rename from documentation/_build/html/_static/fonts/fontawesome-webfont.woff rename to sphinx_output/_build/html/_static/fonts/fontawesome-webfont.woff diff --git a/documentation/_build/html/_static/img/porao-branco.png b/sphinx_output/_build/html/_static/img/porao-branco.png similarity index 100% rename from documentation/_build/html/_static/img/porao-branco.png rename to sphinx_output/_build/html/_static/img/porao-branco.png diff --git a/documentation/_build/html/_static/jquery-3.5.1.js b/sphinx_output/_build/html/_static/jquery-3.5.1.js similarity index 100% rename from documentation/_build/html/_static/jquery-3.5.1.js rename to sphinx_output/_build/html/_static/jquery-3.5.1.js diff --git a/documentation/_build/html/_static/jquery.js b/sphinx_output/_build/html/_static/jquery.js similarity index 100% rename from documentation/_build/html/_static/jquery.js rename to sphinx_output/_build/html/_static/jquery.js diff --git a/documentation/_build/html/_static/js/pdj.js b/sphinx_output/_build/html/_static/js/pdj.js similarity index 100% rename from documentation/_build/html/_static/js/pdj.js rename to sphinx_output/_build/html/_static/js/pdj.js diff --git a/documentation/_build/html/_static/js/theme.js b/sphinx_output/_build/html/_static/js/theme.js similarity index 100% rename from documentation/_build/html/_static/js/theme.js rename to sphinx_output/_build/html/_static/js/theme.js diff --git a/documentation/_build/html/_static/language_data.js b/sphinx_output/_build/html/_static/language_data.js similarity index 100% rename from documentation/_build/html/_static/language_data.js rename to sphinx_output/_build/html/_static/language_data.js diff --git a/documentation/_build/html/_static/minus.png b/sphinx_output/_build/html/_static/minus.png similarity index 100% rename from documentation/_build/html/_static/minus.png rename to sphinx_output/_build/html/_static/minus.png diff --git a/documentation/_build/html/_static/plus.png b/sphinx_output/_build/html/_static/plus.png similarity index 100% rename from documentation/_build/html/_static/plus.png rename to sphinx_output/_build/html/_static/plus.png diff --git a/documentation/_build/html/_static/pygments.css b/sphinx_output/_build/html/_static/pygments.css similarity index 100% rename from documentation/_build/html/_static/pygments.css rename to sphinx_output/_build/html/_static/pygments.css diff --git a/documentation/_build/html/_static/searchtools.js b/sphinx_output/_build/html/_static/searchtools.js similarity index 100% rename from documentation/_build/html/_static/searchtools.js rename to sphinx_output/_build/html/_static/searchtools.js diff --git a/documentation/_build/html/_static/underscore-1.3.1.js b/sphinx_output/_build/html/_static/underscore-1.3.1.js similarity index 100% rename from documentation/_build/html/_static/underscore-1.3.1.js rename to sphinx_output/_build/html/_static/underscore-1.3.1.js diff --git a/documentation/_build/html/_static/underscore.js b/sphinx_output/_build/html/_static/underscore.js similarity index 100% rename from documentation/_build/html/_static/underscore.js rename to sphinx_output/_build/html/_static/underscore.js diff --git a/documentation/_build/html/PyCTBN.html b/sphinx_output/_build/html/classes.html similarity index 63% rename from documentation/_build/html/PyCTBN.html rename to sphinx_output/_build/html/classes.html index ea85fb6..fe1061d 100644 --- a/documentation/_build/html/PyCTBN.html +++ b/sphinx_output/_build/html/classes.html @@ -8,7 +8,7 @@ - PyCTBN package — PyCTBN 1.0 documentation + classes package — PyCTBN 1.0 documentation @@ -62,20 +62,20 @@

Contents: