diff --git a/docs-out/_build/doctrees/PyCTBN.PyCTBN.structure_graph.doctree b/docs-out/_build/doctrees/PyCTBN.PyCTBN.structure_graph.doctree index 0b47057..ff37c2f 100644 Binary files a/docs-out/_build/doctrees/PyCTBN.PyCTBN.structure_graph.doctree and b/docs-out/_build/doctrees/PyCTBN.PyCTBN.structure_graph.doctree differ diff --git a/docs-out/_build/doctrees/PyCTBN.PyCTBN.utility.doctree b/docs-out/_build/doctrees/PyCTBN.PyCTBN.utility.doctree index 164c20f..42ffafe 100644 Binary files a/docs-out/_build/doctrees/PyCTBN.PyCTBN.utility.doctree and b/docs-out/_build/doctrees/PyCTBN.PyCTBN.utility.doctree differ diff --git a/docs-out/_build/doctrees/PyCTBN.doctree b/docs-out/_build/doctrees/PyCTBN.doctree index dc97e78..ce192eb 100644 Binary files a/docs-out/_build/doctrees/PyCTBN.doctree and b/docs-out/_build/doctrees/PyCTBN.doctree differ diff --git a/docs-out/_build/doctrees/PyCTBN.tests.structure_graph.doctree b/docs-out/_build/doctrees/PyCTBN.tests.structure_graph.doctree index 07fd39e..68a2fee 100644 Binary files a/docs-out/_build/doctrees/PyCTBN.tests.structure_graph.doctree and b/docs-out/_build/doctrees/PyCTBN.tests.structure_graph.doctree differ diff --git a/docs-out/_build/doctrees/environment.pickle b/docs-out/_build/doctrees/environment.pickle index 072d2a5..1749403 100644 Binary files a/docs-out/_build/doctrees/environment.pickle and b/docs-out/_build/doctrees/environment.pickle differ diff --git a/docs-out/_build/doctrees/example.doctree b/docs-out/_build/doctrees/example.doctree new file mode 100644 index 0000000..cc7921e Binary files /dev/null and b/docs-out/_build/doctrees/example.doctree differ diff --git a/docs-out/_build/doctrees/modules.doctree b/docs-out/_build/doctrees/modules.doctree index 1338171..7725a08 100644 Binary files a/docs-out/_build/doctrees/modules.doctree and b/docs-out/_build/doctrees/modules.doctree differ diff --git a/docs-out/_build/html/PyCTBN.PyCTBN.html b/docs-out/_build/html/PyCTBN.PyCTBN.html index bd6313d..29ef30a 100644 --- a/docs-out/_build/html/PyCTBN.PyCTBN.html +++ b/docs-out/_build/html/PyCTBN.PyCTBN.html @@ -142,18 +142,22 @@
  • PyCTBN.PyCTBN.structure_graph package
  • PyCTBN.PyCTBN.utility package

    Submodules

    +
    +

    PyCTBN.basic_main module

    +
    +
    +

    PyCTBN.setup module

    +

    Module contents

    diff --git a/docs-out/_build/html/PyCTBN.tests.html b/docs-out/_build/html/PyCTBN.tests.html index 83be260..7036b72 100644 --- a/docs-out/_build/html/PyCTBN.tests.html +++ b/docs-out/_build/html/PyCTBN.tests.html @@ -137,11 +137,13 @@
  • PyCTBN.tests.structure_graph package
  • diff --git a/docs-out/_build/html/PyCTBN.tests.structure_graph.html b/docs-out/_build/html/PyCTBN.tests.structure_graph.html index f3dae53..a63e83d 100644 --- a/docs-out/_build/html/PyCTBN.tests.structure_graph.html +++ b/docs-out/_build/html/PyCTBN.tests.structure_graph.html @@ -146,6 +146,25 @@ + +
    +

    PyCTBN.tests.structure_graph.test_networkgenerator module

    +
    +
    +class PyCTBN.tests.structure_graph.test_networkgenerator.TestNetworkGenerator(methodName='runTest')
    +

    Bases: unittest.case.TestCase

    +
    +
    +test_generate_cims()
    +
    + +
    +
    +test_generate_graph()
    +
    + +
    +

    PyCTBN.tests.structure_graph.test_networkgraph module

    @@ -443,6 +462,41 @@ +
    +
    +

    PyCTBN.tests.structure_graph.test_trajectorygenerator module

    +
    +
    +class PyCTBN.tests.structure_graph.test_trajectorygenerator.TestTrajectoryGenerator(methodName='runTest')
    +

    Bases: unittest.case.TestCase

    +
    +
    +classmethod setUpClass() → None
    +

    Hook method for setting up class fixture before running tests in the class.

    +
    + +
    +
    +test_generated_trajectory()
    +
    + +
    +
    +test_generated_trajectory_max_tr()
    +
    + +
    +
    +test_init()
    +
    + +
    +
    +test_multi_trajectory()
    +
    + +
    +

    Module contents

    diff --git a/docs-out/_build/html/_sources/PyCTBN.PyCTBN.structure_graph.rst.txt b/docs-out/_build/html/_sources/PyCTBN.PyCTBN.structure_graph.rst.txt index c236017..f00477b 100644 --- a/docs-out/_build/html/_sources/PyCTBN.PyCTBN.structure_graph.rst.txt +++ b/docs-out/_build/html/_sources/PyCTBN.PyCTBN.structure_graph.rst.txt @@ -12,6 +12,14 @@ PyCTBN.PyCTBN.structure\_graph.conditional\_intensity\_matrix module :undoc-members: :show-inheritance: +PyCTBN.PyCTBN.structure\_graph.network\_generator module +-------------------------------------------------------- + +.. automodule:: PyCTBN.PyCTBN.structure_graph.network_generator + :members: + :undoc-members: + :show-inheritance: + PyCTBN.PyCTBN.structure\_graph.network\_graph module ---------------------------------------------------- @@ -52,6 +60,14 @@ PyCTBN.PyCTBN.structure\_graph.trajectory module :undoc-members: :show-inheritance: +PyCTBN.PyCTBN.structure\_graph.trajectory\_generator module +----------------------------------------------------------- + +.. automodule:: PyCTBN.PyCTBN.structure_graph.trajectory_generator + :members: + :undoc-members: + :show-inheritance: + Module contents --------------- diff --git a/docs-out/_build/html/_sources/PyCTBN.PyCTBN.utility.rst.txt b/docs-out/_build/html/_sources/PyCTBN.PyCTBN.utility.rst.txt index 1a8a33d..d804edf 100644 --- a/docs-out/_build/html/_sources/PyCTBN.PyCTBN.utility.rst.txt +++ b/docs-out/_build/html/_sources/PyCTBN.PyCTBN.utility.rst.txt @@ -4,6 +4,14 @@ PyCTBN.PyCTBN.utility package Submodules ---------- +PyCTBN.PyCTBN.utility.abstract\_exporter module +----------------------------------------------- + +.. automodule:: PyCTBN.PyCTBN.utility.abstract_exporter + :members: + :undoc-members: + :show-inheritance: + PyCTBN.PyCTBN.utility.abstract\_importer module ----------------------------------------------- @@ -20,6 +28,14 @@ PyCTBN.PyCTBN.utility.cache module :undoc-members: :show-inheritance: +PyCTBN.PyCTBN.utility.json\_exporter module +------------------------------------------- + +.. automodule:: PyCTBN.PyCTBN.utility.json_exporter + :members: + :undoc-members: + :show-inheritance: + PyCTBN.PyCTBN.utility.json\_importer module ------------------------------------------- diff --git a/docs-out/_build/html/_sources/PyCTBN.rst.txt b/docs-out/_build/html/_sources/PyCTBN.rst.txt index db94109..3aaa3ce 100644 --- a/docs-out/_build/html/_sources/PyCTBN.rst.txt +++ b/docs-out/_build/html/_sources/PyCTBN.rst.txt @@ -8,10 +8,27 @@ Subpackages :maxdepth: 4 PyCTBN.PyCTBN + PyCTBN.tests Submodules ---------- +PyCTBN.basic\_main module +------------------------- + +.. automodule:: PyCTBN.basic_main + :members: + :undoc-members: + :show-inheritance: + +PyCTBN.setup module +------------------- + +.. automodule:: PyCTBN.setup + :members: + :undoc-members: + :show-inheritance: + Module contents --------------- diff --git a/docs-out/_build/html/_sources/PyCTBN.tests.structure_graph.rst.txt b/docs-out/_build/html/_sources/PyCTBN.tests.structure_graph.rst.txt index 257d48d..7240498 100644 --- a/docs-out/_build/html/_sources/PyCTBN.tests.structure_graph.rst.txt +++ b/docs-out/_build/html/_sources/PyCTBN.tests.structure_graph.rst.txt @@ -12,6 +12,14 @@ PyCTBN.tests.structure\_graph.test\_cim module :undoc-members: :show-inheritance: +PyCTBN.tests.structure\_graph.test\_networkgenerator module +----------------------------------------------------------- + +.. automodule:: PyCTBN.tests.structure_graph.test_networkgenerator + :members: + :undoc-members: + :show-inheritance: + PyCTBN.tests.structure\_graph.test\_networkgraph module ------------------------------------------------------- @@ -52,6 +60,14 @@ PyCTBN.tests.structure\_graph.test\_trajectory module :undoc-members: :show-inheritance: +PyCTBN.tests.structure\_graph.test\_trajectorygenerator module +-------------------------------------------------------------- + +.. automodule:: PyCTBN.tests.structure_graph.test_trajectorygenerator + :members: + :undoc-members: + :show-inheritance: + Module contents --------------- diff --git a/docs-out/_build/html/_sources/example.rst.txt b/docs-out/_build/html/_sources/example.rst.txt new file mode 100644 index 0000000..7789de1 --- /dev/null +++ b/docs-out/_build/html/_sources/example.rst.txt @@ -0,0 +1,7 @@ +example module +============== + +.. automodule:: example + :members: + :undoc-members: + :show-inheritance: diff --git a/docs-out/_build/html/_sources/modules.rst.txt b/docs-out/_build/html/_sources/modules.rst.txt index 4ec310b..aa7e7d5 100644 --- a/docs-out/_build/html/_sources/modules.rst.txt +++ b/docs-out/_build/html/_sources/modules.rst.txt @@ -4,5 +4,6 @@ PyCTBN .. toctree:: :maxdepth: 4 - PyCTBN.PyCTBN - examples + PyCTBN + example + setup diff --git a/docs-out/_build/html/example.html b/docs-out/_build/html/example.html new file mode 100644 index 0000000..926439d --- /dev/null +++ b/docs-out/_build/html/example.html @@ -0,0 +1,179 @@ + + + + + + + + + + + example module — PyCTBN 2.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + +
    +
    +
    +
    +
    + +
    +
    + + + + + + + + + + + + +
    + +
    + +
    +
    +

    example module

    +
    + + +
    +
    + + +
    + +
    +

    + © Copyright 2021, Bregoli Alessandro, Martini Filippo, Moretti Luca. +

    +
    + + Built with Sphinx using a theme provided by Porão do Juca. + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs-out/_build/html/genindex.html b/docs-out/_build/html/genindex.html index bd2996c..763383b 100644 --- a/docs-out/_build/html/genindex.html +++ b/docs-out/_build/html/genindex.html @@ -134,11 +134,14 @@ | S | T | V + | W

    A

    +

    E

    @@ -337,6 +352,10 @@

    G

    +
  • graph() (PyCTBN.PyCTBN.structure_graph.network_generator.NetworkGenerator property) +
  • @@ -414,6 +435,10 @@

    J

    + +

    N

    @@ -699,6 +748,13 @@ +
  • + PyCTBN.PyCTBN.structure_graph.network_generator + +
  • @@ -734,6 +790,13 @@
  • +
  • + PyCTBN.PyCTBN.structure_graph.trajectory_generator + +
  • @@ -741,6 +804,13 @@
  • +
  • + PyCTBN.PyCTBN.utility.abstract_exporter + +
  • @@ -757,6 +827,13 @@
  • +
  • + PyCTBN.PyCTBN.utility.json_exporter + +
  • @@ -848,6 +925,13 @@
  • +
  • + PyCTBN.tests.structure_graph.test_networkgenerator + +
  • @@ -883,6 +967,13 @@
  • +
  • + PyCTBN.tests.structure_graph.test_trajectorygenerator + +
  • @@ -973,6 +1064,8 @@
  • (PyCTBN.tests.structure_graph.test_structure.TestStructure class method)
  • (PyCTBN.tests.structure_graph.test_trajectory.TestTrajectory class method) +
  • +
  • (PyCTBN.tests.structure_graph.test_trajectorygenerator.TestTrajectoryGenerator class method)
  • (PyCTBN.tests.utility.test_json_importer.TestJsonImporter class method)
  • @@ -1088,8 +1181,16 @@
  • test_filter_cims_with_mask() (PyCTBN.tests.structure_graph.test_setofcims.TestSetOfCims method)
  • test_find() (PyCTBN.tests.utility.test_cache.TestCache method) +
  • +
  • test_generate_cims() (PyCTBN.tests.structure_graph.test_networkgenerator.TestNetworkGenerator method) +
  • +
  • test_generate_graph() (PyCTBN.tests.structure_graph.test_networkgenerator.TestNetworkGenerator method)
  • test_generate_possible_sub_sets_of_size() (PyCTBN.tests.estimators.test_structure_estimator.TestStructureEstimator method) +
  • +
  • test_generated_trajectory() (PyCTBN.tests.structure_graph.test_trajectorygenerator.TestTrajectoryGenerator method) +
  • +
  • test_generated_trajectory_max_tr() (PyCTBN.tests.structure_graph.test_trajectorygenerator.TestTrajectoryGenerator method)
  • test_get_node_id() (PyCTBN.tests.structure_graph.test_structure.TestStructure method)
  • @@ -1133,6 +1234,8 @@
  • (PyCTBN.tests.structure_graph.test_structure.TestStructure method)
  • (PyCTBN.tests.structure_graph.test_trajectory.TestTrajectory method) +
  • +
  • (PyCTBN.tests.structure_graph.test_trajectorygenerator.TestTrajectoryGenerator method)
  • (PyCTBN.tests.utility.test_cache.TestCache method)
  • @@ -1146,6 +1249,8 @@
  • test_init_not_filled_dataframse() (PyCTBN.tests.structure_graph.test_sample_path.TestSamplePath method)
  • test_init_not_initialized_importer() (PyCTBN.tests.structure_graph.test_sample_path.TestSamplePath method) +
  • +
  • test_multi_trajectory() (PyCTBN.tests.structure_graph.test_trajectorygenerator.TestTrajectoryGenerator method)
  • test_normalize_trajectories() (PyCTBN.tests.utility.test_json_importer.TestJsonImporter method)
  • @@ -1210,6 +1315,8 @@
  • TestHillClimbingSearch (class in PyCTBN.tests.optimizers.test_hill_climbing_search)
  • TestJsonImporter (class in PyCTBN.tests.utility.test_json_importer) +
  • +
  • TestNetworkGenerator (class in PyCTBN.tests.structure_graph.test_networkgenerator)
  • TestNetworkGraph (class in PyCTBN.tests.structure_graph.test_networkgraph)
  • @@ -1232,6 +1339,8 @@
  • TestTabuSearch (class in PyCTBN.tests.optimizers.test_tabu_search)
  • TestTrajectory (class in PyCTBN.tests.structure_graph.test_trajectory) +
  • +
  • TestTrajectoryGenerator (class in PyCTBN.tests.structure_graph.test_trajectorygenerator)
  • time_filtering() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph property)
  • @@ -1248,6 +1357,8 @@
  • Trajectory (class in PyCTBN.PyCTBN.structure_graph.trajectory)
  • trajectory() (PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory property) +
  • +
  • TrajectoryGenerator (class in PyCTBN.PyCTBN.structure_graph.trajectory_generator)
  • transition_filtering() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph property)
  • @@ -1260,12 +1371,24 @@
    +
    + +

    W

    + +
    diff --git a/docs-out/_build/html/index.html b/docs-out/_build/html/index.html index 996979e..910075a 100644 --- a/docs-out/_build/html/index.html +++ b/docs-out/_build/html/index.html @@ -142,18 +142,22 @@
  • PyCTBN.PyCTBN.structure_graph package
  • PyCTBN.PyCTBN.utility package
  • diff --git a/docs-out/_build/html/objects.inv b/docs-out/_build/html/objects.inv index 66df86d..d3f8181 100644 Binary files a/docs-out/_build/html/objects.inv and b/docs-out/_build/html/objects.inv differ diff --git a/docs-out/_build/html/py-modindex.html b/docs-out/_build/html/py-modindex.html index d729367..460b1f7 100644 --- a/docs-out/_build/html/py-modindex.html +++ b/docs-out/_build/html/py-modindex.html @@ -202,6 +202,11 @@     PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix + + +     + PyCTBN.PyCTBN.structure_graph.network_generator +     @@ -227,11 +232,21 @@     PyCTBN.PyCTBN.structure_graph.trajectory + + +     + PyCTBN.PyCTBN.structure_graph.trajectory_generator +     PyCTBN.PyCTBN.utility + + +     + PyCTBN.PyCTBN.utility.abstract_exporter +     @@ -242,6 +257,11 @@     PyCTBN.PyCTBN.utility.cache + + +     + PyCTBN.PyCTBN.utility.json_exporter +     @@ -307,6 +327,11 @@     PyCTBN.tests.structure_graph.test_cim + + +     + PyCTBN.tests.structure_graph.test_networkgenerator +     @@ -332,6 +357,11 @@     PyCTBN.tests.structure_graph.test_trajectory + + +     + PyCTBN.tests.structure_graph.test_trajectorygenerator +     diff --git a/docs-out/_build/html/searchindex.js b/docs-out/_build/html/searchindex.js index 22a6a83..70f998c 100644 --- a/docs-out/_build/html/searchindex.js +++ b/docs-out/_build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["PyCTBN","PyCTBN.PyCTBN","PyCTBN.PyCTBN.estimators","PyCTBN.PyCTBN.optimizers","PyCTBN.PyCTBN.structure_graph","PyCTBN.PyCTBN.utility","PyCTBN.tests","PyCTBN.tests.estimators","PyCTBN.tests.optimizers","PyCTBN.tests.structure_graph","PyCTBN.tests.utility","basic_main","examples","index","modules","setup"],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","PyCTBN.PyCTBN.rst","PyCTBN.PyCTBN.estimators.rst","PyCTBN.PyCTBN.optimizers.rst","PyCTBN.PyCTBN.structure_graph.rst","PyCTBN.PyCTBN.utility.rst","PyCTBN.tests.rst","PyCTBN.tests.estimators.rst","PyCTBN.tests.optimizers.rst","PyCTBN.tests.structure_graph.rst","PyCTBN.tests.utility.rst","basic_main.rst","examples.rst","index.rst","modules.rst","setup.rst"],objects:{"":{PyCTBN:[0,0,0,"-"]},"PyCTBN.PyCTBN":{estimators:[2,0,0,"-"],optimizers:[3,0,0,"-"],structure_graph:[4,0,0,"-"],utility:[5,0,0,"-"]},"PyCTBN.PyCTBN.estimators":{fam_score_calculator:[2,0,0,"-"],parameters_estimator:[2,0,0,"-"],structure_constraint_based_estimator:[2,0,0,"-"],structure_estimator:[2,0,0,"-"],structure_score_based_estimator:[2,0,0,"-"]},"PyCTBN.PyCTBN.estimators.fam_score_calculator":{FamScoreCalculator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator":{get_fam_score:[2,2,1,""],marginal_likelihood_q:[2,2,1,""],marginal_likelihood_theta:[2,2,1,""],single_cim_xu_marginal_likelihood_q:[2,2,1,""],single_cim_xu_marginal_likelihood_theta:[2,2,1,""],single_internal_cim_xxu_marginal_likelihood_theta:[2,2,1,""],variable_cim_xu_marginal_likelihood_q:[2,2,1,""],variable_cim_xu_marginal_likelihood_theta:[2,2,1,""]},"PyCTBN.PyCTBN.estimators.parameters_estimator":{ParametersEstimator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator":{compute_parameters_for_node:[2,2,1,""],compute_state_res_time_for_node:[2,2,1,""],compute_state_transitions_for_a_node:[2,2,1,""],fast_init:[2,2,1,""]},"PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator":{StructureConstraintBasedEstimator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator":{complete_test:[2,2,1,""],compute_thumb_value:[2,2,1,""],ctpc_algorithm:[2,2,1,""],estimate_structure:[2,2,1,""],independence_test:[2,2,1,""],one_iteration_of_CTPC_algorithm:[2,2,1,""]},"PyCTBN.PyCTBN.estimators.structure_estimator":{StructureEstimator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator":{adjacency_matrix:[2,2,1,""],build_complete_graph:[2,2,1,""],build_removable_edges_matrix:[2,2,1,""],estimate_structure:[2,2,1,""],generate_possible_sub_sets_of_size:[2,2,1,""],save_plot_estimated_structure_graph:[2,2,1,""],save_results:[2,2,1,""],spurious_edges:[2,2,1,""]},"PyCTBN.PyCTBN.estimators.structure_score_based_estimator":{StructureScoreBasedEstimator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator":{estimate_parents:[2,2,1,""],estimate_structure:[2,2,1,""],get_score_from_graph:[2,2,1,""]},"PyCTBN.PyCTBN.optimizers":{constraint_based_optimizer:[3,0,0,"-"],hill_climbing_search:[3,0,0,"-"],optimizer:[3,0,0,"-"],tabu_search:[3,0,0,"-"]},"PyCTBN.PyCTBN.optimizers.constraint_based_optimizer":{ConstraintBasedOptimizer:[3,1,1,""]},"PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer":{optimize_structure:[3,2,1,""]},"PyCTBN.PyCTBN.optimizers.hill_climbing_search":{HillClimbing:[3,1,1,""]},"PyCTBN.PyCTBN.optimizers.hill_climbing_search.HillClimbing":{optimize_structure:[3,2,1,""]},"PyCTBN.PyCTBN.optimizers.optimizer":{Optimizer:[3,1,1,""]},"PyCTBN.PyCTBN.optimizers.optimizer.Optimizer":{optimize_structure:[3,2,1,""]},"PyCTBN.PyCTBN.optimizers.tabu_search":{TabuSearch:[3,1,1,""]},"PyCTBN.PyCTBN.optimizers.tabu_search.TabuSearch":{optimize_structure:[3,2,1,""]},"PyCTBN.PyCTBN.structure_graph":{conditional_intensity_matrix:[4,0,0,"-"],network_graph:[4,0,0,"-"],sample_path:[4,0,0,"-"],set_of_cims:[4,0,0,"-"],structure:[4,0,0,"-"],trajectory:[4,0,0,"-"]},"PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix":{ConditionalIntensityMatrix:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix":{cim:[4,2,1,""],compute_cim_coefficients:[4,2,1,""],state_residence_times:[4,2,1,""],state_transition_matrix:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.network_graph":{NetworkGraph:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph":{add_edges:[4,2,1,""],add_nodes:[4,2,1,""],build_p_comb_structure_for_a_node:[4,2,1,""],build_time_columns_filtering_for_a_node:[4,2,1,""],build_time_scalar_indexing_structure_for_a_node:[4,2,1,""],build_transition_filtering_for_a_node:[4,2,1,""],build_transition_scalar_indexing_structure_for_a_node:[4,2,1,""],clear_indexing_filtering_structures:[4,2,1,""],edges:[4,2,1,""],fast_init:[4,2,1,""],get_node_indx:[4,2,1,""],get_ordered_by_indx_set_of_parents:[4,2,1,""],get_parents_by_id:[4,2,1,""],get_positional_node_indx:[4,2,1,""],get_states_number:[4,2,1,""],has_edge:[4,2,1,""],nodes:[4,2,1,""],nodes_indexes:[4,2,1,""],nodes_values:[4,2,1,""],p_combs:[4,2,1,""],remove_edges:[4,2,1,""],remove_node:[4,2,1,""],time_filtering:[4,2,1,""],time_scalar_indexing_strucure:[4,2,1,""],transition_filtering:[4,2,1,""],transition_scalar_indexing_structure:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.sample_path":{SamplePath:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath":{build_structure:[4,2,1,""],build_trajectories:[4,2,1,""],clear_memory:[4,2,1,""],has_prior_net_structure:[4,2,1,""],structure:[4,2,1,""],total_variables_count:[4,2,1,""],trajectories:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.set_of_cims":{SetOfCims:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims":{actual_cims:[4,2,1,""],build_cims:[4,2,1,""],build_times_and_transitions_structures:[4,2,1,""],filter_cims_with_mask:[4,2,1,""],get_cims_number:[4,2,1,""],p_combs:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.structure":{Structure:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.structure.Structure":{add_edge:[4,2,1,""],clean_structure_edges:[4,2,1,""],contains_edge:[4,2,1,""],edges:[4,2,1,""],get_node_id:[4,2,1,""],get_node_indx:[4,2,1,""],get_positional_node_indx:[4,2,1,""],get_states_number:[4,2,1,""],nodes_indexes:[4,2,1,""],nodes_labels:[4,2,1,""],nodes_values:[4,2,1,""],remove_edge:[4,2,1,""],remove_node:[4,2,1,""],total_variables_number:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.trajectory":{Trajectory:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory":{complete_trajectory:[4,2,1,""],size:[4,2,1,""],times:[4,2,1,""],trajectory:[4,2,1,""]},"PyCTBN.PyCTBN.utility":{abstract_importer:[5,0,0,"-"],cache:[5,0,0,"-"],json_importer:[5,0,0,"-"],sample_importer:[5,0,0,"-"]},"PyCTBN.PyCTBN.utility.abstract_importer":{AbstractImporter:[5,1,1,""]},"PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter":{build_list_of_samples_array:[5,2,1,""],build_sorter:[5,2,1,""],clear_concatenated_frame:[5,2,1,""],compute_row_delta_in_all_samples_frames:[5,2,1,""],compute_row_delta_sigle_samples_frame:[5,2,1,""],concatenated_samples:[5,2,1,""],dataset_id:[5,2,1,""],file_path:[5,2,1,""],sorter:[5,2,1,""],structure:[5,2,1,""],variables:[5,2,1,""]},"PyCTBN.PyCTBN.utility.cache":{Cache:[5,1,1,""]},"PyCTBN.PyCTBN.utility.cache.Cache":{clear:[5,2,1,""],find:[5,2,1,""],put:[5,2,1,""]},"PyCTBN.PyCTBN.utility.json_importer":{JsonImporter:[5,1,1,""]},"PyCTBN.PyCTBN.utility.json_importer.JsonImporter":{build_sorter:[5,2,1,""],clear_data_frame_list:[5,2,1,""],dataset_id:[5,2,1,""],import_data:[5,2,1,""],import_sampled_cims:[5,2,1,""],import_structure:[5,2,1,""],import_trajectories:[5,2,1,""],import_variables:[5,2,1,""],normalize_trajectories:[5,2,1,""],one_level_normalizing:[5,2,1,""],read_json_file:[5,2,1,""]},"PyCTBN.PyCTBN.utility.sample_importer":{SampleImporter:[5,1,1,""]},"PyCTBN.PyCTBN.utility.sample_importer.SampleImporter":{build_sorter:[5,2,1,""],dataset_id:[5,2,1,""],import_data:[5,2,1,""]},"PyCTBN.tests":{estimators:[7,0,0,"-"],optimizers:[8,0,0,"-"],structure_graph:[9,0,0,"-"],utility:[10,0,0,"-"]},"PyCTBN.tests.estimators":{test_parameters_estimator:[7,0,0,"-"],test_structure_constraint_based_estimator:[7,0,0,"-"],test_structure_estimator:[7,0,0,"-"],test_structure_score_based_estimator:[7,0,0,"-"]},"PyCTBN.tests.estimators.test_parameters_estimator":{TestParametersEstimatior:[7,1,1,""]},"PyCTBN.tests.estimators.test_parameters_estimator.TestParametersEstimatior":{aux_import_sampled_cims:[7,2,1,""],cim_equality_test:[7,2,1,""],equality_of_cims_of_node:[7,2,1,""],setUpClass:[7,2,1,""],test_compute_parameters_for_node:[7,2,1,""],test_fast_init:[7,2,1,""]},"PyCTBN.tests.estimators.test_structure_constraint_based_estimator":{TestStructureConstraintBasedEstimator:[7,1,1,""]},"PyCTBN.tests.estimators.test_structure_constraint_based_estimator.TestStructureConstraintBasedEstimator":{setUpClass:[7,2,1,""],test_structure_1:[7,2,1,""],test_structure_2:[7,2,1,""],test_structure_3:[7,2,1,""]},"PyCTBN.tests.estimators.test_structure_estimator":{TestStructureEstimator:[7,1,1,""]},"PyCTBN.tests.estimators.test_structure_estimator.TestStructureEstimator":{setUpClass:[7,2,1,""],test_adjacency_matrix:[7,2,1,""],test_build_complete_graph:[7,2,1,""],test_build_removable_edges_matrix:[7,2,1,""],test_generate_possible_sub_sets_of_size:[7,2,1,""],test_init:[7,2,1,""],test_save_plot_estimated_graph:[7,2,1,""],test_save_results:[7,2,1,""],test_time:[7,2,1,""]},"PyCTBN.tests.estimators.test_structure_score_based_estimator":{TestStructureScoreBasedEstimator:[7,1,1,""]},"PyCTBN.tests.estimators.test_structure_score_based_estimator.TestStructureScoreBasedEstimator":{setUpClass:[7,2,1,""],test_structure_1:[7,2,1,""],test_structure_2:[7,2,1,""],test_structure_3:[7,2,1,""],test_structure_monoprocesso:[7,2,1,""]},"PyCTBN.tests.optimizers":{test_hill_climbing_search:[8,0,0,"-"],test_tabu_search:[8,0,0,"-"]},"PyCTBN.tests.optimizers.test_hill_climbing_search":{TestHillClimbingSearch:[8,1,1,""]},"PyCTBN.tests.optimizers.test_hill_climbing_search.TestHillClimbingSearch":{setUpClass:[8,2,1,""],test_structure:[8,2,1,""],test_structure_3:[8,2,1,""]},"PyCTBN.tests.optimizers.test_tabu_search":{TestTabuSearch:[8,1,1,""]},"PyCTBN.tests.optimizers.test_tabu_search.TestTabuSearch":{setUpClass:[8,2,1,""],test_structure:[8,2,1,""],test_structure_3:[8,2,1,""]},"PyCTBN.tests.structure_graph":{test_cim:[9,0,0,"-"],test_networkgraph:[9,0,0,"-"],test_sample_path:[9,0,0,"-"],test_setofcims:[9,0,0,"-"],test_structure:[9,0,0,"-"],test_trajectory:[9,0,0,"-"]},"PyCTBN.tests.structure_graph.test_cim":{TestConditionalIntensityMatrix:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_cim.TestConditionalIntensityMatrix":{setUpClass:[9,2,1,""],test_compute_cim_coefficients:[9,2,1,""],test_init:[9,2,1,""],test_repr:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_networkgraph":{TestNetworkGraph:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_networkgraph.TestNetworkGraph":{aux_build_p_combs_structure:[9,2,1,""],aux_build_time_columns_filtering_structure_for_a_node:[9,2,1,""],aux_build_time_scalar_indexing_structure_for_a_node:[9,2,1,""],aux_build_transition_columns_filtering_structure:[9,2,1,""],aux_build_transition_scalar_indexing_structure_for_a_node:[9,2,1,""],setUpClass:[9,2,1,""],test_add_edges:[9,2,1,""],test_add_nodes:[9,2,1,""],test_build_p_combs_structure:[9,2,1,""],test_build_time_columns_filtering_structure_for_a_node:[9,2,1,""],test_build_time_scalar_indexing_structure_for_a_node:[9,2,1,""],test_build_transition_columns_filtering_structure:[9,2,1,""],test_build_transition_scalar_indexing_structure_for_a_node:[9,2,1,""],test_fast_init:[9,2,1,""],test_get_node_indx:[9,2,1,""],test_get_ordered_by_indx_set_of_parents:[9,2,1,""],test_get_parents_by_id:[9,2,1,""],test_get_states_number:[9,2,1,""],test_init:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_sample_path":{TestSamplePath:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_sample_path.TestSamplePath":{setUpClass:[9,2,1,""],test_buid_samplepath_no_concatenated_samples:[9,2,1,""],test_buid_samplepath_no_variables:[9,2,1,""],test_build_saplepath_no_prior_net_structure:[9,2,1,""],test_build_structure:[9,2,1,""],test_build_structure_bad_sorter:[9,2,1,""],test_build_trajectories:[9,2,1,""],test_init:[9,2,1,""],test_init_not_filled_dataframse:[9,2,1,""],test_init_not_initialized_importer:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_setofcims":{TestSetOfCims:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_setofcims.TestSetOfCims":{another_filtering_method:[9,2,1,""],aux_test_build_cims:[9,2,1,""],aux_test_init:[9,2,1,""],build_p_comb_structure_for_a_node:[9,2,1,""],setUpClass:[9,2,1,""],test_build_cims:[9,2,1,""],test_filter_cims_with_mask:[9,2,1,""],test_init:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_structure":{TestStructure:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_structure.TestStructure":{setUpClass:[9,2,1,""],test_edges_operations:[9,2,1,""],test_equality:[9,2,1,""],test_get_node_id:[9,2,1,""],test_get_node_indx:[9,2,1,""],test_get_positional_node_indx:[9,2,1,""],test_get_states_number:[9,2,1,""],test_init:[9,2,1,""],test_repr:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_trajectory":{TestTrajectory:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_trajectory.TestTrajectory":{setUpClass:[9,2,1,""],test_init:[9,2,1,""]},"PyCTBN.tests.utility":{test_cache:[10,0,0,"-"],test_json_importer:[10,0,0,"-"],test_sample_importer:[10,0,0,"-"]},"PyCTBN.tests.utility.test_cache":{TestCache:[10,1,1,""]},"PyCTBN.tests.utility.test_cache.TestCache":{test_clear:[10,2,1,""],test_find:[10,2,1,""],test_init:[10,2,1,""],test_put:[10,2,1,""]},"PyCTBN.tests.utility.test_json_importer":{TestJsonImporter:[10,1,1,""]},"PyCTBN.tests.utility.test_json_importer.TestJsonImporter":{ordered:[10,2,1,""],setUpClass:[10,2,1,""],test_build_sorter:[10,2,1,""],test_clear_concatenated_frame:[10,2,1,""],test_clear_data_frame_list:[10,2,1,""],test_compute_row_delta_in_all_frames:[10,2,1,""],test_compute_row_delta_in_all_frames_not_init_sorter:[10,2,1,""],test_compute_row_delta_single_samples_frame:[10,2,1,""],test_dataset_id:[10,2,1,""],test_file_path:[10,2,1,""],test_import_data:[10,2,1,""],test_import_sampled_cims:[10,2,1,""],test_import_structure:[10,2,1,""],test_import_variables:[10,2,1,""],test_init:[10,2,1,""],test_normalize_trajectories:[10,2,1,""],test_normalize_trajectories_wrong_indx:[10,2,1,""],test_normalize_trajectories_wrong_key:[10,2,1,""],test_read_json_file_found:[10,2,1,""],test_read_json_file_not_found:[10,2,1,""]},"PyCTBN.tests.utility.test_sample_importer":{TestSampleImporter:[10,1,1,""]},"PyCTBN.tests.utility.test_sample_importer.TestSampleImporter":{ordered:[10,2,1,""],setUpClass:[10,2,1,""],test_init:[10,2,1,""],test_order:[10,2,1,""]},PyCTBN:{PyCTBN:[1,0,0,"-"],tests:[6,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":[2,3,4,5,12],"boolean":[2,4],"case":[7,8,9,10],"class":[2,3,4,5,7,8,9,10,12],"default":[2,3,5],"float":2,"function":2,"import":[4,5,13,14],"int":[2,3,4,5],"null":2,"return":[2,3,4,5,9,12],"static":[2,4],"super":12,"true":[2,12],"var":12,HAS:5,Has:[2,4],NOT:2,The:[2,4,5,12],Use:[2,12],__actual_cach:5,__init__:12,__list_of_sets_of_par:5,_actual_cim:4,_actual_trajectori:4,_aggregated_info_about_nodes_par:4,_array_indx:5,_cach:2,_cim:4,_complete_graph:2,_df_samples_list:[5,12],_df_structur:5,_df_variabl:[5,12],_file_path:12,_graph:[4,12],_import:4,_net_graph:2,_node:2,_node_id:4,_nodes_indx:2,_nodes_v:2,_p_combs_structur:4,_raw_data:5,_sample_path:2,_single_set_of_cim:2,_sorter:[5,12],_state_residence_tim:4,_structur:4,_structure_label:5,_time:4,_time_filt:4,_time_scalar_indexing_structur:4,_total_variables_count:4,_total_variables_numb:4,_trajectori:4,_transition_filt:4,_transition_matric:4,_transition_scalar_indexing_structur:4,_variables_label:5,abc:[3,5],about:[3,4],abstract_import:[0,1,4,13,14],abstractimport:[4,5,12],act:5,actual:[2,4],actual_cim:[4,12],add:[4,5],add_edg:4,add_nod:4,added:2,addit:2,adjac:[2,12],adjacency_matrix:[2,12],after:5,against:2,aggreg:4,algorithm:[2,3,12],all:[2,3,4,5,9,12],alpha_xu:2,alpha_xxu:2,alreadi:[5,12],also:[2,4],ani:[2,3],anoth:4,another_filtering_method:9,approach:2,arc:5,arrai:[2,4,5,12],assign:2,assum:2,automat:2,aux_build_p_combs_structur:9,aux_build_time_columns_filtering_structure_for_a_nod:9,aux_build_time_scalar_indexing_structure_for_a_nod:9,aux_build_transition_columns_filtering_structur:9,aux_build_transition_scalar_indexing_structure_for_a_nod:9,aux_import_sampled_cim:7,aux_test_build_cim:9,aux_test_init:9,axi:12,base:[2,3,4,5,7,8,9,10],bayesian:2,befor:[2,3,7,8,9,10],belong:2,best:2,between:5,bool:[2,4],both:[2,5],bound:4,build:[2,4,5,9,12],build_cim:4,build_complete_graph:2,build_list_of_samples_arrai:5,build_p_comb_structure_for_a_nod:[4,9],build_removable_edges_matrix:2,build_sort:[5,12],build_structur:[4,12],build_time_columns_filtering_for_a_nod:4,build_time_scalar_indexing_structure_for_a_nod:4,build_times_and_transitions_structur:4,build_trajectori:[4,12],build_transition_filtering_for_a_nod:4,build_transition_scalar_indexing_structure_for_a_nod:4,built:2,cach:[0,1,2,13,14],calcul:2,call:[5,12],cardin:[2,4,5,9],cardinalit:[4,5],caridin:4,caridinalit:4,chang:[4,5],check:4,chi:2,chi_test:2,chi_test_alfa:2,child:[2,3],child_indx:2,child_states_numb:2,child_val:2,cim1:[2,7],cim2:[2,7],cim:[2,4,5,12],cim_equality_test:7,cims_kei:5,cims_label:7,classmethod:[7,8,9,10],clean_structure_edg:4,clear:[4,5],clear_concatenated_fram:5,clear_data_frame_list:5,clear_indexing_filtering_structur:4,clear_memori:4,climb:[2,3],coeffici:4,col:4,cols_filt:2,column:[2,4,5,12],columns_head:5,comb:4,combin:[4,5,9],combinatori:[4,9],common:2,complet:[2,4,5],complete_test:2,complete_trajectori:4,comput:[2,3,4,5,12],compute_cim_coeffici:4,compute_parameters_for_nod:[2,12],compute_row_delta_in_all_samples_fram:[5,12],compute_row_delta_sigle_samples_fram:5,compute_state_res_time_for_nod:2,compute_state_transitions_for_a_nod:2,compute_thumb_valu:2,concatanated_sampl:5,concaten:[4,5],concatenated_sampl:5,condit:4,conditional_intensity_matrix:[0,1,2,13,14],conditionalintensitymatrix:[2,4],consid:[2,4],constraint:2,constraint_based_optim:[0,1,13,14],constraintbasedoptim:3,construct:[4,5,12],conta:5,contain:[2,4,5,9],contains_edg:4,content:[13,14],convert:[2,5],copi:5,core:5,correct:[4,5],could:2,count:4,creat:[2,4,12],csv:12,csvimport:12,ctbn:2,ctpc:[2,3,12],ctpc_algorithm:[2,12],current:[2,3,5],cut:5,dafram:5,data:[2,3,4,5,13,14],datafram:[4,5,12],dataset:[3,4,5],dataset_id:[5,12],datfram:5,def:12,defin:5,definit:5,defualt:2,delta:[2,4,5],demonstr:12,describ:5,desir:[2,4],df_samples_list:5,dict:[5,12],dictionari:5,differ:5,differt:2,digraph:2,dimens:4,dir:12,direct:[2,4],directli:5,disabl:[2,3],disable_multiprocess:2,distribuit:2,doc:5,doubl:4,download:12,drop:12,duplic:4,dyn:12,each:[2,3,5],edg:[2,4,5,12],edges_list:4,end:5,entir:2,equal:4,equality_of_cims_of_nod:7,est:12,estim:[0,1,3,4,6,13,14],estimate_par:2,estimate_structur:2,estimated_cim:7,everi:[4,5],exam:12,exampl:[5,13,14],exclud:2,exctract:5,exist:5,exp_test_alfa:2,exponenti:2,expos:5,extend:12,extens:[2,5],extract:[4,5],fals:2,fam_score_calcul:[0,1,13,14],famscor:2,famscorecalcul:2,fast_init:[2,4,12],file:[2,5,12],file_path:[2,5,12],filepath:5,fill:[2,12],filter:[2,4],filter_cims_with_mask:4,find:[2,5],first:[2,12],fixtur:[7,8,9,10],follow:[4,5],form:4,format:12,formula:2,found:5,frame:5,from:[4,5,12],from_nod:5,gener:2,generate_possible_sub_sets_of_s:2,get:[2,5],get_cims_numb:4,get_fam_scor:2,get_node_id:4,get_node_indx:4,get_ordered_by_indx_set_of_par:4,get_parents_by_id:4,get_positional_node_indx:4,get_score_from_graph:2,get_states_numb:4,given:[2,4,5],glob:12,graph:[2,4,9,12],graph_struct:4,graphic:2,grid:[4,9],grpah:12,has:[5,12],has_edg:4,has_prior_net_structur:4,have:5,header:5,header_column:5,hill:[2,3],hill_climbing_search:[0,1,13,14],hillclimb:3,hold:[2,4],hook:[7,8,9,10],how:5,hyperparamet:2,hypothesi:2,identifi:[2,4,5],iff:2,implement:[3,5,13,14],import_data:[5,12],import_sampled_cim:5,import_structur:5,import_trajectori:5,import_vari:[5,12],improv:[2,3],includ:2,independ:2,independence_test:2,index:[2,4,5,12,13],indic:[2,4],indx:5,info:[4,12],inform:[3,4],init:12,initi:[2,4,5,12],inplac:12,insid:12,instal:[13,14],interest:4,interfac:3,intes:4,iter:[2,3],iterations_numb:[2,3],its:[2,3],join:12,json:[2,5,12],json_import:[0,1,13,14],jsonarrai:5,jsonimport:[5,12],keep:[2,3,5],kei:5,kind:2,knowledg:2,known:2,known_edg:2,label:[2,3,4,5],latest:12,lenght:[2,3],level:[2,5],likelihood:2,list:[2,3,4,5,12],list_of_column:4,list_of_edg:4,list_of_nod:4,load:5,loop:2,m_xu_suff_stat:2,m_xxu_suff_stat:2,main:12,margin:2,marginal_likelihood_q:2,marginal_likelihood_theta:2,mask:[4,9],mask_arr:4,matric:[2,4],matrix:[2,4,5,9,12],max_par:[2,3],maximum:[2,3],member:[4,5],mention:4,merg:5,method:[2,5,7,8,9,10],methodnam:[7,8,9,10],model:2,modul:[13,14],multipl:5,multiprocess:2,name:[2,4,5,12],ndarrai:[2,4,5],necessari:[2,4,5],nest:5,net:[2,3,4,5,12],net_graph:2,network:[2,4,5],network_graph:[0,1,2,13,14],networkgraph:[2,4,12],networkx:2,node:[2,3,4,5,9,12],node_id:[2,3,4,9],node_index:4,node_indx:[2,4],node_st:[4,9],node_states_numb:[4,9],nodes_index:4,nodes_indexes_arr:4,nodes_label:4,nodes_labels_list:4,nodes_numb:4,nodes_vals_arr:4,nodes_valu:[4,12],none:[2,3,4,5,7,9,10,12],normal:5,normalize_trajectori:5,number:[2,3,4],numpi:[2,4,5,9],obj:[10,12],object:[2,3,4,5,12],one:[4,5],one_iteration_of_ctpc_algorithm:2,one_level_norm:5,onli:5,oper:2,optim:[0,1,2,6,13,14],optimize_structur:3,option:[2,3],order:[2,5,10],origin:5,original_cols_numb:4,otherwis:[2,5],out:5,outer:[5,12],over:2,own:[13,14],p_comb:[4,9],p_indx:[4,9],p_val:9,p_valu:9,packag:[13,14],page:13,panda:[5,12],param:4,paramet:[2,3,4,5,9,13,14],parameters_estim:[0,1,13,14],parametersestim:[2,12],parent:[2,3,4,5],parent_indx:2,parent_label:2,parent_set:2,parent_set_v:2,parent_v:2,parent_valu:9,parents_cardin:4,parents_comb:5,parents_index:4,parents_indx:9,parents_label:[4,9],parents_states_numb:[4,9],parents_v:[4,9],parents_valu:[4,9],part:2,particular:[2,5],pass:12,path:[2,5,12],patienc:[2,3],peest:12,perform:2,pip:12,place:5,plot:2,png:2,posit:[4,5],possibl:[2,4],predict:3,prepar:5,present:[2,5],print:12,prior:[2,12],prior_net_structur:5,process:[2,3,4,5],processes_numb:2,properli:5,properti:[4,5],put:5,pyctbn:12,q_xx:4,rappres:4,raw:5,raw_data:5,read:[5,12],read_csv:12,read_csv_fil:12,read_fil:12,read_json_fil:5,real:[2,4,5,12],refer:[4,5],reject:2,rel:4,relat:5,releas:12,remain:5,remov:[2,4,5],remove_edg:4,remove_nod:4,repres:4,represent:2,res:4,resid:[2,4],result:[2,5,12],rtype:4,rule:[2,3],run:[7,8,9,10],runtest:[7,8,9,10],same:5,sampl:[4,5,12],sample_fram:[5,12],sample_import:[0,1,13,14],sample_path:[0,1,2,13,14],sampled_cim:7,sampleimport:5,samplepath:[2,4,12],samples_label:5,save:[2,12],save_plot_estimated_structure_graph:2,save_result:[2,12],scalar_index:2,scalar_indexes_struct:2,score:2,se1:12,search:[2,3,13],second:2,see:5,select:12,self:[2,5,12],sep:2,sep_set:2,set:[2,4,5,7,8,9,10],set_of_cim:[0,1,2,5,13,14],setofcim:[2,4,5,12],setupclass:[7,8,9,10],shift:[4,5],shifted_cols_head:5,show:2,signific:2,simbol:5,simpl:12,simpli:12,sinc:4,single_cim_xu_marginal_likelihood_q:2,single_cim_xu_marginal_likelihood_theta:2,single_internal_cim_xxu_marginal_likelihood_theta:2,size:[2,4],socim:5,sofc1:12,sorter:5,specif:[2,4,12],spuriou:2,spurious_edg:2,start:5,state:[2,4],state_res_tim:4,state_residence_tim:4,state_transition_matrix:4,statist:2,stop:[2,3],str:[2,3,4,5,12],string:[2,3,4,5],structur:[0,1,2,3,5,9,13,14],structure_constraint_based_estim:[0,1,13,14],structure_estim:[0,1,3,13,14],structure_estimation_exampl:12,structure_graph:[0,1,2,5,6,13,14],structure_label:5,structure_score_based_estim:[0,1,13,14],structureconstraintbasedestim:2,structureestim:[2,3,12],structurescorebasedestim:2,structut:4,style:2,submodul:[1,6,13,14],subpackag:[13,14],subset:2,suffici:2,suffuci:2,symbol:[4,5],synthet:5,t_xu_suff_stat:2,tabu:[2,3],tabu_length:[2,3],tabu_rules_dur:[2,3],tabu_search:[0,1,13,14],tabusearch:3,take:12,tar:12,task:[2,4],tau_xu:2,ternari:12,test:2,test_add_edg:9,test_add_nod:9,test_adjacency_matrix:7,test_buid_samplepath_no_concatenated_sampl:9,test_buid_samplepath_no_vari:9,test_build_cim:9,test_build_complete_graph:7,test_build_p_combs_structur:9,test_build_removable_edges_matrix:7,test_build_saplepath_no_prior_net_structur:9,test_build_sort:10,test_build_structur:9,test_build_structure_bad_sort:9,test_build_time_columns_filtering_structure_for_a_nod:9,test_build_time_scalar_indexing_structure_for_a_nod:9,test_build_trajectori:9,test_build_transition_columns_filtering_structur:9,test_build_transition_scalar_indexing_structure_for_a_nod:9,test_cach:6,test_child:2,test_cim:6,test_clear:10,test_clear_concatenated_fram:10,test_clear_data_frame_list:10,test_compute_cim_coeffici:9,test_compute_parameters_for_nod:7,test_compute_row_delta_in_all_fram:10,test_compute_row_delta_in_all_frames_not_init_sort:10,test_compute_row_delta_single_samples_fram:10,test_dataset_id:10,test_edges_oper:9,test_equ:9,test_fast_init:[7,9],test_file_path:10,test_filter_cims_with_mask:9,test_find:10,test_generate_possible_sub_sets_of_s:7,test_get_node_id:9,test_get_node_indx:9,test_get_ordered_by_indx_set_of_par:9,test_get_parents_by_id:9,test_get_positional_node_indx:9,test_get_states_numb:9,test_hill_climbing_search:6,test_import_data:10,test_import_sampled_cim:10,test_import_structur:10,test_import_vari:10,test_init:[7,9,10],test_init_not_filled_dataframs:9,test_init_not_initialized_import:9,test_json_import:6,test_networkgraph:6,test_normalize_trajectori:10,test_normalize_trajectories_wrong_indx:10,test_normalize_trajectories_wrong_kei:10,test_ord:10,test_par:2,test_parameters_estim:6,test_put:10,test_read_json_file_found:10,test_read_json_file_not_found:10,test_repr:9,test_sample_import:6,test_sample_path:6,test_save_plot_estimated_graph:7,test_save_result:7,test_setofcim:6,test_structur:[6,8],test_structure_1:7,test_structure_2:7,test_structure_3:[7,8],test_structure_constraint_based_estim:6,test_structure_estim:6,test_structure_monoprocesso:7,test_structure_score_based_estim:6,test_tabu_search:6,test_tim:7,test_trajectori:6,testcach:10,testcas:[7,8,9,10],testconditionalintensitymatrix:9,testhillclimbingsearch:8,testjsonimport:10,testnetworkgraph:9,testparametersestimatior:7,testsampleimport:10,testsamplepath:9,testsetofcim:9,teststructur:9,teststructureconstraintbasedestim:7,teststructureestim:7,teststructurescorebasedestim:7,testtabusearch:8,testtrajectori:9,tha:5,theta:2,thi:[2,4,5,12],three:12,threshold:2,thumb:2,thumb_threshold:2,thumb_valu:2,time:[2,4,5,12],time_filt:4,time_kei:5,time_scalar_indexing_strucur:4,timestamp:5,to_nod:5,tot_vars_count:[2,3],total:[2,4],total_variables_count:4,total_variables_numb:4,traj:5,trajecory_head:5,trajectori:[0,1,2,5,12,13,14],trajectories_kei:5,trajectory_list:5,trajectri:12,transit:[2,4,5],transition_filt:4,transition_matric:4,transition_scalar_indexing_structur:4,tri:5,tupl:4,tutori:5,two:2,type:[2,3,4,5,12],union:5,uniqu:5,unittest:[7,8,9,10],unus:4,usag:[13,14],use:[2,12],used:[2,3,4,5],using:[2,3,4,5],util:[0,1,4,6,13,14],valid:2,valu:[2,3,4,5,9,12],values_list:12,var_id:2,variabl:[2,3,4,5,12],variable_cardin:5,variable_cim_xu_marginal_likelihood_q:2,variable_cim_xu_marginal_likelihood_theta:2,variable_label:5,variables_kei:5,variables_label:5,vector:[2,4],want:12,when:2,where:5,which:[2,3,4,5],whl:12,who:2,without:[2,3],you:[2,5,12],your:[13,14]},titles:["PyCTBN package","PyCTBN.PyCTBN package","PyCTBN.PyCTBN.estimators package","PyCTBN.PyCTBN.optimizers package","PyCTBN.PyCTBN.structure_graph package","PyCTBN.PyCTBN.utility package","PyCTBN.tests package","PyCTBN.tests.estimators package","PyCTBN.tests.optimizers package","PyCTBN.tests.structure_graph package","PyCTBN.tests.utility package","basic_main module","Examples","Welcome to PyCTBN\u2019s documentation!","PyCTBN","setup module"],titleterms:{"import":12,abstract_import:5,basic_main:11,cach:5,conditional_intensity_matrix:4,constraint_based_optim:3,content:[0,1,2,3,4,5,6,7,8,9,10],data:12,document:13,estim:[2,7,12],exampl:12,fam_score_calcul:2,hill_climbing_search:3,implement:12,indic:13,instal:12,json_import:5,modul:[0,1,2,3,4,5,6,7,8,9,10,11,15],network_graph:4,optim:[3,8],own:12,packag:[0,1,2,3,4,5,6,7,8,9,10],paramet:12,parameters_estim:2,pyctbn:[0,1,2,3,4,5,6,7,8,9,10,13,14],sample_import:5,sample_path:4,set_of_cim:4,setup:15,structur:[4,12],structure_constraint_based_estim:2,structure_estim:2,structure_graph:[4,9],structure_score_based_estim:2,submodul:[0,2,3,4,5,7,8,9,10],subpackag:[0,1,6],tabl:13,tabu_search:3,test:[6,7,8,9,10],test_cach:10,test_cim:9,test_hill_climbing_search:8,test_json_import:10,test_networkgraph:9,test_parameters_estim:7,test_sample_import:10,test_sample_path:9,test_setofcim:9,test_structur:9,test_structure_constraint_based_estim:7,test_structure_estim:7,test_structure_score_based_estim:7,test_tabu_search:8,test_trajectori:9,trajectori:4,usag:12,util:[5,10],welcom:13,your:12}}) \ No newline at end of file +Search.setIndex({docnames:["PyCTBN","PyCTBN.PyCTBN","PyCTBN.PyCTBN.estimators","PyCTBN.PyCTBN.optimizers","PyCTBN.PyCTBN.structure_graph","PyCTBN.PyCTBN.utility","PyCTBN.tests","PyCTBN.tests.estimators","PyCTBN.tests.optimizers","PyCTBN.tests.structure_graph","PyCTBN.tests.utility","basic_main","example","examples","index","modules","setup"],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","PyCTBN.PyCTBN.rst","PyCTBN.PyCTBN.estimators.rst","PyCTBN.PyCTBN.optimizers.rst","PyCTBN.PyCTBN.structure_graph.rst","PyCTBN.PyCTBN.utility.rst","PyCTBN.tests.rst","PyCTBN.tests.estimators.rst","PyCTBN.tests.optimizers.rst","PyCTBN.tests.structure_graph.rst","PyCTBN.tests.utility.rst","basic_main.rst","example.rst","examples.rst","index.rst","modules.rst","setup.rst"],objects:{"":{PyCTBN:[0,0,0,"-"]},"PyCTBN.PyCTBN":{estimators:[2,0,0,"-"],optimizers:[3,0,0,"-"],structure_graph:[4,0,0,"-"],utility:[5,0,0,"-"]},"PyCTBN.PyCTBN.estimators":{fam_score_calculator:[2,0,0,"-"],parameters_estimator:[2,0,0,"-"],structure_constraint_based_estimator:[2,0,0,"-"],structure_estimator:[2,0,0,"-"],structure_score_based_estimator:[2,0,0,"-"]},"PyCTBN.PyCTBN.estimators.fam_score_calculator":{FamScoreCalculator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator":{get_fam_score:[2,2,1,""],marginal_likelihood_q:[2,2,1,""],marginal_likelihood_theta:[2,2,1,""],single_cim_xu_marginal_likelihood_q:[2,2,1,""],single_cim_xu_marginal_likelihood_theta:[2,2,1,""],single_internal_cim_xxu_marginal_likelihood_theta:[2,2,1,""],variable_cim_xu_marginal_likelihood_q:[2,2,1,""],variable_cim_xu_marginal_likelihood_theta:[2,2,1,""]},"PyCTBN.PyCTBN.estimators.parameters_estimator":{ParametersEstimator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator":{compute_parameters_for_node:[2,2,1,""],compute_state_res_time_for_node:[2,2,1,""],compute_state_transitions_for_a_node:[2,2,1,""],fast_init:[2,2,1,""]},"PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator":{StructureConstraintBasedEstimator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator":{complete_test:[2,2,1,""],compute_thumb_value:[2,2,1,""],ctpc_algorithm:[2,2,1,""],estimate_structure:[2,2,1,""],independence_test:[2,2,1,""],one_iteration_of_CTPC_algorithm:[2,2,1,""]},"PyCTBN.PyCTBN.estimators.structure_estimator":{StructureEstimator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator":{adjacency_matrix:[2,2,1,""],build_complete_graph:[2,2,1,""],build_removable_edges_matrix:[2,2,1,""],estimate_structure:[2,2,1,""],generate_possible_sub_sets_of_size:[2,2,1,""],save_plot_estimated_structure_graph:[2,2,1,""],save_results:[2,2,1,""],spurious_edges:[2,2,1,""]},"PyCTBN.PyCTBN.estimators.structure_score_based_estimator":{StructureScoreBasedEstimator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator":{estimate_parents:[2,2,1,""],estimate_structure:[2,2,1,""],get_score_from_graph:[2,2,1,""]},"PyCTBN.PyCTBN.optimizers":{constraint_based_optimizer:[3,0,0,"-"],hill_climbing_search:[3,0,0,"-"],optimizer:[3,0,0,"-"],tabu_search:[3,0,0,"-"]},"PyCTBN.PyCTBN.optimizers.constraint_based_optimizer":{ConstraintBasedOptimizer:[3,1,1,""]},"PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer":{optimize_structure:[3,2,1,""]},"PyCTBN.PyCTBN.optimizers.hill_climbing_search":{HillClimbing:[3,1,1,""]},"PyCTBN.PyCTBN.optimizers.hill_climbing_search.HillClimbing":{optimize_structure:[3,2,1,""]},"PyCTBN.PyCTBN.optimizers.optimizer":{Optimizer:[3,1,1,""]},"PyCTBN.PyCTBN.optimizers.optimizer.Optimizer":{optimize_structure:[3,2,1,""]},"PyCTBN.PyCTBN.optimizers.tabu_search":{TabuSearch:[3,1,1,""]},"PyCTBN.PyCTBN.optimizers.tabu_search.TabuSearch":{optimize_structure:[3,2,1,""]},"PyCTBN.PyCTBN.structure_graph":{conditional_intensity_matrix:[4,0,0,"-"],network_generator:[4,0,0,"-"],network_graph:[4,0,0,"-"],sample_path:[4,0,0,"-"],set_of_cims:[4,0,0,"-"],structure:[4,0,0,"-"],trajectory:[4,0,0,"-"],trajectory_generator:[4,0,0,"-"]},"PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix":{ConditionalIntensityMatrix:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix":{cim:[4,2,1,""],compute_cim_coefficients:[4,2,1,""],state_residence_times:[4,2,1,""],state_transition_matrix:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.network_generator":{NetworkGenerator:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.network_generator.NetworkGenerator":{cims:[4,2,1,""],dyn_str:[4,2,1,""],generate_cims:[4,2,1,""],generate_graph:[4,2,1,""],graph:[4,2,1,""],variables:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.network_graph":{NetworkGraph:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph":{add_edges:[4,2,1,""],add_nodes:[4,2,1,""],build_p_comb_structure_for_a_node:[4,2,1,""],build_time_columns_filtering_for_a_node:[4,2,1,""],build_time_scalar_indexing_structure_for_a_node:[4,2,1,""],build_transition_filtering_for_a_node:[4,2,1,""],build_transition_scalar_indexing_structure_for_a_node:[4,2,1,""],clear_indexing_filtering_structures:[4,2,1,""],edges:[4,2,1,""],fast_init:[4,2,1,""],get_node_indx:[4,2,1,""],get_ordered_by_indx_set_of_parents:[4,2,1,""],get_parents_by_id:[4,2,1,""],get_positional_node_indx:[4,2,1,""],get_states_number:[4,2,1,""],has_edge:[4,2,1,""],nodes:[4,2,1,""],nodes_indexes:[4,2,1,""],nodes_values:[4,2,1,""],p_combs:[4,2,1,""],remove_edges:[4,2,1,""],remove_node:[4,2,1,""],time_filtering:[4,2,1,""],time_scalar_indexing_strucure:[4,2,1,""],transition_filtering:[4,2,1,""],transition_scalar_indexing_structure:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.sample_path":{SamplePath:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath":{build_structure:[4,2,1,""],build_trajectories:[4,2,1,""],clear_memory:[4,2,1,""],has_prior_net_structure:[4,2,1,""],structure:[4,2,1,""],total_variables_count:[4,2,1,""],trajectories:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.set_of_cims":{SetOfCims:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims":{actual_cims:[4,2,1,""],build_cims:[4,2,1,""],build_times_and_transitions_structures:[4,2,1,""],filter_cims_with_mask:[4,2,1,""],get_cims_number:[4,2,1,""],p_combs:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.structure":{Structure:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.structure.Structure":{add_edge:[4,2,1,""],clean_structure_edges:[4,2,1,""],contains_edge:[4,2,1,""],edges:[4,2,1,""],get_node_id:[4,2,1,""],get_node_indx:[4,2,1,""],get_positional_node_indx:[4,2,1,""],get_states_number:[4,2,1,""],nodes_indexes:[4,2,1,""],nodes_labels:[4,2,1,""],nodes_values:[4,2,1,""],remove_edge:[4,2,1,""],remove_node:[4,2,1,""],total_variables_number:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.trajectory":{Trajectory:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory":{complete_trajectory:[4,2,1,""],size:[4,2,1,""],times:[4,2,1,""],trajectory:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.trajectory_generator":{TrajectoryGenerator:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.trajectory_generator.TrajectoryGenerator":{CTBN_Sample:[4,2,1,""],multi_trajectory:[4,2,1,""],worker:[4,2,1,""]},"PyCTBN.PyCTBN.utility":{abstract_exporter:[5,0,0,"-"],abstract_importer:[5,0,0,"-"],cache:[5,0,0,"-"],json_exporter:[5,0,0,"-"],json_importer:[5,0,0,"-"],sample_importer:[5,0,0,"-"]},"PyCTBN.PyCTBN.utility.abstract_exporter":{AbstractExporter:[5,1,1,""]},"PyCTBN.PyCTBN.utility.abstract_exporter.AbstractExporter":{add_trajectory:[5,2,1,""],out_file:[5,2,1,""]},"PyCTBN.PyCTBN.utility.abstract_importer":{AbstractImporter:[5,1,1,""]},"PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter":{build_list_of_samples_array:[5,2,1,""],build_sorter:[5,2,1,""],clear_concatenated_frame:[5,2,1,""],compute_row_delta_in_all_samples_frames:[5,2,1,""],compute_row_delta_sigle_samples_frame:[5,2,1,""],concatenated_samples:[5,2,1,""],dataset_id:[5,2,1,""],file_path:[5,2,1,""],sorter:[5,2,1,""],structure:[5,2,1,""],variables:[5,2,1,""]},"PyCTBN.PyCTBN.utility.cache":{Cache:[5,1,1,""]},"PyCTBN.PyCTBN.utility.cache.Cache":{clear:[5,2,1,""],find:[5,2,1,""],put:[5,2,1,""]},"PyCTBN.PyCTBN.utility.json_exporter":{JsonExporter:[5,1,1,""]},"PyCTBN.PyCTBN.utility.json_exporter.JsonExporter":{cims_to_json:[5,2,1,""],out_file:[5,2,1,""]},"PyCTBN.PyCTBN.utility.json_importer":{JsonImporter:[5,1,1,""]},"PyCTBN.PyCTBN.utility.json_importer.JsonImporter":{build_sorter:[5,2,1,""],clear_data_frame_list:[5,2,1,""],dataset_id:[5,2,1,""],import_data:[5,2,1,""],import_sampled_cims:[5,2,1,""],import_structure:[5,2,1,""],import_trajectories:[5,2,1,""],import_variables:[5,2,1,""],normalize_trajectories:[5,2,1,""],one_level_normalizing:[5,2,1,""],read_json_file:[5,2,1,""]},"PyCTBN.PyCTBN.utility.sample_importer":{SampleImporter:[5,1,1,""]},"PyCTBN.PyCTBN.utility.sample_importer.SampleImporter":{build_sorter:[5,2,1,""],dataset_id:[5,2,1,""],import_data:[5,2,1,""]},"PyCTBN.tests":{estimators:[7,0,0,"-"],optimizers:[8,0,0,"-"],structure_graph:[9,0,0,"-"],utility:[10,0,0,"-"]},"PyCTBN.tests.estimators":{test_parameters_estimator:[7,0,0,"-"],test_structure_constraint_based_estimator:[7,0,0,"-"],test_structure_estimator:[7,0,0,"-"],test_structure_score_based_estimator:[7,0,0,"-"]},"PyCTBN.tests.estimators.test_parameters_estimator":{TestParametersEstimatior:[7,1,1,""]},"PyCTBN.tests.estimators.test_parameters_estimator.TestParametersEstimatior":{aux_import_sampled_cims:[7,2,1,""],cim_equality_test:[7,2,1,""],equality_of_cims_of_node:[7,2,1,""],setUpClass:[7,2,1,""],test_compute_parameters_for_node:[7,2,1,""],test_fast_init:[7,2,1,""]},"PyCTBN.tests.estimators.test_structure_constraint_based_estimator":{TestStructureConstraintBasedEstimator:[7,1,1,""]},"PyCTBN.tests.estimators.test_structure_constraint_based_estimator.TestStructureConstraintBasedEstimator":{setUpClass:[7,2,1,""],test_structure_1:[7,2,1,""],test_structure_2:[7,2,1,""],test_structure_3:[7,2,1,""]},"PyCTBN.tests.estimators.test_structure_estimator":{TestStructureEstimator:[7,1,1,""]},"PyCTBN.tests.estimators.test_structure_estimator.TestStructureEstimator":{setUpClass:[7,2,1,""],test_adjacency_matrix:[7,2,1,""],test_build_complete_graph:[7,2,1,""],test_build_removable_edges_matrix:[7,2,1,""],test_generate_possible_sub_sets_of_size:[7,2,1,""],test_init:[7,2,1,""],test_save_plot_estimated_graph:[7,2,1,""],test_save_results:[7,2,1,""],test_time:[7,2,1,""]},"PyCTBN.tests.estimators.test_structure_score_based_estimator":{TestStructureScoreBasedEstimator:[7,1,1,""]},"PyCTBN.tests.estimators.test_structure_score_based_estimator.TestStructureScoreBasedEstimator":{setUpClass:[7,2,1,""],test_structure_1:[7,2,1,""],test_structure_2:[7,2,1,""],test_structure_3:[7,2,1,""],test_structure_monoprocesso:[7,2,1,""]},"PyCTBN.tests.optimizers":{test_hill_climbing_search:[8,0,0,"-"],test_tabu_search:[8,0,0,"-"]},"PyCTBN.tests.optimizers.test_hill_climbing_search":{TestHillClimbingSearch:[8,1,1,""]},"PyCTBN.tests.optimizers.test_hill_climbing_search.TestHillClimbingSearch":{setUpClass:[8,2,1,""],test_structure:[8,2,1,""],test_structure_3:[8,2,1,""]},"PyCTBN.tests.optimizers.test_tabu_search":{TestTabuSearch:[8,1,1,""]},"PyCTBN.tests.optimizers.test_tabu_search.TestTabuSearch":{setUpClass:[8,2,1,""],test_structure:[8,2,1,""],test_structure_3:[8,2,1,""]},"PyCTBN.tests.structure_graph":{test_cim:[9,0,0,"-"],test_networkgenerator:[9,0,0,"-"],test_networkgraph:[9,0,0,"-"],test_sample_path:[9,0,0,"-"],test_setofcims:[9,0,0,"-"],test_structure:[9,0,0,"-"],test_trajectory:[9,0,0,"-"],test_trajectorygenerator:[9,0,0,"-"]},"PyCTBN.tests.structure_graph.test_cim":{TestConditionalIntensityMatrix:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_cim.TestConditionalIntensityMatrix":{setUpClass:[9,2,1,""],test_compute_cim_coefficients:[9,2,1,""],test_init:[9,2,1,""],test_repr:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_networkgenerator":{TestNetworkGenerator:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_networkgenerator.TestNetworkGenerator":{test_generate_cims:[9,2,1,""],test_generate_graph:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_networkgraph":{TestNetworkGraph:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_networkgraph.TestNetworkGraph":{aux_build_p_combs_structure:[9,2,1,""],aux_build_time_columns_filtering_structure_for_a_node:[9,2,1,""],aux_build_time_scalar_indexing_structure_for_a_node:[9,2,1,""],aux_build_transition_columns_filtering_structure:[9,2,1,""],aux_build_transition_scalar_indexing_structure_for_a_node:[9,2,1,""],setUpClass:[9,2,1,""],test_add_edges:[9,2,1,""],test_add_nodes:[9,2,1,""],test_build_p_combs_structure:[9,2,1,""],test_build_time_columns_filtering_structure_for_a_node:[9,2,1,""],test_build_time_scalar_indexing_structure_for_a_node:[9,2,1,""],test_build_transition_columns_filtering_structure:[9,2,1,""],test_build_transition_scalar_indexing_structure_for_a_node:[9,2,1,""],test_fast_init:[9,2,1,""],test_get_node_indx:[9,2,1,""],test_get_ordered_by_indx_set_of_parents:[9,2,1,""],test_get_parents_by_id:[9,2,1,""],test_get_states_number:[9,2,1,""],test_init:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_sample_path":{TestSamplePath:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_sample_path.TestSamplePath":{setUpClass:[9,2,1,""],test_buid_samplepath_no_concatenated_samples:[9,2,1,""],test_buid_samplepath_no_variables:[9,2,1,""],test_build_saplepath_no_prior_net_structure:[9,2,1,""],test_build_structure:[9,2,1,""],test_build_structure_bad_sorter:[9,2,1,""],test_build_trajectories:[9,2,1,""],test_init:[9,2,1,""],test_init_not_filled_dataframse:[9,2,1,""],test_init_not_initialized_importer:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_setofcims":{TestSetOfCims:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_setofcims.TestSetOfCims":{another_filtering_method:[9,2,1,""],aux_test_build_cims:[9,2,1,""],aux_test_init:[9,2,1,""],build_p_comb_structure_for_a_node:[9,2,1,""],setUpClass:[9,2,1,""],test_build_cims:[9,2,1,""],test_filter_cims_with_mask:[9,2,1,""],test_init:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_structure":{TestStructure:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_structure.TestStructure":{setUpClass:[9,2,1,""],test_edges_operations:[9,2,1,""],test_equality:[9,2,1,""],test_get_node_id:[9,2,1,""],test_get_node_indx:[9,2,1,""],test_get_positional_node_indx:[9,2,1,""],test_get_states_number:[9,2,1,""],test_init:[9,2,1,""],test_repr:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_trajectory":{TestTrajectory:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_trajectory.TestTrajectory":{setUpClass:[9,2,1,""],test_init:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_trajectorygenerator":{TestTrajectoryGenerator:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_trajectorygenerator.TestTrajectoryGenerator":{setUpClass:[9,2,1,""],test_generated_trajectory:[9,2,1,""],test_generated_trajectory_max_tr:[9,2,1,""],test_init:[9,2,1,""],test_multi_trajectory:[9,2,1,""]},"PyCTBN.tests.utility":{test_cache:[10,0,0,"-"],test_json_importer:[10,0,0,"-"],test_sample_importer:[10,0,0,"-"]},"PyCTBN.tests.utility.test_cache":{TestCache:[10,1,1,""]},"PyCTBN.tests.utility.test_cache.TestCache":{test_clear:[10,2,1,""],test_find:[10,2,1,""],test_init:[10,2,1,""],test_put:[10,2,1,""]},"PyCTBN.tests.utility.test_json_importer":{TestJsonImporter:[10,1,1,""]},"PyCTBN.tests.utility.test_json_importer.TestJsonImporter":{ordered:[10,2,1,""],setUpClass:[10,2,1,""],test_build_sorter:[10,2,1,""],test_clear_concatenated_frame:[10,2,1,""],test_clear_data_frame_list:[10,2,1,""],test_compute_row_delta_in_all_frames:[10,2,1,""],test_compute_row_delta_in_all_frames_not_init_sorter:[10,2,1,""],test_compute_row_delta_single_samples_frame:[10,2,1,""],test_dataset_id:[10,2,1,""],test_file_path:[10,2,1,""],test_import_data:[10,2,1,""],test_import_sampled_cims:[10,2,1,""],test_import_structure:[10,2,1,""],test_import_variables:[10,2,1,""],test_init:[10,2,1,""],test_normalize_trajectories:[10,2,1,""],test_normalize_trajectories_wrong_indx:[10,2,1,""],test_normalize_trajectories_wrong_key:[10,2,1,""],test_read_json_file_found:[10,2,1,""],test_read_json_file_not_found:[10,2,1,""]},"PyCTBN.tests.utility.test_sample_importer":{TestSampleImporter:[10,1,1,""]},"PyCTBN.tests.utility.test_sample_importer.TestSampleImporter":{ordered:[10,2,1,""],setUpClass:[10,2,1,""],test_init:[10,2,1,""],test_order:[10,2,1,""]},PyCTBN:{PyCTBN:[1,0,0,"-"],tests:[6,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":[2,3,4,5,13],"boolean":[2,4],"case":[4,7,8,9,10],"class":[2,3,4,5,7,8,9,10,13],"default":[2,3,5],"float":[2,4],"function":2,"import":[4,5,14],"int":[2,3,4,5],"new":5,"null":2,"return":[2,3,4,5,9,13],"static":[2,4],"super":13,"true":[2,13],"var":13,For:4,HAS:5,Has:[2,4],NOT:2,The:[2,4,5,13],Use:[2,13],__actual_cach:5,__generate_cim:4,__init__:13,__list_of_sets_of_par:5,_actual_cim:4,_actual_trajectori:4,_aggregated_info_about_nodes_par:4,_array_indx:5,_cach:2,_cim:4,_complete_graph:2,_df_samples_list:[5,13],_df_structur:5,_df_variabl:[5,13],_dyn_cim:5,_dyn_str:5,_file_path:13,_generated_trajectori:4,_graph:[4,13],_import:4,_indx:4,_label:4,_net_graph:2,_node:2,_node_id:4,_nodes_indx:2,_nodes_v:2,_p_combs_structur:4,_parent:4,_raw_data:5,_sample_path:2,_single_set_of_cim:2,_sorter:[5,13],_state_residence_tim:4,_structur:4,_structure_label:5,_time:4,_time_filt:4,_time_scalar_indexing_structur:4,_total_variables_count:4,_total_variables_numb:4,_trajectori:[4,5],_transition_filt:4,_transition_matric:4,_transition_scalar_indexing_structur:4,_val:4,_variabl:5,_variables_label:5,_vname:4,abc:[3,5],about:[3,4],abstract_export:[0,1,14],abstract_import:[0,1,4,14],abstractexport:5,abstractimport:[4,5,13],accord:4,act:5,actual:[2,4],actual_cim:[4,13],add:[4,5],add_edg:4,add_nod:4,add_trajectori:5,added:[2,4,5],adding:4,addit:2,adjac:[2,13],adjacency_matrix:[2,13],after:[4,5],against:2,aggreg:4,algorithm:[2,3,13],all:[2,3,4,5,9,13],allow:4,along:5,alpha_xu:2,alpha_xxu:2,alreadi:[5,13],also:[2,4],ani:[2,3],anoth:4,another_filtering_method:9,approach:2,arc:5,arrai:[2,4,5,13],assign:2,assum:2,automat:2,aux_build_p_combs_structur:9,aux_build_time_columns_filtering_structure_for_a_nod:9,aux_build_time_scalar_indexing_structure_for_a_nod:9,aux_build_transition_columns_filtering_structur:9,aux_build_transition_scalar_indexing_structure_for_a_nod:9,aux_import_sampled_cim:7,aux_test_build_cim:9,aux_test_init:9,axi:13,base:[2,3,4,5,7,8,9,10],basic_main:15,bayesian:2,been:4,befor:[2,3,7,8,9,10],belong:[2,4],best:2,between:[4,5],bool:[2,4],both:[2,5],bound:4,build:[2,4,5,9,13],build_cim:4,build_complete_graph:2,build_list_of_samples_arrai:5,build_p_comb_structure_for_a_nod:[4,9],build_removable_edges_matrix:2,build_sort:[5,13],build_structur:[4,13],build_time_columns_filtering_for_a_nod:4,build_time_scalar_indexing_structure_for_a_nod:4,build_times_and_transitions_structur:4,build_trajectori:[4,13],build_transition_filtering_for_a_nod:4,build_transition_scalar_indexing_structure_for_a_nod:4,built:2,cach:[0,1,2,14],calcul:2,call:[5,13],can:5,cardin:[2,4,5,9],cardinalit:[4,5],care:4,caridin:4,caridinalit:4,chang:[4,5],check:4,chi:2,chi_test:2,chi_test_alfa:2,child:[2,3],child_indx:2,child_states_numb:2,child_val:2,cim1:[2,7],cim2:[2,7],cim:[2,4,5,13],cim_equality_test:7,cims_kei:5,cims_label:[5,7],cims_to_json:5,classmethod:[7,8,9,10],clean_structure_edg:4,clear:[4,5],clear_concatenated_fram:5,clear_data_frame_list:5,clear_indexing_filtering_structur:4,clear_memori:4,climb:[2,3],coeffici:4,col:4,cols_filt:2,column:[2,4,5,13],columns_head:5,comb:4,combin:[4,5,9],combinatori:[4,9],common:2,complet:[2,4,5],complete_test:2,complete_trajectori:4,comput:[2,3,4,5,13],compute_cim_coeffici:4,compute_parameters_for_nod:[2,13],compute_row_delta_in_all_samples_fram:[5,13],compute_row_delta_sigle_samples_fram:5,compute_state_res_time_for_nod:2,compute_state_transitions_for_a_nod:2,compute_thumb_valu:2,concatanated_sampl:5,concaten:[4,5],concatenated_sampl:5,condit:4,conditional_intensity_matrix:[0,1,2,14],conditionalintensitymatrix:[2,4],consid:[2,4],consider:4,constraint:2,constraint_based_optim:[0,1,14],constraintbasedoptim:3,construct:[4,5,13],conta:5,contain:[2,4,5,9],contains_edg:4,content:[14,15],convent:4,convert:[2,5],copi:5,core:[4,5],correct:[4,5],correspond:4,could:2,count:4,creat:[2,4,5,13],csv:13,csvimport:13,ctbn:2,ctbn_sampl:4,ctpc:[2,3,13],ctpc_algorithm:[2,13],current:[2,3,5],cut:5,dafram:5,data:[2,3,4,5,14],datafram:[4,5,13],dataset:[3,4,5],dataset_id:[5,13],datfram:5,def:13,defin:[4,5],definit:5,defualt:2,delta:[2,4,5],demonstr:13,densiti:4,describ:5,desir:[2,4],df_samples_list:5,dict:[4,5,13],dictionari:5,differ:5,differt:2,digraph:2,dimens:4,dir:13,direct:[2,4],directli:5,directori:5,disabl:[2,3],disable_multiprocess:2,distribuit:2,doc:5,doubl:4,download:13,drop:13,duplic:4,dyn:13,dyn_cim:[4,5],dyn_str:[4,5],each:[2,3,4,5],edg:[2,4,5,13],edges_list:4,end:[4,5],entir:2,equal:4,equality_of_cims_of_nod:7,est:13,estim:[0,1,3,4,6,14],estimate_par:2,estimate_structur:2,estimated_cim:7,everi:[4,5],exam:13,exampl:[5,14,15],exclud:2,exctract:5,execut:4,exist:[4,5],exp_test_alfa:2,exponenti:2,expos:5,extend:13,extens:[2,5],extract:[4,5],fals:[2,4],fam_score_calcul:[0,1,14],famscor:2,famscorecalcul:2,fast_init:[2,4,13],file:[2,5,13],file_path:[2,5,13],filenam:5,filepath:5,fill:[2,13],filter:[2,4],filter_cims_with_mask:4,find:[2,5],first:[2,13],fix:4,fixtur:[7,8,9,10],follow:[4,5],form:4,format:[5,13],formula:2,found:5,frame:[4,5],from:[4,5,13],from_nod:5,gener:[2,4,5],generate_cim:4,generate_graph:4,generate_possible_sub_sets_of_s:2,get:[2,5],get_cims_numb:4,get_fam_scor:2,get_node_id:4,get_node_indx:4,get_ordered_by_indx_set_of_par:4,get_parents_by_id:4,get_positional_node_indx:4,get_score_from_graph:2,get_states_numb:4,given:[2,4,5],glob:13,graph:[2,4,9,13],graph_struct:4,graphic:2,grid:[4,9],group:4,grpah:13,has:[4,5,13],has_edg:4,has_prior_net_structur:4,have:5,header:5,header_column:5,hill:[2,3],hill_climbing_search:[0,1,14],hillclimb:3,hold:[2,4],hook:[7,8,9,10],how:5,hyperparamet:2,hypothesi:2,identifi:[2,4,5],iff:2,implement:[3,4,5,14],import_data:[5,13],import_sampled_cim:5,import_structur:5,import_trajectori:5,import_vari:[5,13],improv:[2,3],includ:[2,5],independ:2,independence_test:2,index:[2,4,5,13,14],indic:[2,4],indx:5,info:[4,13],inform:[3,4,5],init:13,initi:[2,4,5,13],inplac:13,insid:13,instal:14,instanti:4,interest:4,interfac:3,intes:4,isn:4,item:4,iter:[2,3],iterations_numb:[2,3],its:[2,3],join:13,json:[2,5,13],json_export:[0,1,14],json_import:[0,1,14],jsonarrai:5,jsonexport:5,jsonimport:[5,13],just:4,keep:[2,3,5],kei:[4,5],kind:2,knowledg:2,known:2,known_edg:2,label:[2,3,4,5],last:4,latest:13,lenght:[2,3],level:[2,5],likelihood:2,list:[2,3,4,5,13],list_of_column:4,list_of_edg:4,list_of_nod:4,load:5,loop:2,m_xu_suff_stat:2,m_xxu_suff_stat:2,made:4,main:13,mandatori:4,margin:2,marginal_likelihood_q:2,marginal_likelihood_theta:2,mask:[4,9],mask_arr:4,matric:[2,4],matrix:[2,4,5,9,13],max_par:[2,3],max_tr:4,max_val:4,maximum:[2,3,4],member:[4,5],mention:4,merg:5,method:[2,4,5,7,8,9,10],methodnam:[7,8,9,10],min_val:4,minimum:4,model:2,modul:[14,15],more:5,multi_trajectori:4,multipl:5,multiprocess:2,must:[4,5],name:[2,4,5,13],ndarrai:[2,4,5],necessari:[2,4,5],nest:5,net:[2,3,4,5,13],net_graph:2,network:[2,4,5],network_gener:[0,1,14],network_graph:[0,1,2,14],networkgener:4,networkgraph:[2,4,13],networkx:2,node:[2,3,4,5,9,13],node_id:[2,3,4,9],node_index:4,node_indx:[2,4],node_st:[4,9],node_states_numb:[4,9],nodes_index:4,nodes_indexes_arr:4,nodes_label:4,nodes_labels_list:4,nodes_numb:4,nodes_vals_arr:4,nodes_valu:[4,13],none:[2,3,4,5,7,9,10,13],normal:5,normalize_trajectori:5,number:[2,3,4],numpi:[2,4,5,9],obj:[10,13],object:[2,3,4,5,13],obvious:4,one:[4,5],one_iteration_of_ctpc_algorithm:2,one_level_norm:5,onli:5,oper:2,optim:[0,1,2,6,14],optimize_structur:3,option:[2,3],order:[2,4,5,10],origin:5,original_cols_numb:4,otherwis:[2,4,5],out:5,out_fil:5,outer:[5,13],output:[4,5],over:2,own:14,p_comb:[4,9],p_indx:[4,9],p_val:9,p_valu:9,packag:[14,15],page:14,panda:[4,5,13],parallel:4,param:4,paramet:[2,3,4,5,9,14],parameters_estim:[0,1,14],parametersestim:[2,13],parent:[2,3,4,5],parent_indx:2,parent_label:2,parent_set:2,parent_set_v:2,parent_v:2,parent_valu:9,parents_cardin:4,parents_comb:5,parents_index:4,parents_indx:9,parents_label:[4,9],parents_states_numb:[4,9],parents_v:[4,9],parents_valu:[4,9],part:[2,4],particular:[2,5],pass:13,path:[2,5,13],patienc:[2,3],peest:13,perform:2,pip:13,place:5,plot:2,png:2,posit:[4,5],possibl:[2,4],predict:3,prepar:5,present:[2,5],previous:5,print:13,prior:[2,13],prior_net_structur:5,privat:4,probabl:4,process:[2,3,4,5],processes_numb:2,properli:5,properti:[4,5],provid:[4,5],put:5,pyctbn:13,q_xx:4,rappres:4,raw:5,raw_data:5,reach:4,read:[5,13],read_csv:13,read_csv_fil:13,read_fil:13,read_json_fil:5,real:[2,4,5,13],refer:[4,5],reject:2,rel:4,relat:[4,5],releas:13,remain:5,remov:[2,4,5],remove_edg:4,remove_nod:4,repres:4,represent:2,requir:4,res:4,resid:[2,4],respect:4,result:[2,4,5,13],row:4,rtype:4,rule:[2,3],run:[7,8,9,10],runtest:[7,8,9,10],same:[4,5],sampl:[4,5,13],sample_fram:[5,13],sample_import:[0,1,14],sample_path:[0,1,2,14],sampled_cim:7,sampleimport:5,samplepath:[2,4,13],samples_label:5,save:[2,5,13],save_plot_estimated_structure_graph:2,save_result:[2,13],scalar_index:2,scalar_indexes_struct:2,score:2,se1:13,search:[2,3,14],second:2,see:5,select:13,self:[2,5,13],sep:2,sep_set:2,set:[2,4,5,7,8,9,10],set_of_cim:[0,1,2,5,14],setofcim:[2,4,5,13],setup:15,setupclass:[7,8,9,10],share:4,shift:[4,5],shifted_cols_head:5,show:2,signific:2,simbol:5,simpl:13,simpli:13,sinc:4,singl:4,single_cim_xu_marginal_likelihood_q:2,single_cim_xu_marginal_likelihood_theta:2,single_internal_cim_xxu_marginal_likelihood_theta:2,size:[2,4],socim:5,sofc1:13,sorter:5,specif:[2,4,13],specifi:4,spuriou:2,spurious_edg:2,start:5,state:[2,4],state_res_tim:4,state_residence_tim:4,state_transition_matrix:4,statist:2,stop:[2,3],str:[2,3,4,5,13],string:[2,3,4,5],structur:[0,1,2,3,5,9,14],structure_constraint_based_estim:[0,1,14],structure_estim:[0,1,3,14],structure_estimation_exampl:13,structure_graph:[0,1,2,5,6,14],structure_label:5,structure_score_based_estim:[0,1,14],structureconstraintbasedestim:2,structureestim:[2,3,13],structurescorebasedestim:2,structut:4,style:2,submodul:[1,6,14,15],subpackag:[14,15],subsequ:5,subset:2,suffici:2,suffuci:2,symbol:[4,5],synthet:5,t_end:4,t_xu_suff_stat:2,tabu:[2,3],tabu_length:[2,3],tabu_rules_dur:[2,3],tabu_search:[0,1,14],tabusearch:3,take:[4,13],taken:4,tar:13,task:[2,4],tau_xu:2,ternari:13,test:[0,2,15],test_add_edg:9,test_add_nod:9,test_adjacency_matrix:7,test_buid_samplepath_no_concatenated_sampl:9,test_buid_samplepath_no_vari:9,test_build_cim:9,test_build_complete_graph:7,test_build_p_combs_structur:9,test_build_removable_edges_matrix:7,test_build_saplepath_no_prior_net_structur:9,test_build_sort:10,test_build_structur:9,test_build_structure_bad_sort:9,test_build_time_columns_filtering_structure_for_a_nod:9,test_build_time_scalar_indexing_structure_for_a_nod:9,test_build_trajectori:9,test_build_transition_columns_filtering_structur:9,test_build_transition_scalar_indexing_structure_for_a_nod:9,test_cach:[0,6],test_child:2,test_cim:[0,6],test_clear:10,test_clear_concatenated_fram:10,test_clear_data_frame_list:10,test_compute_cim_coeffici:9,test_compute_parameters_for_nod:7,test_compute_row_delta_in_all_fram:10,test_compute_row_delta_in_all_frames_not_init_sort:10,test_compute_row_delta_single_samples_fram:10,test_dataset_id:10,test_edges_oper:9,test_equ:9,test_fast_init:[7,9],test_file_path:10,test_filter_cims_with_mask:9,test_find:10,test_generate_cim:9,test_generate_graph:9,test_generate_possible_sub_sets_of_s:7,test_generated_trajectori:9,test_generated_trajectory_max_tr:9,test_get_node_id:9,test_get_node_indx:9,test_get_ordered_by_indx_set_of_par:9,test_get_parents_by_id:9,test_get_positional_node_indx:9,test_get_states_numb:9,test_hill_climbing_search:[0,6],test_import_data:10,test_import_sampled_cim:10,test_import_structur:10,test_import_vari:10,test_init:[7,9,10],test_init_not_filled_dataframs:9,test_init_not_initialized_import:9,test_json_import:[0,6],test_multi_trajectori:9,test_networkgener:[0,6],test_networkgraph:[0,6],test_normalize_trajectori:10,test_normalize_trajectories_wrong_indx:10,test_normalize_trajectories_wrong_kei:10,test_ord:10,test_par:2,test_parameters_estim:[0,6],test_put:10,test_read_json_file_found:10,test_read_json_file_not_found:10,test_repr:9,test_sample_import:[0,6],test_sample_path:[0,6],test_save_plot_estimated_graph:7,test_save_result:7,test_setofcim:[0,6],test_structur:[0,6,8],test_structure_1:7,test_structure_2:7,test_structure_3:[7,8],test_structure_constraint_based_estim:[0,6],test_structure_estim:[0,6],test_structure_monoprocesso:7,test_structure_score_based_estim:[0,6],test_tabu_search:[0,6],test_tim:7,test_trajectori:[0,6],test_trajectorygener:[0,6],testcach:10,testcas:[7,8,9,10],testconditionalintensitymatrix:9,testhillclimbingsearch:8,testjsonimport:10,testnetworkgener:9,testnetworkgraph:9,testparametersestimatior:7,testsampleimport:10,testsamplepath:9,testsetofcim:9,teststructur:9,teststructureconstraintbasedestim:7,teststructureestim:7,teststructurescorebasedestim:7,testtabusearch:8,testtrajectori:9,testtrajectorygener:9,tha:5,therefor:4,theta:2,thi:[2,4,5,13],three:13,threshold:2,thumb:2,thumb_threshold:2,thumb_valu:2,time:[2,4,5,13],time_filt:4,time_kei:5,time_scalar_indexing_strucur:4,timestamp:5,to_nod:5,tot_vars_count:[2,3],total:[2,4],total_variables_count:4,total_variables_numb:4,traj:5,trajecory_head:5,trajectori:[0,1,2,5,13,14],trajectories_kei:5,trajectory_gener:[0,1,14],trajectory_list:5,trajectorygener:4,trajectri:13,transit:[2,4,5],transition_filt:4,transition_matric:4,transition_scalar_indexing_structur:4,tri:5,tupl:4,tutori:5,two:[2,4],type:[2,3,4,5,13],union:5,uniqu:5,unittest:[7,8,9,10],unus:4,usag:14,use:[2,13],used:[2,3,4,5],using:[2,3,4,5],util:[0,1,4,6,14],val:4,valid:2,valu:[2,3,4,5,9,13],values_list:13,var_id:2,variabl:[2,3,4,5,13],variable_cardin:5,variable_cim_xu_marginal_likelihood_q:2,variable_cim_xu_marginal_likelihood_theta:2,variable_label:5,variables_kei:5,variables_label:5,vector:[2,4],want:13,when:[2,4],where:[4,5],whether:4,which:[2,3,4,5],whl:13,who:2,without:[2,3],worker:4,write:5,you:[2,5,13],your:14},titles:["PyCTBN package","PyCTBN.PyCTBN package","PyCTBN.PyCTBN.estimators package","PyCTBN.PyCTBN.optimizers package","PyCTBN.PyCTBN.structure_graph package","PyCTBN.PyCTBN.utility package","PyCTBN.tests package","PyCTBN.tests.estimators package","PyCTBN.tests.optimizers package","PyCTBN.tests.structure_graph package","PyCTBN.tests.utility package","basic_main module","example module","Examples","Welcome to PyCTBN\u2019s documentation!","PyCTBN","setup module"],titleterms:{"import":13,abstract_export:5,abstract_import:5,basic_main:[0,11],cach:5,conditional_intensity_matrix:4,constraint_based_optim:3,content:[0,1,2,3,4,5,6,7,8,9,10],data:13,document:14,estim:[2,7,13],exampl:[12,13],fam_score_calcul:2,hill_climbing_search:3,implement:13,indic:14,instal:13,json_export:5,json_import:5,modul:[0,1,2,3,4,5,6,7,8,9,10,11,12,16],network_gener:4,network_graph:4,optim:[3,8],own:13,packag:[0,1,2,3,4,5,6,7,8,9,10],paramet:13,parameters_estim:2,pyctbn:[0,1,2,3,4,5,6,7,8,9,10,14,15],sample_import:5,sample_path:4,set_of_cim:4,setup:[0,16],structur:[4,13],structure_constraint_based_estim:2,structure_estim:2,structure_graph:[4,9],structure_score_based_estim:2,submodul:[0,2,3,4,5,7,8,9,10],subpackag:[0,1,6],tabl:14,tabu_search:3,test:[6,7,8,9,10],test_cach:10,test_cim:9,test_hill_climbing_search:8,test_json_import:10,test_networkgener:9,test_networkgraph:9,test_parameters_estim:7,test_sample_import:10,test_sample_path:9,test_setofcim:9,test_structur:9,test_structure_constraint_based_estim:7,test_structure_estim:7,test_structure_score_based_estim:7,test_tabu_search:8,test_trajectori:9,test_trajectorygener:9,trajectori:4,trajectory_gener:4,usag:13,util:[5,10],welcom:14,your:13}}) \ No newline at end of file diff --git a/docs/PyCTBN.PyCTBN.estimators.html b/docs/PyCTBN.PyCTBN.estimators.html index 1644fa4..744c567 100644 --- a/docs/PyCTBN.PyCTBN.estimators.html +++ b/docs/PyCTBN.PyCTBN.estimators.html @@ -19,10 +19,6 @@ - - - - @@ -127,13 +123,13 @@

    PyCTBN.PyCTBN.estimators.fam_score_calculator module

    -
    -class PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator
    +
    +class PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator

    Bases: object

    Has the task of calculating the FamScore of a node by using a Bayesian score function

    -
    -get_fam_score(cims: numpy.array, tau_xu: float = 0.1, alpha_xu: float = 1)
    +
    +get_fam_score(cims: numpy.array, tau_xu: float = 0.1, alpha_xu: float = 1)

    Calculate the FamScore value of the node

    Parameters
    @@ -153,8 +149,8 @@
    -
    -marginal_likelihood_q(cims: numpy.array, tau_xu: float = 0.1, alpha_xu: float = 1)
    +
    +marginal_likelihood_q(cims: numpy.array, tau_xu: float = 0.1, alpha_xu: float = 1)

    Calculate the value of the marginal likelihood over q of the node identified by the label node_id

    Parameters
    @@ -174,8 +170,8 @@
    -
    -marginal_likelihood_theta(cims: PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix, alpha_xu: float, alpha_xxu: float)
    +
    +marginal_likelihood_theta(cims: PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix, alpha_xu: float, alpha_xxu: float)

    Calculate the FamScore value of the node identified by the label node_id

    Parameters
    @@ -195,8 +191,8 @@
    -
    -single_cim_xu_marginal_likelihood_q(M_xu_suff_stats: float, T_xu_suff_stats: float, tau_xu: float = 0.1, alpha_xu: float = 1)
    +
    +single_cim_xu_marginal_likelihood_q(M_xu_suff_stats: float, T_xu_suff_stats: float, tau_xu: float = 0.1, alpha_xu: float = 1)

    Calculate the marginal likelihood on q of the node when assumes a specif value and a specif parents’s assignment

    @@ -219,8 +215,8 @@ and a specif parents’s assignment

    -
    -single_cim_xu_marginal_likelihood_theta(index: int, cim: PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix, alpha_xu: float, alpha_xxu: float)
    +
    +single_cim_xu_marginal_likelihood_theta(index: int, cim: PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix, alpha_xu: float, alpha_xxu: float)

    Calculate the marginal likelihood on q of the node when assumes a specif value and a specif parents’s assignment

    @@ -241,8 +237,8 @@ and a specif parents’s assignment

    -
    -single_internal_cim_xxu_marginal_likelihood_theta(M_xxu_suff_stats: float, alpha_xxu: float = 1)
    +
    +single_internal_cim_xxu_marginal_likelihood_theta(M_xxu_suff_stats: float, alpha_xxu: float = 1)

    Calculate the second part of the marginal likelihood over theta formula

    Parameters
    @@ -261,8 +257,8 @@ and a specif parents’s assignment

    -
    -variable_cim_xu_marginal_likelihood_q(cim: PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix, tau_xu: float = 0.1, alpha_xu: float = 1)
    +
    +variable_cim_xu_marginal_likelihood_q(cim: PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix, tau_xu: float = 0.1, alpha_xu: float = 1)

    Calculate the value of the marginal likelihood over q given a cim

    Parameters
    @@ -282,8 +278,8 @@ and a specif parents’s assignment

    -
    -variable_cim_xu_marginal_likelihood_theta(cim: PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix, alpha_xu: float, alpha_xxu: float)
    +
    +variable_cim_xu_marginal_likelihood_theta(cim: PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix, alpha_xu: float, alpha_xxu: float)

    Calculate the value of the marginal likelihood over theta given a cim

    Parameters
    @@ -308,8 +304,8 @@ and a specif parents’s assignment

    PyCTBN.PyCTBN.estimators.parameters_estimator module

    -
    -class PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator(trajectories: PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory, net_graph: PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph)
    +
    +class PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator(trajectories: PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory, net_graph: PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph)

    Bases: object

    Has the task of computing the cims of particular node given the trajectories and the net structure in the graph _net_graph.

    @@ -325,8 +321,8 @@ in the graph _net_g
    -
    -compute_parameters_for_node(node_id: str)PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims
    +
    +compute_parameters_for_node(node_id: str)PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims

    Compute the CIMS of the node identified by the label node_id.

    Parameters
    @@ -342,8 +338,8 @@ in the graph _net_g
    -
    -static compute_state_res_time_for_node(times: numpy.ndarray, trajectory: numpy.ndarray, cols_filter: numpy.ndarray, scalar_indexes_struct: numpy.ndarray, T: numpy.ndarray)None
    +
    +static compute_state_res_time_for_node(times: numpy.ndarray, trajectory: numpy.ndarray, cols_filter: numpy.ndarray, scalar_indexes_struct: numpy.ndarray, T: numpy.ndarray) → None

    Compute the state residence times for a node and fill the matrix T with the results

    Parameters
    @@ -360,8 +356,8 @@ in the graph _net_g
    -
    -static compute_state_transitions_for_a_node(node_indx: int, trajectory: numpy.ndarray, cols_filter: numpy.ndarray, scalar_indexing: numpy.ndarray, M: numpy.ndarray)None
    +
    +static compute_state_transitions_for_a_node(node_indx: int, trajectory: numpy.ndarray, cols_filter: numpy.ndarray, scalar_indexing: numpy.ndarray, M: numpy.ndarray) → None

    Compute the state residence times for a node and fill the matrices M with the results.

    Parameters
    @@ -377,8 +373,8 @@ in the graph _net_g
    -
    -fast_init(node_id: str)None
    +
    +fast_init(node_id: str) → None

    Initializes all the necessary structures for the parameters estimation for the node node_id.

    Parameters
    @@ -393,8 +389,8 @@ in the graph _net_g

    PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator module

    -
    -class PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator(sample_path: PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath, exp_test_alfa: float, chi_test_alfa: float, known_edges: List = [], thumb_threshold: int = 25)
    +
    +class PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator(sample_path: PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath, exp_test_alfa: float, chi_test_alfa: float, known_edges: List = [], thumb_threshold: int = 25)

    Bases: PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator

    Has the task of estimating the network structure given the trajectories in samplepath by using a constraint-based approach.

    @@ -424,8 +420,8 @@ in the graph _net_g
    -
    -complete_test(test_parent: str, test_child: str, parent_set: List, child_states_numb: int, tot_vars_count: int, parent_indx, child_indx)bool
    +
    +complete_test(test_parent: str, test_child: str, parent_set: List, child_states_numb: int, tot_vars_count: int, parent_indx, child_indx) → bool

    Performs a complete independence test on the directed graphs G1 = {test_child U parent_set} G2 = {G1 U test_parent} (added as an additional parent of the test_child). Generates all the necessary structures and datas to perform the tests.

    @@ -449,8 +445,8 @@ Generates all the necessary structures and datas to perform the tests.

    -
    -compute_thumb_value(parent_val, child_val, parent_set_vals)
    +
    +compute_thumb_value(parent_val, child_val, parent_set_vals)

    Compute the value to test against the thumb_threshold.

    Parameters
    @@ -470,10 +466,8 @@ Generates all the necessary structures and datas to perform the tests.

    -
    ctpc_algorithm(disable_multiprocessing: bool = False, processes_number: int = None)
    -

    Compute the CTPC algorithm over the entire net.

    Parameters
    @@ -488,11 +482,9 @@ Generates all the necessary structures and datas to perform the tests.

    -
    estimate_structure(disable_multiprocessing: bool = False, processes_number: int = None)

    Compute the constraint-based algorithm to find the optimal structure

    -
    Parameters
      @@ -506,8 +498,8 @@ Generates all the necessary structures and datas to perform the tests.

    -
    -independence_test(child_states_numb: int, cim1: PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix, cim2: PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix, thumb_value: float, parent_indx, child_indx)bool
    +
    +independence_test(child_states_numb: int, cim1: PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix, cim2: PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix, thumb_value: float, parent_indx, child_indx) → bool

    Compute the actual independence test using two cims. It is performed first the exponential test and if the null hypothesis is not rejected, it is performed also the chi_test.

    @@ -529,8 +521,8 @@ it is performed also the chi_test.

    -
    -one_iteration_of_CTPC_algorithm(var_id: str, tot_vars_count: int)List
    +
    +one_iteration_of_CTPC_algorithm(var_id: str, tot_vars_count: int) → List

    Performs an iteration of the CTPC algorithm using the node var_id as test_child.

    Parameters
    @@ -545,8 +537,8 @@ it is performed also the chi_test.

    PyCTBN.PyCTBN.estimators.structure_estimator module

    -
    -class PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator(sample_path: PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath, known_edges: Optional[List] = None)
    +
    +class PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator(sample_path: PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath, known_edges: List = None)

    Bases: object

    Has the task of estimating the network structure given the trajectories in samplepath.

    @@ -570,8 +562,8 @@ it is performed also the chi_test.

    -
    -adjacency_matrix()numpy.ndarray
    +
    +adjacency_matrix() → numpy.ndarray

    Converts the estimated structure _complete_graph to a boolean adjacency matrix representation.

    Returns
    @@ -584,8 +576,8 @@ it is performed also the chi_test.

    -
    -static build_complete_graph(node_ids: List)networkx.classes.digraph.DiGraph
    +
    +static build_complete_graph(node_ids: List) → networkx.classes.digraph.DiGraph

    Builds a complete directed graph (no self loops) given the nodes labels in the list node_ids:

    Parameters
    @@ -601,8 +593,8 @@ it is performed also the chi_test.

    -
    -build_removable_edges_matrix(known_edges: List)
    +
    +build_removable_edges_matrix(known_edges: List)

    Builds a boolean matrix who shows if a edge could be removed or not, based on prior knowledge given:

    Parameters
    @@ -618,8 +610,8 @@ it is performed also the chi_test.

    -
    -abstract estimate_structure()List
    +
    +abstract estimate_structure() → List

    Abstract method to estimate the structure

    Returns
    @@ -632,8 +624,8 @@ it is performed also the chi_test.

    -
    -static generate_possible_sub_sets_of_size(u: List, size: int, parent_label: str)
    +
    +static generate_possible_sub_sets_of_size(u: List, size: int, parent_label: str)

    Creates a list containing all possible subsets of the list u of size size, that do not contains a the node identified by parent_label.

    @@ -654,11 +646,9 @@ that do not contains a the node identified by -
    save_plot_estimated_structure_graph(file_path: str) → None

    Plot the estimated structure in a graphical model style, use .png extension.

    -
    Parameters

    file_path – path to save the file to

    @@ -670,8 +660,8 @@ that do not contains a the node identified by -
    -save_results(file_path: str)None
    +
    +save_results(file_path: str) → None

    Save the estimated Structure to a .json file in file_path.

    Parameters
    @@ -681,8 +671,8 @@ that do not contains a the node identified by -
    -spurious_edges()List
    +
    +spurious_edges() → List
    Return the spurious edges present in the estimated structure, if a prior net structure is present in

    _sample_path.structure.

    @@ -703,8 +693,8 @@ that do not contains a the node identified by

    PyCTBN.PyCTBN.estimators.structure_score_based_estimator module

    -
    -class PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator(sample_path: PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath, tau_xu: int = 0.1, alpha_xu: int = 1, known_edges: List = [])
    +
    +class PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator(sample_path: PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath, tau_xu: int = 0.1, alpha_xu: int = 1, known_edges: List = [])

    Bases: PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator

    Has the task of estimating the network structure given the trajectories in samplepath by using a score based approach and differt kinds of optimization algorithms.

    @@ -719,8 +709,8 @@ using a score based approach and differt kinds of optimization algorithms.

    -
    -estimate_parents(node_id: str, max_parents: Optional[int] = None, iterations_number: int = 40, patience: int = 10, tabu_length: Optional[int] = None, tabu_rules_duration: int = 5, optimizer: str = 'hill')
    +
    +estimate_parents(node_id: str, max_parents: int = None, iterations_number: int = 40, patience: int = 10, tabu_length: int = None, tabu_rules_duration: int = 5, optimizer: str = 'hill')

    Use the FamScore of a node in order to find the best parent nodes

    Parameters
    @@ -744,10 +734,8 @@ using a score based approach and differt kinds of optimization algorithms.

    -
    estimate_structure(max_parents: int = None, iterations_number: int = 40, patience: int = None, tabu_length: int = None, tabu_rules_duration: int = None, optimizer: str = 'tabu', disable_multiprocessing: bool = False, processes_number: int = None)
    -

    Compute the score-based algorithm to find the optimal structure

    Parameters
    @@ -768,8 +756,8 @@ using a score based approach and differt kinds of optimization algorithms.

    -
    -get_score_from_graph(graph: PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph, node_id: str)
    +
    +get_score_from_graph(graph: PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph, node_id: str)

    Get the FamScore of a node

    Parameters
    @@ -832,9 +820,6 @@ using a score based approach and differt kinds of optimization algorithms.

    FILE_SUFFIX:'.html', HAS_SOURCE: true }; - - + diff --git a/docs/PyCTBN.PyCTBN.html b/docs/PyCTBN.PyCTBN.html index 17c42b8..29ef30a 100644 --- a/docs/PyCTBN.PyCTBN.html +++ b/docs/PyCTBN.PyCTBN.html @@ -19,10 +19,6 @@ - - - - @@ -212,9 +208,6 @@ FILE_SUFFIX:'.html', HAS_SOURCE: true }; - - + diff --git a/docs/PyCTBN.PyCTBN.optimizers.html b/docs/PyCTBN.PyCTBN.optimizers.html index 94e6d69..58423f2 100644 --- a/docs/PyCTBN.PyCTBN.optimizers.html +++ b/docs/PyCTBN.PyCTBN.optimizers.html @@ -19,10 +19,6 @@ - - - - @@ -127,8 +123,8 @@

    PyCTBN.PyCTBN.optimizers.constraint_based_optimizer module

    -
    -class PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer(node_id: str, structure_estimator: PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator, tot_vars_count: int)
    +
    +class PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer(node_id: str, structure_estimator: PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator, tot_vars_count: int)

    Bases: PyCTBN.PyCTBN.optimizers.optimizer.Optimizer

    Optimizer class that implement a CTPC Algorithm

    @@ -141,8 +137,8 @@
    -
    -optimize_structure()
    +
    +optimize_structure()

    Compute Optimization process for a structure_estimator by using a CTPC Algorithm

    Returns
    @@ -160,8 +156,8 @@
    -
    +
    +

    PyCTBN.PyCTBN.structure_graph.network_generator module

    -
    -class PyCTBN.PyCTBN.structure_graph.network_generator.NetworkGenerator(labels, vals)
    +
    +class PyCTBN.PyCTBN.structure_graph.network_generator.NetworkGenerator(labels, vals)

    Bases: object

    Provides the methods to generate a network graph and the CIMs related to it Items in _labels, _vals and _indxs are related, and therefore respect the same order

    @@ -187,19 +183,19 @@ Items in _labels, _vals and _indxs are related, and therefore respect the same o
    -
    -
    -property cims: dict
    +
    +
    +property cims
    -
    -
    -property dyn_str: list
    +
    +
    +property dyn_str
    -
    -generate_cims(min_val, max_val)
    +
    +generate_cims(min_val, max_val)
    For each node, generate the corresponding SetOfCims. The objective is to group the CIMs

    (actually generated by private method __generate_cim) according to parents possibles states of every node. This method must obviously be executed after the graph has been generated.

    @@ -216,8 +212,8 @@ This method must obviously be executed after the graph has been generated.

    -
    -generate_graph(density, fixed: bool = False)
    +
    +generate_graph(density, fixed: bool = False)
    Generate the edges according to specified density, and then instantiate the NetworkGraph object

    to represent the network

    @@ -232,14 +228,14 @@ This method must obviously be executed after the graph has been generated.

    -
    -
    -property graph: PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph
    +
    +
    +property graph
    -
    -
    -property variables: list
    +
    +
    +property variables
    @@ -248,8 +244,8 @@ This method must obviously be executed after the graph has been generated.

    PyCTBN.PyCTBN.structure_graph.network_graph module

    -
    -class PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph(graph_struct: PyCTBN.PyCTBN.structure_graph.structure.Structure)
    +
    +class PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph(graph_struct: PyCTBN.PyCTBN.structure_graph.structure.Structure)

    Bases: object

    Abstracts the infos contained in the Structure class in the form of a directed graph. Has the task of creating all the necessary filtering and indexing structures for parameters estimation

    @@ -282,8 +278,8 @@ from one state to another

    -
    -add_edges(list_of_edges: List)None
    +
    +add_edges(list_of_edges: List) → None

    Add the edges to the _graph contained in the list list_of_edges.

    Parameters
    @@ -293,8 +289,8 @@ from one state to another

    -
    -add_nodes(list_of_nodes: List)None
    +
    +add_nodes(list_of_nodes: List) → None

    Adds the nodes to the _graph contained in the list of nodes list_of_nodes. Sets all the properties that identify a nodes (index, positional index, cardinality)

    @@ -305,8 +301,8 @@ Sets all the properties that identify a nodes (index, positional index, cardinal
    -
    -static build_p_comb_structure_for_a_node(parents_values: List)numpy.ndarray
    +
    +static build_p_comb_structure_for_a_node(parents_values: List) → numpy.ndarray

    Builds the combinatorial structure that contains the combinations of all the values contained in parents_values.

    @@ -323,8 +319,8 @@ Sets all the properties that identify a nodes (index, positional index, cardinal
    -
    -static build_time_columns_filtering_for_a_node(node_indx: int, p_indxs: List)numpy.ndarray
    +
    +static build_time_columns_filtering_for_a_node(node_indx: int, p_indxs: List) → numpy.ndarray

    Builds the necessary structure to filter the desired columns indicated by node_indx and p_indxs in the dataset. This structute will be used in the computation of the state res times. @@ -337,8 +333,8 @@ This structute will be used in the computation of the state res times.

    -
    -static build_time_scalar_indexing_structure_for_a_node(node_states: int, parents_vals: List)numpy.ndarray
    +
    +static build_time_scalar_indexing_structure_for_a_node(node_states: int, parents_vals: List) → numpy.ndarray

    Builds an indexing structure for the computation of state residence times values.

    Parameters
    @@ -357,8 +353,8 @@ This structute will be used in the computation of the state res times.
    -
    -static build_transition_filtering_for_a_node(node_indx: int, p_indxs: List, nodes_number: int)numpy.ndarray
    +
    +static build_transition_filtering_for_a_node(node_indx: int, p_indxs: List, nodes_number: int) → numpy.ndarray

    Builds the necessary structure to filter the desired columns indicated by node_indx and p_indxs in the dataset. This structure will be used in the computation of the state transitions values. @@ -373,8 +369,8 @@ This structure will be used in the computation of the state transitions values.

    -
    -static build_transition_scalar_indexing_structure_for_a_node(node_states_number: int, parents_vals: List)numpy.ndarray
    +
    +static build_transition_scalar_indexing_structure_for_a_node(node_states_number: int, parents_vals: List) → numpy.ndarray

    Builds an indexing structure for the computation of state transitions values.

    Parameters
    @@ -393,19 +389,19 @@ This structure will be used in the computation of the state transitions values.
    -
    -clear_indexing_filtering_structures()None
    +
    +clear_indexing_filtering_structures() → None

    Initialize all the filtering/indexing structures.

    -
    -
    -property edges: List
    +
    +
    +property edges
    -
    -fast_init(node_id: str)None
    +
    +fast_init(node_id: str) → None

    Initializes all the necessary structures for parameters estimation of the node identified by the label node_id

    @@ -416,13 +412,13 @@ node_id

    -
    -get_node_indx(node_id)int
    +
    +get_node_indx(node_id) → int
    -
    -get_ordered_by_indx_set_of_parents(node: str)Tuple
    +
    +get_ordered_by_indx_set_of_parents(node: str) → Tuple

    Builds the aggregated structure that holds all the infos relative to the parent set of the node, namely (parents_labels, parents_indexes, parents_cardinalities).

    @@ -439,8 +435,8 @@ node_id

    -
    -get_parents_by_id(node_id)List
    +
    +get_parents_by_id(node_id) → List

    Returns a list of labels of the parents of the node node_id

    Parameters
    @@ -456,18 +452,18 @@ node_id

    -
    -get_positional_node_indx(node_id)int
    +
    +get_positional_node_indx(node_id) → int
    -
    -get_states_number(node_id)int
    +
    +get_states_number(node_id) → int
    -
    -has_edge(edge: tuple)bool
    +
    +has_edge(edge: tuple) → bool

    Check if the graph contains a specific edge

    Parameters:

    edge: a tuple that rappresents the edge

    @@ -477,29 +473,29 @@ node_id

    -
    -
    -property nodes: List
    +
    +
    +property nodes
    -
    -
    -property nodes_indexes: numpy.ndarray
    +
    +
    +property nodes_indexes
    -
    -
    -property nodes_values: numpy.ndarray
    +
    +
    +property nodes_values
    -
    -
    -property p_combs: numpy.ndarray
    +
    +
    +property p_combs
    -
    -remove_edges(list_of_edges: List)None
    +
    +remove_edges(list_of_edges: List) → None

    Remove the edges to the graph contained in the list list_of_edges.

    Parameters
    @@ -509,30 +505,30 @@ node_id

    -
    -remove_node(node_id: str)None
    +
    +remove_node(node_id: str) → None

    Remove the node node_id from all the class members. Initialize all the filtering/indexing structures.

    -
    -
    -property time_filtering: numpy.ndarray
    +
    +
    +property time_filtering
    -
    -
    -property time_scalar_indexing_strucure: numpy.ndarray
    +
    +
    +property time_scalar_indexing_strucure
    -
    -
    -property transition_filtering: numpy.ndarray
    +
    +
    +property transition_filtering
    -
    -
    -property transition_scalar_indexing_structure: numpy.ndarray
    +
    +
    +property transition_scalar_indexing_structure
    @@ -541,8 +537,8 @@ Initialize all the filtering/indexing structures.

    PyCTBN.PyCTBN.structure_graph.sample_path module

    -
    -class PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath(importer: PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter)
    +
    +class PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath(importer: PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter)

    Bases: object

    Aggregates all the informations about the trajectories, the real structure of the sampled net and variables cardinalites. Has the task of creating the objects Trajectory and Structure that will @@ -562,41 +558,41 @@ contain the mentioned data.

    -
    -build_structure()None
    +
    +build_structure() → None

    Builds the Structure object that aggregates all the infos about the net.

    -
    -build_trajectories()None
    +
    +build_trajectories() → None

    Builds the Trajectory object that will contain all the trajectories. Clears all the unused dataframes in _importer Object

    -
    -clear_memory()
    +
    +clear_memory()
    -
    -
    -property has_prior_net_structure: bool
    +
    +
    +property has_prior_net_structure
    -
    -
    -property structure: PyCTBN.PyCTBN.structure_graph.structure.Structure
    +
    +
    +property structure
    -
    -
    -property total_variables_count: int
    +
    +
    +property total_variables_count
    -
    -
    -property trajectories: PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory
    +
    +
    +property trajectories
    @@ -605,8 +601,8 @@ Clears all the unused dataframes in <

    PyCTBN.PyCTBN.structure_graph.set_of_cims module

    -
    -class PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims(node_id: str, parents_states_number: List, node_states_number: int, p_combs: numpy.ndarray, cims: Optional[numpy.ndarray] = None)
    +
    +class PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims(node_id: str, parents_states_number: List, node_states_number: int, p_combs: numpy.ndarray, cims: numpy.ndarray = None)

    Bases: object

    Aggregates all the CIMS of the node identified by the label _node_id.

    @@ -628,14 +624,14 @@ Clears all the unused dataframes in <

    the cims of the node

    -
    -
    -property actual_cims: numpy.ndarray
    +
    +
    +property actual_cims
    -
    -build_cims(state_res_times: numpy.ndarray, transition_matrices: numpy.ndarray)None
    +
    +build_cims(state_res_times: numpy.ndarray, transition_matrices: numpy.ndarray) → None

    Build the ConditionalIntensityMatrix objects given the state residence times and transitions matrices. Compute the cim coefficients.The class member _actual_cims will contain the computed cims.

    @@ -649,14 +645,14 @@ Compute the cim coefficients.The class member -
    -build_times_and_transitions_structures()None
    +
    +build_times_and_transitions_structures() → None

    Initializes at the correct dimensions the state residence times matrix and the state transition matrices.

    -
    -filter_cims_with_mask(mask_arr: numpy.ndarray, comb: List)numpy.ndarray
    +
    +filter_cims_with_mask(mask_arr: numpy.ndarray, comb: List) → numpy.ndarray

    Filter the cims contained in the array _actual_cims given the boolean mask mask_arr and the index comb.

    @@ -676,13 +672,13 @@ Compute the cim coefficients.The class member -
    -get_cims_number()
    +
    +get_cims_number()
    -
    -
    -property p_combs: numpy.ndarray
    +
    +
    +property p_combs
    @@ -691,8 +687,8 @@ Compute the cim coefficients.The class member

    PyCTBN.PyCTBN.structure_graph.structure module

    -
    -class PyCTBN.PyCTBN.structure_graph.structure.Structure(nodes_labels_list: List, nodes_indexes_arr: numpy.ndarray, nodes_vals_arr: numpy.ndarray, edges_list: List, total_variables_number: int)
    +
    +class PyCTBN.PyCTBN.structure_graph.structure.Structure(nodes_labels_list: List, nodes_indexes_arr: numpy.ndarray, nodes_vals_arr: numpy.ndarray, edges_list: List, total_variables_number: int)

    Bases: object

    Contains all the infos about the network structure(nodes labels, nodes caridinalites, edges, indexes)

    @@ -707,28 +703,28 @@ Compute the cim coefficients.The class member -
    -add_edge(edge: tuple)
    +
    +add_edge(edge: tuple)
    -
    -clean_structure_edges()
    +
    +clean_structure_edges()
    -
    -contains_edge(edge: tuple)bool
    +
    +contains_edge(edge: tuple) → bool
    -
    -
    -property edges: List
    +
    +
    +property edges
    -
    -get_node_id(node_indx: int)str
    +
    +get_node_id(node_indx: int) → str

    Given the node_index returns the node label.

    Parameters
    @@ -744,8 +740,8 @@ Compute the cim coefficients.The class member -
    -get_node_indx(node_id: str)int
    +
    +get_node_indx(node_id: str) → int

    Given the node_index returns the node label.

    Parameters
    @@ -761,13 +757,13 @@ Compute the cim coefficients.The class member -
    -get_positional_node_indx(node_id: str)int
    +
    +get_positional_node_indx(node_id: str) → int
    -
    -get_states_number(node: str)int
    +
    +get_states_number(node: str) → int

    Given the node label node returns the cardinality of the node.

    Parameters
    @@ -782,36 +778,36 @@ Compute the cim coefficients.The class member -
    -property nodes_indexes: numpy.ndarray
    +
    +
    +property nodes_indexes
    -
    -
    -property nodes_labels: List
    +
    +
    +property nodes_labels
    -
    -
    -property nodes_values: numpy.ndarray
    +
    +
    +property nodes_values
    -
    -remove_edge(edge: tuple)
    +
    +remove_edge(edge: tuple)
    -
    -remove_node(node_id: str)None
    +
    +remove_node(node_id: str) → None

    Remove the node node_id from all the class members. The class member _total_variables_number since it refers to the total number of variables in the dataset.

    -
    -
    -property total_variables_number: int
    +
    +
    +property total_variables_number
    @@ -820,8 +816,8 @@ The class member _t

    PyCTBN.PyCTBN.structure_graph.trajectory module

    -
    -class PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory(list_of_columns: List, original_cols_number: int)
    +
    +class PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory(list_of_columns: List, original_cols_number: int)

    Bases: object

    Abstracts the infos about a complete set of trajectories, represented as a numpy array of doubles (the time deltas) and a numpy matrix of ints (the changes of states).

    @@ -839,32 +835,101 @@ The class member _t

    the array containing the time deltas

    -
    -
    -property complete_trajectory: numpy.ndarray
    +
    +
    +property complete_trajectory
    -
    -size()
    +
    +size()
    -
    -
    -property times
    +
    +
    +property times
    -
    -
    -property trajectory: numpy.ndarray
    +
    +
    +property trajectory
    +
    +
    +

    PyCTBN.PyCTBN.structure_graph.trajectory_generator module

    +
    +
    +class PyCTBN.PyCTBN.structure_graph.trajectory_generator.TrajectoryGenerator(importer: PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter = None, variables: pandas.core.frame.DataFrame = None, dyn_str: pandas.core.frame.DataFrame = None, dyn_cims: dict = None)
    +

    Bases: object

    +

    Provides the methods to generate a trajectory basing on the network defined +in the importer.

    +
    +
    Parameters
    +
      +
    • _importer (AbstractImporter) – the Importer object which contains the imported and processed data

    • +
    • _vnames (List) – List of the variables labels that belong to the network

    • +
    • _parents (Dict) – It contains, for each variable label (the key), the list of related parents labels

    • +
    • _cims (Dict) – It contains, for each variable label (the key), the SetOfCims object related to it

    • +
    • _generated_trajectory (pandas.DataFrame) – Result of the execution of CTBN_Sample, contains the output trajectory

    • +
    +
    +
    +
    +
    +CTBN_Sample(t_end=- 1, max_tr=- 1)
    +
    +
    This method implements the generation of a trajectory, basing on the network structure and

    on the coefficients defined in the CIMs. +The variables are initialized with value 0, and the method takes care of adding the +conventional last row made up of -1.

    +
    +
    +
    +
    Parameters
    +
      +
    • t_end (float) – If defined, the sampling ends when end time is reached

    • +
    • max_tr (int) – Parameter taken in consideration in case that t_end isn’t defined. It specifies the number of transitions to execute

    • +
    +
    +
    +
    + +
    +
    +multi_trajectory(t_ends: list = None, max_trs: list = None)
    +

    Generate n trajectories in parallel, where n is the number of items in +t_ends, if defined, or the number of items in max_trs otherwise

    +
    +
    Parameters
    +
      +
    • t_ends (list) – List of t_end values for the trajectories that will be generated

    • +
    • max_trs (list) – List of max_tr values for the trajectories that will be generated

    • +
    +
    +
    +
    + +
    +
    +worker(t_end, max_tr, trajectories)
    +

    Single process that will be executed in parallel in order to generate one trajectory.

    +
    +
    Parameters
    +
      +
    • t_end (float) – If defined, the sampling ends when end time is reached

    • +
    • max_tr (int) – Parameter taken in consideration in case that t_end isn’t defined. It specifies the number of transitions to execute

    • +
    • trajectories (list) – Shared list that contains to which the generated trajectory is added

    • +
    +
    +
    +
    + +
    -

    Module contents

    @@ -906,9 +971,6 @@ The class member _t FILE_SUFFIX:'.html', HAS_SOURCE: true }; - - + diff --git a/docs/PyCTBN.PyCTBN.utility.html b/docs/PyCTBN.PyCTBN.utility.html index 05eaa8e..fe87d56 100644 --- a/docs/PyCTBN.PyCTBN.utility.html +++ b/docs/PyCTBN.PyCTBN.utility.html @@ -19,10 +19,6 @@ - - - - @@ -123,14 +119,58 @@

    PyCTBN.PyCTBN.utility package

    Submodules

    +
    +
    +

    PyCTBN.PyCTBN.utility.abstract_exporter module

    +
    +
    +class PyCTBN.PyCTBN.utility.abstract_exporter.AbstractExporter(variables: pandas.core.frame.DataFrame = None, dyn_str: pandas.core.frame.DataFrame = None, dyn_cims: dict = None)
    +

    Bases: abc.ABC

    +

    Abstract class that exposes the methods to save in json format a network information +along with one or more trajectories generated basing on it

    +
    +
    Parameters
    +
      +
    • _variables (pandas.DataFrame) – Dataframe containing the nodes labels and cardinalities

    • +
    • _dyn_str (pandas.DataFrame) – Dataframe containing the structure of the network (edges)

    • +
    • _dyn_cims (dict) – It contains, for every variable (label is the key), the SetOfCims object related to it

    • +
    • _trajectories (List) – List of trajectories, that can be added subsequently

    • +
    +
    +
    +
    +
    +add_trajectory(trajectory: list)
    +

    Add a new trajectory to the current list

    +
    +
    Parameters
    +

    trajectory (pandas.DataFrame) – The trajectory to add

    +
    +
    +
    + +
    +
    +abstract out_file(filename)
    +
    +
    Create a file in current directory and write on it the previously added data

    (variables, dyn_str, dyn_cims and trajectories)

    +
    +
    +
    +
    Parameters
    +

    filename (string) – Name of the output file (it must include json extension)

    +
    +
    +
    + +
    -

    PyCTBN.PyCTBN.utility.abstract_importer module

    -
    -class PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter(file_path: Optional[str] = None, trajectory_list: Optional[Union[pandas.core.frame.DataFrame, numpy.ndarray]] = None, variables: Optional[pandas.core.frame.DataFrame] = None, prior_net_structure: Optional[pandas.core.frame.DataFrame] = None)
    +
    +class PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter(file_path: str = None, trajectory_list: Union[pandas.core.frame.DataFrame, numpy.ndarray] = None, variables: pandas.core.frame.DataFrame = None, prior_net_structure: pandas.core.frame.DataFrame = None)

    Bases: abc.ABC

    Abstract class that exposes all the necessary methods to process the trajectories and the net structure.

    @@ -161,8 +201,8 @@ See the tutorial on how to construct a correct JsonImporter for an example implementation

    -
    -build_list_of_samples_array(concatenated_sample: pandas.core.frame.DataFrame)List
    +
    +build_list_of_samples_array(concatenated_sample: pandas.core.frame.DataFrame) → List

    Builds a List containing the the delta times numpy array, and the complete transitions matrix

    Parameters
    @@ -179,8 +219,8 @@ and converted

    -
    -abstract build_sorter(trajecory_header: object)List
    +
    +abstract build_sorter(trajecory_header: object) → List

    Initializes the _sorter class member from a trajectory dataframe, exctracting the header of the frame and keeping ONLY the variables symbolic labels, cutting out the time label in the header.

    @@ -197,14 +237,14 @@ and keeping ONLY the variables symbolic labels, cutting out the time label in th
    -
    -clear_concatenated_frame()None
    +
    +clear_concatenated_frame() → None

    Removes all values in the dataframe concatenated_samples.

    -
    -compute_row_delta_in_all_samples_frames(df_samples_list: List)None
    +
    +compute_row_delta_in_all_samples_frames(df_samples_list: List) → None

    Calls the method compute_row_delta_sigle_samples_frame on every dataframe present in the list df_samples_list. Concatenates the result in the dataframe concatanated_samples

    @@ -227,8 +267,8 @@ and merged trajectories

    -
    -compute_row_delta_sigle_samples_frame(sample_frame: pandas.core.frame.DataFrame, columns_header: List, shifted_cols_header: List)pandas.core.frame.DataFrame
    +
    +compute_row_delta_sigle_samples_frame(sample_frame: pandas.core.frame.DataFrame, columns_header: List, shifted_cols_header: List) → pandas.core.frame.DataFrame

    Computes the difference between each value present in th time column. Copies and shift by one position up all the values present in the remaining columns.

    @@ -253,36 +293,36 @@ Header of sample_frame = [Time | Variable values]

    -
    -
    -property concatenated_samples: pandas.core.frame.DataFrame
    +
    +
    +property concatenated_samples
    -
    -abstract dataset_id()object
    +
    +abstract dataset_id() → object

    If the original dataset contains multiple dataset, this method returns a unique id to identify the current dataset

    -
    -
    -property file_path: str
    +
    +
    +property file_path
    -
    -
    -property sorter: List
    +
    +
    +property sorter
    -
    -
    -property structure: pandas.core.frame.DataFrame
    +
    +
    +property structure
    -
    -
    -property variables: pandas.core.frame.DataFrame
    +
    +
    +property variables
    @@ -291,8 +331,8 @@ dataset

    PyCTBN.PyCTBN.utility.cache module

    -
    -class PyCTBN.PyCTBN.utility.cache.Cache
    +
    +class PyCTBN.PyCTBN.utility.cache.Cache

    Bases: object

    This class acts as a cache of SetOfCims objects for a node.

    @@ -305,14 +345,14 @@ index is related

    -
    -clear()
    +
    +clear()

    Clear the contents both of __actual_cache and __list_of_sets_of_parents.

    -
    -find(parents_comb: Set)
    +
    +find(parents_comb: Set)

    Tries to find in cache given the symbolic parents combination parents_comb the SetOfCims related to that parents_comb.

    @@ -330,8 +370,8 @@ None otherwise.

    -
    -put(parents_comb: Set, socim: PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims)
    +
    +put(parents_comb: Set, socim: PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims)

    Place in cache the SetOfCims object, and the related symbolic index parents_comb in __list_of_sets_of_parents.

    @@ -346,14 +386,52 @@ None otherwise.

    +
    +
    +

    PyCTBN.PyCTBN.utility.json_exporter module

    +
    +
    +class PyCTBN.PyCTBN.utility.json_exporter.JsonExporter(variables: pandas.core.frame.DataFrame = None, dyn_str: pandas.core.frame.DataFrame = None, dyn_cims: dict = None)
    +

    Bases: PyCTBN.PyCTBN.utility.abstract_exporter.AbstractExporter

    +

    Provides the methods to save in json format a network information +along with one or more trajectories generated basing on it

    +
    +
    Parameters
    +
      +
    • _variables (pandas.DataFrame) – Dataframe containing the nodes labels and cardinalities

    • +
    • _dyn_str (pandas.DataFrame) – Dataframe containing the structure of the network (edges)

    • +
    • _dyn_cims (dict) – It contains, for every variable (label is the key), the SetOfCims object related to it

    • +
    • _trajectories (List) – List of trajectories, that can be added subsequently

    • +
    +
    +
    +
    +
    +cims_to_json() → dict
    +
    + +
    +
    +out_file(filename)
    +
    +
    Create a file in current directory and write on it the previously added data

    (variables, dyn_str, dyn_cims and trajectories)

    +
    +
    +
    +
    Parameters
    +

    filename (string) – Name of the output file (it must include json extension)

    +
    +
    +
    + +
    -

    PyCTBN.PyCTBN.utility.json_importer module

    -
    -class PyCTBN.PyCTBN.utility.json_importer.JsonImporter(file_path: str, samples_label: str, structure_label: str, variables_label: str, time_key: str, variables_key: str, cims_label: Optional[str] = None)
    +
    +class PyCTBN.PyCTBN.utility.json_importer.JsonImporter(file_path: str, samples_label: str, structure_label: str, variables_label: str, time_key: str, variables_key: str, cims_label: str = None)

    Bases: PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter

    Implements the abstracts methods of AbstractImporter and adds all the necessary methods to process and prepare the data in json extension.

    @@ -379,29 +457,27 @@ the data in json extension.

    -
    -build_sorter(sample_frame: pandas.core.frame.DataFrame)List
    +
    +build_sorter(sample_frame: pandas.core.frame.DataFrame) → List

    Implements the abstract method build_sorter of the AbstractImporter for this dataset.

    -
    -clear_data_frame_list()None
    +
    +clear_data_frame_list() → None

    Removes all values present in the dataframes in the list _df_samples_list.

    -
    -dataset_id()object
    +
    +dataset_id() → object

    If the original dataset contains multiple dataset, this method returns a unique id to identify the current dataset

    -
    import_data(indx: int = 0) → None
    -

    Implements the abstract method of AbstractImporter.

    Parameters
    @@ -411,8 +487,8 @@ dataset

    -
    -import_sampled_cims(raw_data: List, indx: int, cims_key: str)Dict
    +
    +import_sampled_cims(raw_data: List, indx: int, cims_key: str) → Dict

    Imports the synthetic CIMS in the dataset in a dictionary, using variables labels as keys for the set of CIMS of a particular node.

    @@ -433,8 +509,8 @@ as keys for the set of CIMS of a particular node.

    -
    -import_structure(raw_data: List)pandas.core.frame.DataFrame
    +
    +import_structure(raw_data: List) → pandas.core.frame.DataFrame

    Imports in a dataframe the data in the list raw_data at the key _structure_label

    Parameters
    @@ -450,8 +526,8 @@ as keys for the set of CIMS of a particular node.

    -
    -import_trajectories(raw_data: List)List
    +
    +import_trajectories(raw_data: List) → List

    Imports the trajectories from the list of dicts raw_data.

    Parameters
    @@ -467,8 +543,8 @@ as keys for the set of CIMS of a particular node.

    -
    -import_variables(raw_data: List)pandas.core.frame.DataFrame
    +
    +import_variables(raw_data: List) → pandas.core.frame.DataFrame

    Imports the data in raw_data at the key _variables_label.

    Parameters
    @@ -484,8 +560,8 @@ as keys for the set of CIMS of a particular node.

    -
    -normalize_trajectories(raw_data: List, indx: int, trajectories_key: str)List
    +
    +normalize_trajectories(raw_data: List, indx: int, trajectories_key: str) → List

    Extracts the trajectories in raw_data at the index index at the key trajectories key.

    Parameters
    @@ -505,8 +581,8 @@ as keys for the set of CIMS of a particular node.

    -
    -one_level_normalizing(raw_data: List, indx: int, key: str)pandas.core.frame.DataFrame
    +
    +one_level_normalizing(raw_data: List, indx: int, key: str) → pandas.core.frame.DataFrame

    Extracts the one-level nested data in the list raw_data at the index indx at the key key.

    Parameters
    @@ -526,8 +602,8 @@ as keys for the set of CIMS of a particular node.

    -
    -read_json_file()List
    +
    +read_json_file() → List

    Reads the JSON file in the path self.filePath.

    Returns
    @@ -545,8 +621,8 @@ as keys for the set of CIMS of a particular node.

    PyCTBN.PyCTBN.utility.sample_importer module

    -
    -class PyCTBN.PyCTBN.utility.sample_importer.SampleImporter(trajectory_list: Optional[Union[pandas.core.frame.DataFrame, numpy.ndarray, List]] = None, variables: Optional[Union[pandas.core.frame.DataFrame, numpy.ndarray, List]] = None, prior_net_structure: Optional[Union[pandas.core.frame.DataFrame, numpy.ndarray, List]] = None)
    +
    +class PyCTBN.PyCTBN.utility.sample_importer.SampleImporter(trajectory_list: Union[pandas.core.frame.DataFrame, numpy.ndarray, List] = None, variables: Union[pandas.core.frame.DataFrame, numpy.ndarray, List] = None, prior_net_structure: Union[pandas.core.frame.DataFrame, numpy.ndarray, List] = None)

    Bases: PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter

    Implements the abstracts methods of AbstractImporter and adds all the necessary methods to process and prepare the data loaded directly by using DataFrame

    @@ -566,21 +642,21 @@ the data loaded directly by using DataFrame

    -
    -build_sorter(sample_frame: pandas.core.frame.DataFrame)List
    +
    +build_sorter(sample_frame: pandas.core.frame.DataFrame) → List

    Implements the abstract method build_sorter of the AbstractImporter in order to get the ordered variables list.

    -
    -dataset_id()str
    +
    +dataset_id() → str

    If the original dataset contains multiple dataset, this method returns a unique id to identify the current dataset

    -
    -import_data(header_column=None)
    +
    +import_data(header_column=None)
    @@ -628,9 +704,6 @@ dataset

    FILE_SUFFIX:'.html', HAS_SOURCE: true }; - - + diff --git a/docs/PyCTBN.html b/docs/PyCTBN.html index a6024f3..c4d5c15 100644 --- a/docs/PyCTBN.html +++ b/docs/PyCTBN.html @@ -19,10 +19,6 @@ - - - - @@ -177,29 +173,29 @@
  • PyCTBN.tests.estimators package
  • PyCTBN.tests.optimizers package
  • PyCTBN.tests.structure_graph package
  • @@ -221,10 +217,14 @@

    Submodules

    - +
    +
    +

    PyCTBN.basic_main module

    +
    +
    +

    PyCTBN.setup module

    -

    Module contents

    @@ -257,9 +257,6 @@ FILE_SUFFIX:'.html', HAS_SOURCE: true }; - - + diff --git a/docs/PyCTBN.tests.estimators.html b/docs/PyCTBN.tests.estimators.html index c39f871..8a63d1f 100644 --- a/docs/PyCTBN.tests.estimators.html +++ b/docs/PyCTBN.tests.estimators.html @@ -19,10 +19,6 @@ - - - - @@ -124,43 +120,42 @@

    PyCTBN.tests.estimators.test_parameters_estimator module

    -
    -class PyCTBN.tests.estimators.test_parameters_estimator.TestParametersEstimatior(methodName='runTest')
    +
    +class PyCTBN.tests.estimators.test_parameters_estimator.TestParametersEstimatior(methodName='runTest')

    Bases: unittest.case.TestCase

    -
    -aux_import_sampled_cims(cims_label)
    +
    +aux_import_sampled_cims(cims_label)
    -
    -cim_equality_test(cim1, cim2)
    +
    +cim_equality_test(cim1, cim2)
    -
    -equality_of_cims_of_node(sampled_cims, estimated_cims)
    +
    +equality_of_cims_of_node(sampled_cims, estimated_cims)
    -
    -classmethod setUpClass()None
    +
    +classmethod setUpClass() → None

    Hook method for setting up class fixture before running tests in the class.

    -
    -test_compute_parameters_for_node()
    +
    +test_compute_parameters_for_node()
    -
    -test_fast_init()
    +
    +test_fast_init()
    -

    PyCTBN.tests.estimators.test_structure_constraint_based_estimator module

    @@ -193,61 +188,59 @@
    -

    PyCTBN.tests.estimators.test_structure_estimator module

    -
    -class PyCTBN.tests.estimators.test_structure_estimator.TestStructureEstimator(methodName='runTest')
    +
    +class PyCTBN.tests.estimators.test_structure_estimator.TestStructureEstimator(methodName='runTest')

    Bases: unittest.case.TestCase

    -
    -classmethod setUpClass()
    +
    +classmethod setUpClass()

    Hook method for setting up class fixture before running tests in the class.

    -
    -test_adjacency_matrix()
    +
    +test_adjacency_matrix()
    -
    -test_build_complete_graph()
    +
    +test_build_complete_graph()
    -
    -test_build_removable_edges_matrix()
    +
    +test_build_removable_edges_matrix()
    -
    -test_generate_possible_sub_sets_of_size()
    +
    +test_generate_possible_sub_sets_of_size()
    -
    -test_init()
    +
    +test_init()
    -
    -test_save_plot_estimated_graph()
    +
    +test_save_plot_estimated_graph()
    -
    -test_save_results()
    +
    +test_save_results()
    -
    -test_time()
    +
    +test_time()
    -

    PyCTBN.tests.estimators.test_structure_score_based_estimator module

    @@ -317,9 +310,6 @@ FILE_SUFFIX:'.html', HAS_SOURCE: true }; - - + diff --git a/docs/PyCTBN.tests.html b/docs/PyCTBN.tests.html index 57c3a3d..7036b72 100644 --- a/docs/PyCTBN.tests.html +++ b/docs/PyCTBN.tests.html @@ -19,10 +19,6 @@ - - - - @@ -125,29 +121,29 @@
  • PyCTBN.tests.estimators package
  • PyCTBN.tests.optimizers package
  • PyCTBN.tests.structure_graph package
  • @@ -195,9 +191,6 @@ FILE_SUFFIX:'.html', HAS_SOURCE: true }; - - + diff --git a/docs/PyCTBN.tests.optimizers.html b/docs/PyCTBN.tests.optimizers.html index 2e20c9a..96038cc 100644 --- a/docs/PyCTBN.tests.optimizers.html +++ b/docs/PyCTBN.tests.optimizers.html @@ -19,10 +19,6 @@ - - - - @@ -204,9 +200,6 @@ FILE_SUFFIX:'.html', HAS_SOURCE: true }; - - + diff --git a/docs/PyCTBN.tests.structure_graph.html b/docs/PyCTBN.tests.structure_graph.html index 581cd0c..a63e83d 100644 --- a/docs/PyCTBN.tests.structure_graph.html +++ b/docs/PyCTBN.tests.structure_graph.html @@ -19,10 +19,6 @@ - - - - @@ -124,28 +120,47 @@

    PyCTBN.tests.structure_graph.test_cim module

    -
    -class PyCTBN.tests.structure_graph.test_cim.TestConditionalIntensityMatrix(methodName='runTest')
    +
    +class PyCTBN.tests.structure_graph.test_cim.TestConditionalIntensityMatrix(methodName='runTest')

    Bases: unittest.case.TestCase

    -
    -classmethod setUpClass()None
    +
    +classmethod setUpClass() → None

    Hook method for setting up class fixture before running tests in the class.

    -
    -test_compute_cim_coefficients()
    +
    +test_compute_cim_coefficients()
    -
    -test_init()
    +
    +test_init()
    -
    -test_repr()
    +
    +test_repr()
    +
    + +
    + +
    +
    +

    PyCTBN.tests.structure_graph.test_networkgenerator module

    +
    +
    +class PyCTBN.tests.structure_graph.test_networkgenerator.TestNetworkGenerator(methodName='runTest')
    +

    Bases: unittest.case.TestCase

    +
    +
    +test_generate_cims()
    +
    + +
    +
    +test_generate_graph()
    @@ -154,103 +169,103 @@

    PyCTBN.tests.structure_graph.test_networkgraph module

    -
    -class PyCTBN.tests.structure_graph.test_networkgraph.TestNetworkGraph(methodName='runTest')
    +
    +class PyCTBN.tests.structure_graph.test_networkgraph.TestNetworkGraph(methodName='runTest')

    Bases: unittest.case.TestCase

    -
    -aux_build_p_combs_structure(graph, p_vals)
    +
    +aux_build_p_combs_structure(graph, p_vals)
    -
    -aux_build_time_columns_filtering_structure_for_a_node(graph, node_id, p_indxs)
    +
    +aux_build_time_columns_filtering_structure_for_a_node(graph, node_id, p_indxs)
    -
    -aux_build_time_scalar_indexing_structure_for_a_node(graph, node_id, parents_indxs, parents_labels, parents_vals)
    +
    +aux_build_time_scalar_indexing_structure_for_a_node(graph, node_id, parents_indxs, parents_labels, parents_vals)
    -
    -aux_build_transition_columns_filtering_structure(graph, node_id, p_indxs)
    +
    +aux_build_transition_columns_filtering_structure(graph, node_id, p_indxs)
    -
    -aux_build_transition_scalar_indexing_structure_for_a_node(graph, node_id, parents_indxs, parents_labels, parents_values)
    +
    +aux_build_transition_scalar_indexing_structure_for_a_node(graph, node_id, parents_indxs, parents_labels, parents_values)
    -
    -classmethod setUpClass()
    +
    +classmethod setUpClass()

    Hook method for setting up class fixture before running tests in the class.

    -
    -test_add_edges()
    +
    +test_add_edges()
    -
    -test_add_nodes()
    +
    +test_add_nodes()
    -
    -test_build_p_combs_structure()
    +
    +test_build_p_combs_structure()
    -
    -test_build_time_columns_filtering_structure_for_a_node()
    +
    +test_build_time_columns_filtering_structure_for_a_node()
    -
    -test_build_time_scalar_indexing_structure_for_a_node()
    +
    +test_build_time_scalar_indexing_structure_for_a_node()
    -
    -test_build_transition_columns_filtering_structure()
    +
    +test_build_transition_columns_filtering_structure()
    -
    -test_build_transition_scalar_indexing_structure_for_a_node()
    +
    +test_build_transition_scalar_indexing_structure_for_a_node()
    -
    -test_fast_init()
    +
    +test_fast_init()
    -
    -test_get_node_indx()
    +
    +test_get_node_indx()
    -
    -test_get_ordered_by_indx_set_of_parents()
    +
    +test_get_ordered_by_indx_set_of_parents()
    -
    -test_get_parents_by_id()
    +
    +test_get_parents_by_id()
    -
    -test_get_states_number()
    +
    +test_get_states_number()
    -
    -test_init()
    +
    +test_init()
    @@ -259,58 +274,58 @@

    PyCTBN.tests.structure_graph.test_sample_path module

    -
    -class PyCTBN.tests.structure_graph.test_sample_path.TestSamplePath(methodName='runTest')
    +
    +class PyCTBN.tests.structure_graph.test_sample_path.TestSamplePath(methodName='runTest')

    Bases: unittest.case.TestCase

    -
    -classmethod setUpClass()None
    +
    +classmethod setUpClass() → None

    Hook method for setting up class fixture before running tests in the class.

    -
    -test_buid_samplepath_no_concatenated_samples()
    +
    +test_buid_samplepath_no_concatenated_samples()
    -
    -test_buid_samplepath_no_variables()
    +
    +test_buid_samplepath_no_variables()
    -
    -test_build_saplepath_no_prior_net_structure()
    +
    +test_build_saplepath_no_prior_net_structure()
    -
    -test_build_structure()
    +
    +test_build_structure()
    -
    -test_build_structure_bad_sorter()
    +
    +test_build_structure_bad_sorter()
    -
    -test_build_trajectories()
    +
    +test_build_trajectories()
    -
    -test_init()
    +
    +test_init()
    -
    -test_init_not_filled_dataframse()
    +
    +test_init_not_filled_dataframse()
    -
    -test_init_not_initialized_importer()
    +
    +test_init_not_initialized_importer()
    @@ -319,27 +334,27 @@

    PyCTBN.tests.structure_graph.test_setofcims module

    -
    -class PyCTBN.tests.structure_graph.test_setofcims.TestSetOfCims(methodName='runTest')
    +
    +class PyCTBN.tests.structure_graph.test_setofcims.TestSetOfCims(methodName='runTest')

    Bases: unittest.case.TestCase

    -
    -another_filtering_method(p_combs, mask, parent_value)
    +
    +another_filtering_method(p_combs, mask, parent_value)
    -
    -aux_test_build_cims(node_id, p_values, node_states, p_combs)
    +
    +aux_test_build_cims(node_id, p_values, node_states, p_combs)
    -
    -aux_test_init(node_id, parents_states_number, node_states_number, p_combs)
    +
    +aux_test_init(node_id, parents_states_number, node_states_number, p_combs)
    -
    -build_p_comb_structure_for_a_node(parents_values)
    +
    +build_p_comb_structure_for_a_node(parents_values)

    Builds the combinatory structure that contains the combinations of all the values contained in parents_values.

    Parameters:

    parents_values: the cardinalities of the nodes

    @@ -350,24 +365,24 @@
    -
    -classmethod setUpClass()None
    +
    +classmethod setUpClass() → None

    Hook method for setting up class fixture before running tests in the class.

    -
    -test_build_cims()
    +
    +test_build_cims()
    -
    -test_filter_cims_with_mask()
    +
    +test_filter_cims_with_mask()
    -
    -test_init()
    +
    +test_init()
    @@ -376,53 +391,53 @@

    PyCTBN.tests.structure_graph.test_structure module

    -
    -class PyCTBN.tests.structure_graph.test_structure.TestStructure(methodName='runTest')
    +
    +class PyCTBN.tests.structure_graph.test_structure.TestStructure(methodName='runTest')

    Bases: unittest.case.TestCase

    -
    -classmethod setUpClass()
    +
    +classmethod setUpClass()

    Hook method for setting up class fixture before running tests in the class.

    -
    -test_edges_operations()
    +
    +test_edges_operations()
    -
    -test_equality()
    +
    +test_equality()
    -
    -test_get_node_id()
    +
    +test_get_node_id()
    -
    -test_get_node_indx()
    +
    +test_get_node_indx()
    -
    -test_get_positional_node_indx()
    +
    +test_get_positional_node_indx()
    -
    -test_get_states_number()
    +
    +test_get_states_number()
    -
    -test_init()
    +
    +test_init()
    -
    -test_repr()
    +
    +test_repr()
    @@ -431,22 +446,56 @@

    PyCTBN.tests.structure_graph.test_trajectory module

    -
    -class PyCTBN.tests.structure_graph.test_trajectory.TestTrajectory(methodName='runTest')
    +
    +class PyCTBN.tests.structure_graph.test_trajectory.TestTrajectory(methodName='runTest')

    Bases: unittest.case.TestCase

    -
    -classmethod setUpClass()None
    +
    +classmethod setUpClass() → None

    Hook method for setting up class fixture before running tests in the class.

    -
    -test_init()
    +
    +test_init()
    +
    +
    +

    PyCTBN.tests.structure_graph.test_trajectorygenerator module

    +
    +
    +class PyCTBN.tests.structure_graph.test_trajectorygenerator.TestTrajectoryGenerator(methodName='runTest')
    +

    Bases: unittest.case.TestCase

    +
    +
    +classmethod setUpClass() → None
    +

    Hook method for setting up class fixture before running tests in the class.

    +
    + +
    +
    +test_generated_trajectory()
    +
    + +
    +
    +test_generated_trajectory_max_tr()
    +
    + +
    +
    +test_init()
    +
    + +
    +
    +test_multi_trajectory()
    +
    + +
    @@ -482,9 +531,6 @@ FILE_SUFFIX:'.html', HAS_SOURCE: true }; - - + diff --git a/docs/PyCTBN.tests.utility.html b/docs/PyCTBN.tests.utility.html index 6e10516..606ce71 100644 --- a/docs/PyCTBN.tests.utility.html +++ b/docs/PyCTBN.tests.utility.html @@ -19,10 +19,6 @@ - - - - @@ -124,27 +120,27 @@

    PyCTBN.tests.utility.test_cache module

    -
    -class PyCTBN.tests.utility.test_cache.TestCache(methodName='runTest')
    +
    +class PyCTBN.tests.utility.test_cache.TestCache(methodName='runTest')

    Bases: unittest.case.TestCase

    -
    -test_clear()
    +
    +test_clear()
    -
    -test_find()
    +
    +test_find()
    -
    -test_init()
    +
    +test_init()
    -
    -test_put()
    +
    +test_put()
    @@ -153,108 +149,108 @@

    PyCTBN.tests.utility.test_json_importer module

    -
    -class PyCTBN.tests.utility.test_json_importer.TestJsonImporter(methodName='runTest')
    +
    +class PyCTBN.tests.utility.test_json_importer.TestJsonImporter(methodName='runTest')

    Bases: unittest.case.TestCase

    -
    -ordered(obj)
    +
    +ordered(obj)
    -
    -classmethod setUpClass()None
    +
    +classmethod setUpClass() → None

    Hook method for setting up class fixture before running tests in the class.

    -
    -test_build_sorter()
    +
    +test_build_sorter()
    -
    -test_clear_concatenated_frame()
    +
    +test_clear_concatenated_frame()
    -
    -test_clear_data_frame_list()
    +
    +test_clear_data_frame_list()
    -
    -test_compute_row_delta_in_all_frames()
    +
    +test_compute_row_delta_in_all_frames()
    -
    -test_compute_row_delta_in_all_frames_not_init_sorter()
    +
    +test_compute_row_delta_in_all_frames_not_init_sorter()
    -
    -test_compute_row_delta_single_samples_frame()
    +
    +test_compute_row_delta_single_samples_frame()
    -
    -test_dataset_id()
    +
    +test_dataset_id()
    -
    -test_file_path()
    +
    +test_file_path()
    -
    -test_import_data()
    +
    +test_import_data()
    -
    -test_import_sampled_cims()
    +
    +test_import_sampled_cims()
    -
    -test_import_structure()
    +
    +test_import_structure()
    -
    -test_import_variables()
    +
    +test_import_variables()
    -
    -test_init()
    +
    +test_init()
    -
    -test_normalize_trajectories()
    +
    +test_normalize_trajectories()
    -
    -test_normalize_trajectories_wrong_indx()
    +
    +test_normalize_trajectories_wrong_indx()
    -
    -test_normalize_trajectories_wrong_key()
    +
    +test_normalize_trajectories_wrong_key()
    -
    -test_read_json_file_found()
    +
    +test_read_json_file_found()
    -
    -test_read_json_file_not_found()
    +
    +test_read_json_file_not_found()
    @@ -263,28 +259,28 @@

    PyCTBN.tests.utility.test_sample_importer module

    -
    -class PyCTBN.tests.utility.test_sample_importer.TestSampleImporter(methodName='runTest')
    +
    +class PyCTBN.tests.utility.test_sample_importer.TestSampleImporter(methodName='runTest')

    Bases: unittest.case.TestCase

    -
    -ordered(obj)
    +
    +ordered(obj)
    -
    -classmethod setUpClass()None
    +
    +classmethod setUpClass() → None

    Hook method for setting up class fixture before running tests in the class.

    -
    -test_init()
    +
    +test_init()
    -
    -test_order()
    +
    +test_order()
    @@ -323,9 +319,6 @@ FILE_SUFFIX:'.html', HAS_SOURCE: true }; - - + diff --git a/docs/_static/basic.css b/docs/_static/basic.css index aa9df31..24a49f0 100644 --- a/docs/_static/basic.css +++ b/docs/_static/basic.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- basic theme. * - * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -130,7 +130,7 @@ ul.search li a { font-weight: bold; } -ul.search li p.context { +ul.search li div.context { color: #888; margin: 2px 0 0 30px; text-align: left; @@ -277,25 +277,25 @@ p.rubric { font-weight: bold; } -img.align-left, figure.align-left, .figure.align-left, object.align-left { +img.align-left, .figure.align-left, object.align-left { clear: left; float: left; margin-right: 1em; } -img.align-right, figure.align-right, .figure.align-right, object.align-right { +img.align-right, .figure.align-right, object.align-right { clear: right; float: right; margin-left: 1em; } -img.align-center, figure.align-center, .figure.align-center, object.align-center { +img.align-center, .figure.align-center, object.align-center { display: block; margin-left: auto; margin-right: auto; } -img.align-default, figure.align-default, .figure.align-default { +img.align-default, .figure.align-default { display: block; margin-left: auto; margin-right: auto; @@ -319,8 +319,7 @@ img.align-default, figure.align-default, .figure.align-default { /* -- sidebars -------------------------------------------------------------- */ -div.sidebar, -aside.sidebar { +div.sidebar { margin: 0 0 0.5em 1em; border: 1px solid #ddb; padding: 7px; @@ -378,14 +377,12 @@ div.body p.centered { /* -- content of sidebars/topics/admonitions -------------------------------- */ div.sidebar > :last-child, -aside.sidebar > :last-child, div.topic > :last-child, div.admonition > :last-child { margin-bottom: 0; } div.sidebar::after, -aside.sidebar::after, div.topic::after, div.admonition::after, blockquote::after { @@ -458,22 +455,20 @@ td > :last-child { /* -- figures --------------------------------------------------------------- */ -div.figure, figure { +div.figure { margin: 0.5em; padding: 0.5em; } -div.figure p.caption, figcaption { +div.figure p.caption { padding: 0.3em; } -div.figure p.caption span.caption-number, -figcaption span.caption-number { +div.figure p.caption span.caption-number { font-style: italic; } -div.figure p.caption span.caption-text, -figcaption span.caption-text { +div.figure p.caption span.caption-text { } /* -- field list styles ----------------------------------------------------- */ @@ -508,63 +503,6 @@ table.hlist td { vertical-align: top; } -/* -- object description styles --------------------------------------------- */ - -.sig { - font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; -} - -.sig-name, code.descname { - background-color: transparent; - font-weight: bold; -} - -.sig-name { - font-size: 1.1em; -} - -code.descname { - font-size: 1.2em; -} - -.sig-prename, code.descclassname { - background-color: transparent; -} - -.optional { - font-size: 1.3em; -} - -.sig-paren { - font-size: larger; -} - -.sig-param.n { - font-style: italic; -} - -/* C++ specific styling */ - -.sig-inline.c-texpr, -.sig-inline.cpp-texpr { - font-family: unset; -} - -.sig.c .k, .sig.c .kt, -.sig.cpp .k, .sig.cpp .kt { - color: #0033B3; -} - -.sig.c .m, -.sig.cpp .m { - color: #1750EB; -} - -.sig.c .s, .sig.c .sc, -.sig.cpp .s, .sig.cpp .sc { - color: #067D17; -} - /* -- other body styles ----------------------------------------------------- */ @@ -691,6 +629,14 @@ dl.glossary dt { font-size: 1.1em; } +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + .versionmodified { font-style: italic; } @@ -820,11 +766,7 @@ div.code-block-caption code { table.highlighttable td.linenos, span.linenos, div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */ - user-select: none; - -webkit-user-select: text; /* Safari fallback only */ - -webkit-user-select: none; /* Chrome/Safari */ - -moz-user-select: none; /* Firefox */ - -ms-user-select: none; /* IE10+ */ + user-select: none; } div.code-block-caption span.caption-number { @@ -839,6 +781,16 @@ div.literal-block-wrapper { margin: 1em 0; } +code.descname { + background-color: transparent; + font-weight: bold; + font-size: 1.2em; +} + +code.descclassname { + background-color: transparent; +} + code.xref, a code { background-color: transparent; font-weight: bold; diff --git a/docs/_static/doctools.js b/docs/_static/doctools.js index 61ac9d2..7d88f80 100644 --- a/docs/_static/doctools.js +++ b/docs/_static/doctools.js @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilities for all documentation. * - * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -29,14 +29,9 @@ if (!window.console || !console.firebug) { /** * small helper function to urldecode strings - * - * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL */ jQuery.urldecode = function(x) { - if (!x) { - return x - } - return decodeURIComponent(x.replace(/\+/g, ' ')); + return decodeURIComponent(x).replace(/\+/g, ' '); }; /** diff --git a/docs/_static/language_data.js b/docs/_static/language_data.js index 863704b..d2b4ee9 100644 --- a/docs/_static/language_data.js +++ b/docs/_static/language_data.js @@ -5,7 +5,7 @@ * This script contains the language-specific data used by searchtools.js, * namely the list of stopwords, stemmer, scorer and splitter. * - * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -13,8 +13,7 @@ var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"]; -/* Non-minified version is copied as a separate JS file, is available */ - +/* Non-minified version JS is _stemmer.js if file is provided */ /** * Porter Stemmer */ @@ -200,6 +199,7 @@ var Stemmer = function() { + var splitChars = (function() { var result = {}; var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648, diff --git a/docs/_static/pygments.css b/docs/_static/pygments.css index 28eb679..348ec44 100644 --- a/docs/_static/pygments.css +++ b/docs/_static/pygments.css @@ -1,7 +1,7 @@ -pre { line-height: 125%; margin: 0; } -td.linenos pre { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; } -span.linenos { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; } -td.linenos pre.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; } -span.linenos.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; } +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight { background: #ffffff; } \ No newline at end of file diff --git a/docs/_static/searchtools.js b/docs/_static/searchtools.js index e09f926..261ecaa 100644 --- a/docs/_static/searchtools.js +++ b/docs/_static/searchtools.js @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilities for the full-text search. * - * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -248,7 +248,7 @@ var Search = { // results left, load the summary and display it if (results.length) { var item = results.pop(); - var listItem = $('
  • '); + var listItem = $('
  • '); var requestUrl = ""; var linkUrl = ""; if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') { @@ -273,9 +273,9 @@ var Search = { if (item[3]) { listItem.append($(' (' + item[3] + ')')); Search.output.append(listItem); - setTimeout(function() { + listItem.slideDown(5, function() { displayNextItem(); - }, 5); + }); } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) { $.ajax({url: requestUrl, dataType: "text", @@ -285,16 +285,16 @@ var Search = { listItem.append(Search.makeSearchSummary(data, searchterms, hlterms)); } Search.output.append(listItem); - setTimeout(function() { + listItem.slideDown(5, function() { displayNextItem(); - }, 5); + }); }}); } else { // no source available, just display title Search.output.append(listItem); - setTimeout(function() { + listItem.slideDown(5, function() { displayNextItem(); - }, 5); + }); } } // search finished, update title and status message @@ -379,13 +379,6 @@ var Search = { return results; }, - /** - * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions - */ - escapeRegExp : function(string) { - return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string - }, - /** * search for full-text terms in the index */ @@ -409,14 +402,13 @@ var Search = { ]; // add support for partial matches if (word.length > 2) { - var word_regex = this.escapeRegExp(word); for (var w in terms) { - if (w.match(word_regex) && !terms[word]) { + if (w.match(word) && !terms[word]) { _o.push({files: terms[w], score: Scorer.partialTerm}) } } for (var w in titleterms) { - if (w.match(word_regex) && !titleterms[word]) { + if (w.match(word) && !titleterms[word]) { _o.push({files: titleterms[w], score: Scorer.partialTitle}) } } @@ -509,7 +501,7 @@ var Search = { var excerpt = ((start > 0) ? '...' : '') + $.trim(text.substr(start, 240)) + ((start + 240 - text.length) ? '...' : ''); - var rv = $('

    ').text(excerpt); + var rv = $('
    ').text(excerpt); $.each(hlwords, function() { rv = rv.highlightText(this, 'highlighted'); }); diff --git a/docs/_static/underscore-1.13.1.js b/docs/_static/underscore-1.13.1.js deleted file mode 100644 index ffd77af..0000000 --- a/docs/_static/underscore-1.13.1.js +++ /dev/null @@ -1,2042 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define('underscore', factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () { - var current = global._; - var exports = global._ = factory(); - exports.noConflict = function () { global._ = current; return exports; }; - }())); -}(this, (function () { - // Underscore.js 1.13.1 - // https://underscorejs.org - // (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors - // Underscore may be freely distributed under the MIT license. - - // Current version. - var VERSION = '1.13.1'; - - // Establish the root object, `window` (`self`) in the browser, `global` - // on the server, or `this` in some virtual machines. We use `self` - // instead of `window` for `WebWorker` support. - var root = typeof self == 'object' && self.self === self && self || - typeof global == 'object' && global.global === global && global || - Function('return this')() || - {}; - - // Save bytes in the minified (but not gzipped) version: - var ArrayProto = Array.prototype, ObjProto = Object.prototype; - var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null; - - // Create quick reference variables for speed access to core prototypes. - var push = ArrayProto.push, - slice = ArrayProto.slice, - toString = ObjProto.toString, - hasOwnProperty = ObjProto.hasOwnProperty; - - // Modern feature detection. - var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined', - supportsDataView = typeof DataView !== 'undefined'; - - // All **ECMAScript 5+** native function implementations that we hope to use - // are declared here. - var nativeIsArray = Array.isArray, - nativeKeys = Object.keys, - nativeCreate = Object.create, - nativeIsView = supportsArrayBuffer && ArrayBuffer.isView; - - // Create references to these builtin functions because we override them. - var _isNaN = isNaN, - _isFinite = isFinite; - - // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. - var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); - var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', - 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; - - // The largest integer that can be represented exactly. - var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; - - // Some functions take a variable number of arguments, or a few expected - // arguments at the beginning and then a variable number of values to operate - // on. This helper accumulates all remaining arguments past the function’s - // argument length (or an explicit `startIndex`), into an array that becomes - // the last argument. Similar to ES6’s "rest parameter". - function restArguments(func, startIndex) { - startIndex = startIndex == null ? func.length - 1 : +startIndex; - return function() { - var length = Math.max(arguments.length - startIndex, 0), - rest = Array(length), - index = 0; - for (; index < length; index++) { - rest[index] = arguments[index + startIndex]; - } - switch (startIndex) { - case 0: return func.call(this, rest); - case 1: return func.call(this, arguments[0], rest); - case 2: return func.call(this, arguments[0], arguments[1], rest); - } - var args = Array(startIndex + 1); - for (index = 0; index < startIndex; index++) { - args[index] = arguments[index]; - } - args[startIndex] = rest; - return func.apply(this, args); - }; - } - - // Is a given variable an object? - function isObject(obj) { - var type = typeof obj; - return type === 'function' || type === 'object' && !!obj; - } - - // Is a given value equal to null? - function isNull(obj) { - return obj === null; - } - - // Is a given variable undefined? - function isUndefined(obj) { - return obj === void 0; - } - - // Is a given value a boolean? - function isBoolean(obj) { - return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; - } - - // Is a given value a DOM element? - function isElement(obj) { - return !!(obj && obj.nodeType === 1); - } - - // Internal function for creating a `toString`-based type tester. - function tagTester(name) { - var tag = '[object ' + name + ']'; - return function(obj) { - return toString.call(obj) === tag; - }; - } - - var isString = tagTester('String'); - - var isNumber = tagTester('Number'); - - var isDate = tagTester('Date'); - - var isRegExp = tagTester('RegExp'); - - var isError = tagTester('Error'); - - var isSymbol = tagTester('Symbol'); - - var isArrayBuffer = tagTester('ArrayBuffer'); - - var isFunction = tagTester('Function'); - - // Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old - // v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236). - var nodelist = root.document && root.document.childNodes; - if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') { - isFunction = function(obj) { - return typeof obj == 'function' || false; - }; - } - - var isFunction$1 = isFunction; - - var hasObjectTag = tagTester('Object'); - - // In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`. - // In IE 11, the most common among them, this problem also applies to - // `Map`, `WeakMap` and `Set`. - var hasStringTagBug = ( - supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8))) - ), - isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map)); - - var isDataView = tagTester('DataView'); - - // In IE 10 - Edge 13, we need a different heuristic - // to determine whether an object is a `DataView`. - function ie10IsDataView(obj) { - return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer); - } - - var isDataView$1 = (hasStringTagBug ? ie10IsDataView : isDataView); - - // Is a given value an array? - // Delegates to ECMA5's native `Array.isArray`. - var isArray = nativeIsArray || tagTester('Array'); - - // Internal function to check whether `key` is an own property name of `obj`. - function has$1(obj, key) { - return obj != null && hasOwnProperty.call(obj, key); - } - - var isArguments = tagTester('Arguments'); - - // Define a fallback version of the method in browsers (ahem, IE < 9), where - // there isn't any inspectable "Arguments" type. - (function() { - if (!isArguments(arguments)) { - isArguments = function(obj) { - return has$1(obj, 'callee'); - }; - } - }()); - - var isArguments$1 = isArguments; - - // Is a given object a finite number? - function isFinite$1(obj) { - return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj)); - } - - // Is the given value `NaN`? - function isNaN$1(obj) { - return isNumber(obj) && _isNaN(obj); - } - - // Predicate-generating function. Often useful outside of Underscore. - function constant(value) { - return function() { - return value; - }; - } - - // Common internal logic for `isArrayLike` and `isBufferLike`. - function createSizePropertyCheck(getSizeProperty) { - return function(collection) { - var sizeProperty = getSizeProperty(collection); - return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX; - } - } - - // Internal helper to generate a function to obtain property `key` from `obj`. - function shallowProperty(key) { - return function(obj) { - return obj == null ? void 0 : obj[key]; - }; - } - - // Internal helper to obtain the `byteLength` property of an object. - var getByteLength = shallowProperty('byteLength'); - - // Internal helper to determine whether we should spend extensive checks against - // `ArrayBuffer` et al. - var isBufferLike = createSizePropertyCheck(getByteLength); - - // Is a given value a typed array? - var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/; - function isTypedArray(obj) { - // `ArrayBuffer.isView` is the most future-proof, so use it when available. - // Otherwise, fall back on the above regular expression. - return nativeIsView ? (nativeIsView(obj) && !isDataView$1(obj)) : - isBufferLike(obj) && typedArrayPattern.test(toString.call(obj)); - } - - var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false); - - // Internal helper to obtain the `length` property of an object. - var getLength = shallowProperty('length'); - - // Internal helper to create a simple lookup structure. - // `collectNonEnumProps` used to depend on `_.contains`, but this led to - // circular imports. `emulatedSet` is a one-off solution that only works for - // arrays of strings. - function emulatedSet(keys) { - var hash = {}; - for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true; - return { - contains: function(key) { return hash[key]; }, - push: function(key) { - hash[key] = true; - return keys.push(key); - } - }; - } - - // Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't - // be iterated by `for key in ...` and thus missed. Extends `keys` in place if - // needed. - function collectNonEnumProps(obj, keys) { - keys = emulatedSet(keys); - var nonEnumIdx = nonEnumerableProps.length; - var constructor = obj.constructor; - var proto = isFunction$1(constructor) && constructor.prototype || ObjProto; - - // Constructor is a special case. - var prop = 'constructor'; - if (has$1(obj, prop) && !keys.contains(prop)) keys.push(prop); - - while (nonEnumIdx--) { - prop = nonEnumerableProps[nonEnumIdx]; - if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) { - keys.push(prop); - } - } - } - - // Retrieve the names of an object's own properties. - // Delegates to **ECMAScript 5**'s native `Object.keys`. - function keys(obj) { - if (!isObject(obj)) return []; - if (nativeKeys) return nativeKeys(obj); - var keys = []; - for (var key in obj) if (has$1(obj, key)) keys.push(key); - // Ahem, IE < 9. - if (hasEnumBug) collectNonEnumProps(obj, keys); - return keys; - } - - // Is a given array, string, or object empty? - // An "empty" object has no enumerable own-properties. - function isEmpty(obj) { - if (obj == null) return true; - // Skip the more expensive `toString`-based type checks if `obj` has no - // `.length`. - var length = getLength(obj); - if (typeof length == 'number' && ( - isArray(obj) || isString(obj) || isArguments$1(obj) - )) return length === 0; - return getLength(keys(obj)) === 0; - } - - // Returns whether an object has a given set of `key:value` pairs. - function isMatch(object, attrs) { - var _keys = keys(attrs), length = _keys.length; - if (object == null) return !length; - var obj = Object(object); - for (var i = 0; i < length; i++) { - var key = _keys[i]; - if (attrs[key] !== obj[key] || !(key in obj)) return false; - } - return true; - } - - // If Underscore is called as a function, it returns a wrapped object that can - // be used OO-style. This wrapper holds altered versions of all functions added - // through `_.mixin`. Wrapped objects may be chained. - function _$1(obj) { - if (obj instanceof _$1) return obj; - if (!(this instanceof _$1)) return new _$1(obj); - this._wrapped = obj; - } - - _$1.VERSION = VERSION; - - // Extracts the result from a wrapped and chained object. - _$1.prototype.value = function() { - return this._wrapped; - }; - - // Provide unwrapping proxies for some methods used in engine operations - // such as arithmetic and JSON stringification. - _$1.prototype.valueOf = _$1.prototype.toJSON = _$1.prototype.value; - - _$1.prototype.toString = function() { - return String(this._wrapped); - }; - - // Internal function to wrap or shallow-copy an ArrayBuffer, - // typed array or DataView to a new view, reusing the buffer. - function toBufferView(bufferSource) { - return new Uint8Array( - bufferSource.buffer || bufferSource, - bufferSource.byteOffset || 0, - getByteLength(bufferSource) - ); - } - - // We use this string twice, so give it a name for minification. - var tagDataView = '[object DataView]'; - - // Internal recursive comparison function for `_.isEqual`. - function eq(a, b, aStack, bStack) { - // Identical objects are equal. `0 === -0`, but they aren't identical. - // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal). - if (a === b) return a !== 0 || 1 / a === 1 / b; - // `null` or `undefined` only equal to itself (strict comparison). - if (a == null || b == null) return false; - // `NaN`s are equivalent, but non-reflexive. - if (a !== a) return b !== b; - // Exhaust primitive checks - var type = typeof a; - if (type !== 'function' && type !== 'object' && typeof b != 'object') return false; - return deepEq(a, b, aStack, bStack); - } - - // Internal recursive comparison function for `_.isEqual`. - function deepEq(a, b, aStack, bStack) { - // Unwrap any wrapped objects. - if (a instanceof _$1) a = a._wrapped; - if (b instanceof _$1) b = b._wrapped; - // Compare `[[Class]]` names. - var className = toString.call(a); - if (className !== toString.call(b)) return false; - // Work around a bug in IE 10 - Edge 13. - if (hasStringTagBug && className == '[object Object]' && isDataView$1(a)) { - if (!isDataView$1(b)) return false; - className = tagDataView; - } - switch (className) { - // These types are compared by value. - case '[object RegExp]': - // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') - case '[object String]': - // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is - // equivalent to `new String("5")`. - return '' + a === '' + b; - case '[object Number]': - // `NaN`s are equivalent, but non-reflexive. - // Object(NaN) is equivalent to NaN. - if (+a !== +a) return +b !== +b; - // An `egal` comparison is performed for other numeric values. - return +a === 0 ? 1 / +a === 1 / b : +a === +b; - case '[object Date]': - case '[object Boolean]': - // Coerce dates and booleans to numeric primitive values. Dates are compared by their - // millisecond representations. Note that invalid dates with millisecond representations - // of `NaN` are not equivalent. - return +a === +b; - case '[object Symbol]': - return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b); - case '[object ArrayBuffer]': - case tagDataView: - // Coerce to typed array so we can fall through. - return deepEq(toBufferView(a), toBufferView(b), aStack, bStack); - } - - var areArrays = className === '[object Array]'; - if (!areArrays && isTypedArray$1(a)) { - var byteLength = getByteLength(a); - if (byteLength !== getByteLength(b)) return false; - if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true; - areArrays = true; - } - if (!areArrays) { - if (typeof a != 'object' || typeof b != 'object') return false; - - // Objects with different constructors are not equivalent, but `Object`s or `Array`s - // from different frames are. - var aCtor = a.constructor, bCtor = b.constructor; - if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor && - isFunction$1(bCtor) && bCtor instanceof bCtor) - && ('constructor' in a && 'constructor' in b)) { - return false; - } - } - // Assume equality for cyclic structures. The algorithm for detecting cyclic - // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. - - // Initializing stack of traversed objects. - // It's done here since we only need them for objects and arrays comparison. - aStack = aStack || []; - bStack = bStack || []; - var length = aStack.length; - while (length--) { - // Linear search. Performance is inversely proportional to the number of - // unique nested structures. - if (aStack[length] === a) return bStack[length] === b; - } - - // Add the first object to the stack of traversed objects. - aStack.push(a); - bStack.push(b); - - // Recursively compare objects and arrays. - if (areArrays) { - // Compare array lengths to determine if a deep comparison is necessary. - length = a.length; - if (length !== b.length) return false; - // Deep compare the contents, ignoring non-numeric properties. - while (length--) { - if (!eq(a[length], b[length], aStack, bStack)) return false; - } - } else { - // Deep compare objects. - var _keys = keys(a), key; - length = _keys.length; - // Ensure that both objects contain the same number of properties before comparing deep equality. - if (keys(b).length !== length) return false; - while (length--) { - // Deep compare each member - key = _keys[length]; - if (!(has$1(b, key) && eq(a[key], b[key], aStack, bStack))) return false; - } - } - // Remove the first object from the stack of traversed objects. - aStack.pop(); - bStack.pop(); - return true; - } - - // Perform a deep comparison to check if two objects are equal. - function isEqual(a, b) { - return eq(a, b); - } - - // Retrieve all the enumerable property names of an object. - function allKeys(obj) { - if (!isObject(obj)) return []; - var keys = []; - for (var key in obj) keys.push(key); - // Ahem, IE < 9. - if (hasEnumBug) collectNonEnumProps(obj, keys); - return keys; - } - - // Since the regular `Object.prototype.toString` type tests don't work for - // some types in IE 11, we use a fingerprinting heuristic instead, based - // on the methods. It's not great, but it's the best we got. - // The fingerprint method lists are defined below. - function ie11fingerprint(methods) { - var length = getLength(methods); - return function(obj) { - if (obj == null) return false; - // `Map`, `WeakMap` and `Set` have no enumerable keys. - var keys = allKeys(obj); - if (getLength(keys)) return false; - for (var i = 0; i < length; i++) { - if (!isFunction$1(obj[methods[i]])) return false; - } - // If we are testing against `WeakMap`, we need to ensure that - // `obj` doesn't have a `forEach` method in order to distinguish - // it from a regular `Map`. - return methods !== weakMapMethods || !isFunction$1(obj[forEachName]); - }; - } - - // In the interest of compact minification, we write - // each string in the fingerprints only once. - var forEachName = 'forEach', - hasName = 'has', - commonInit = ['clear', 'delete'], - mapTail = ['get', hasName, 'set']; - - // `Map`, `WeakMap` and `Set` each have slightly different - // combinations of the above sublists. - var mapMethods = commonInit.concat(forEachName, mapTail), - weakMapMethods = commonInit.concat(mapTail), - setMethods = ['add'].concat(commonInit, forEachName, hasName); - - var isMap = isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map'); - - var isWeakMap = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap'); - - var isSet = isIE11 ? ie11fingerprint(setMethods) : tagTester('Set'); - - var isWeakSet = tagTester('WeakSet'); - - // Retrieve the values of an object's properties. - function values(obj) { - var _keys = keys(obj); - var length = _keys.length; - var values = Array(length); - for (var i = 0; i < length; i++) { - values[i] = obj[_keys[i]]; - } - return values; - } - - // Convert an object into a list of `[key, value]` pairs. - // The opposite of `_.object` with one argument. - function pairs(obj) { - var _keys = keys(obj); - var length = _keys.length; - var pairs = Array(length); - for (var i = 0; i < length; i++) { - pairs[i] = [_keys[i], obj[_keys[i]]]; - } - return pairs; - } - - // Invert the keys and values of an object. The values must be serializable. - function invert(obj) { - var result = {}; - var _keys = keys(obj); - for (var i = 0, length = _keys.length; i < length; i++) { - result[obj[_keys[i]]] = _keys[i]; - } - return result; - } - - // Return a sorted list of the function names available on the object. - function functions(obj) { - var names = []; - for (var key in obj) { - if (isFunction$1(obj[key])) names.push(key); - } - return names.sort(); - } - - // An internal function for creating assigner functions. - function createAssigner(keysFunc, defaults) { - return function(obj) { - var length = arguments.length; - if (defaults) obj = Object(obj); - if (length < 2 || obj == null) return obj; - for (var index = 1; index < length; index++) { - var source = arguments[index], - keys = keysFunc(source), - l = keys.length; - for (var i = 0; i < l; i++) { - var key = keys[i]; - if (!defaults || obj[key] === void 0) obj[key] = source[key]; - } - } - return obj; - }; - } - - // Extend a given object with all the properties in passed-in object(s). - var extend = createAssigner(allKeys); - - // Assigns a given object with all the own properties in the passed-in - // object(s). - // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) - var extendOwn = createAssigner(keys); - - // Fill in a given object with default properties. - var defaults = createAssigner(allKeys, true); - - // Create a naked function reference for surrogate-prototype-swapping. - function ctor() { - return function(){}; - } - - // An internal function for creating a new object that inherits from another. - function baseCreate(prototype) { - if (!isObject(prototype)) return {}; - if (nativeCreate) return nativeCreate(prototype); - var Ctor = ctor(); - Ctor.prototype = prototype; - var result = new Ctor; - Ctor.prototype = null; - return result; - } - - // Creates an object that inherits from the given prototype object. - // If additional properties are provided then they will be added to the - // created object. - function create(prototype, props) { - var result = baseCreate(prototype); - if (props) extendOwn(result, props); - return result; - } - - // Create a (shallow-cloned) duplicate of an object. - function clone(obj) { - if (!isObject(obj)) return obj; - return isArray(obj) ? obj.slice() : extend({}, obj); - } - - // Invokes `interceptor` with the `obj` and then returns `obj`. - // The primary purpose of this method is to "tap into" a method chain, in - // order to perform operations on intermediate results within the chain. - function tap(obj, interceptor) { - interceptor(obj); - return obj; - } - - // Normalize a (deep) property `path` to array. - // Like `_.iteratee`, this function can be customized. - function toPath$1(path) { - return isArray(path) ? path : [path]; - } - _$1.toPath = toPath$1; - - // Internal wrapper for `_.toPath` to enable minification. - // Similar to `cb` for `_.iteratee`. - function toPath(path) { - return _$1.toPath(path); - } - - // Internal function to obtain a nested property in `obj` along `path`. - function deepGet(obj, path) { - var length = path.length; - for (var i = 0; i < length; i++) { - if (obj == null) return void 0; - obj = obj[path[i]]; - } - return length ? obj : void 0; - } - - // Get the value of the (deep) property on `path` from `object`. - // If any property in `path` does not exist or if the value is - // `undefined`, return `defaultValue` instead. - // The `path` is normalized through `_.toPath`. - function get(object, path, defaultValue) { - var value = deepGet(object, toPath(path)); - return isUndefined(value) ? defaultValue : value; - } - - // Shortcut function for checking if an object has a given property directly on - // itself (in other words, not on a prototype). Unlike the internal `has` - // function, this public version can also traverse nested properties. - function has(obj, path) { - path = toPath(path); - var length = path.length; - for (var i = 0; i < length; i++) { - var key = path[i]; - if (!has$1(obj, key)) return false; - obj = obj[key]; - } - return !!length; - } - - // Keep the identity function around for default iteratees. - function identity(value) { - return value; - } - - // Returns a predicate for checking whether an object has a given set of - // `key:value` pairs. - function matcher(attrs) { - attrs = extendOwn({}, attrs); - return function(obj) { - return isMatch(obj, attrs); - }; - } - - // Creates a function that, when passed an object, will traverse that object’s - // properties down the given `path`, specified as an array of keys or indices. - function property(path) { - path = toPath(path); - return function(obj) { - return deepGet(obj, path); - }; - } - - // Internal function that returns an efficient (for current engines) version - // of the passed-in callback, to be repeatedly applied in other Underscore - // functions. - function optimizeCb(func, context, argCount) { - if (context === void 0) return func; - switch (argCount == null ? 3 : argCount) { - case 1: return function(value) { - return func.call(context, value); - }; - // The 2-argument case is omitted because we’re not using it. - case 3: return function(value, index, collection) { - return func.call(context, value, index, collection); - }; - case 4: return function(accumulator, value, index, collection) { - return func.call(context, accumulator, value, index, collection); - }; - } - return function() { - return func.apply(context, arguments); - }; - } - - // An internal function to generate callbacks that can be applied to each - // element in a collection, returning the desired result — either `_.identity`, - // an arbitrary callback, a property matcher, or a property accessor. - function baseIteratee(value, context, argCount) { - if (value == null) return identity; - if (isFunction$1(value)) return optimizeCb(value, context, argCount); - if (isObject(value) && !isArray(value)) return matcher(value); - return property(value); - } - - // External wrapper for our callback generator. Users may customize - // `_.iteratee` if they want additional predicate/iteratee shorthand styles. - // This abstraction hides the internal-only `argCount` argument. - function iteratee(value, context) { - return baseIteratee(value, context, Infinity); - } - _$1.iteratee = iteratee; - - // The function we call internally to generate a callback. It invokes - // `_.iteratee` if overridden, otherwise `baseIteratee`. - function cb(value, context, argCount) { - if (_$1.iteratee !== iteratee) return _$1.iteratee(value, context); - return baseIteratee(value, context, argCount); - } - - // Returns the results of applying the `iteratee` to each element of `obj`. - // In contrast to `_.map` it returns an object. - function mapObject(obj, iteratee, context) { - iteratee = cb(iteratee, context); - var _keys = keys(obj), - length = _keys.length, - results = {}; - for (var index = 0; index < length; index++) { - var currentKey = _keys[index]; - results[currentKey] = iteratee(obj[currentKey], currentKey, obj); - } - return results; - } - - // Predicate-generating function. Often useful outside of Underscore. - function noop(){} - - // Generates a function for a given object that returns a given property. - function propertyOf(obj) { - if (obj == null) return noop; - return function(path) { - return get(obj, path); - }; - } - - // Run a function **n** times. - function times(n, iteratee, context) { - var accum = Array(Math.max(0, n)); - iteratee = optimizeCb(iteratee, context, 1); - for (var i = 0; i < n; i++) accum[i] = iteratee(i); - return accum; - } - - // Return a random integer between `min` and `max` (inclusive). - function random(min, max) { - if (max == null) { - max = min; - min = 0; - } - return min + Math.floor(Math.random() * (max - min + 1)); - } - - // A (possibly faster) way to get the current timestamp as an integer. - var now = Date.now || function() { - return new Date().getTime(); - }; - - // Internal helper to generate functions for escaping and unescaping strings - // to/from HTML interpolation. - function createEscaper(map) { - var escaper = function(match) { - return map[match]; - }; - // Regexes for identifying a key that needs to be escaped. - var source = '(?:' + keys(map).join('|') + ')'; - var testRegexp = RegExp(source); - var replaceRegexp = RegExp(source, 'g'); - return function(string) { - string = string == null ? '' : '' + string; - return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; - }; - } - - // Internal list of HTML entities for escaping. - var escapeMap = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`' - }; - - // Function for escaping strings to HTML interpolation. - var _escape = createEscaper(escapeMap); - - // Internal list of HTML entities for unescaping. - var unescapeMap = invert(escapeMap); - - // Function for unescaping strings from HTML interpolation. - var _unescape = createEscaper(unescapeMap); - - // By default, Underscore uses ERB-style template delimiters. Change the - // following template settings to use alternative delimiters. - var templateSettings = _$1.templateSettings = { - evaluate: /<%([\s\S]+?)%>/g, - interpolate: /<%=([\s\S]+?)%>/g, - escape: /<%-([\s\S]+?)%>/g - }; - - // When customizing `_.templateSettings`, if you don't want to define an - // interpolation, evaluation or escaping regex, we need one that is - // guaranteed not to match. - var noMatch = /(.)^/; - - // Certain characters need to be escaped so that they can be put into a - // string literal. - var escapes = { - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g; - - function escapeChar(match) { - return '\\' + escapes[match]; - } - - // In order to prevent third-party code injection through - // `_.templateSettings.variable`, we test it against the following regular - // expression. It is intentionally a bit more liberal than just matching valid - // identifiers, but still prevents possible loopholes through defaults or - // destructuring assignment. - var bareIdentifier = /^\s*(\w|\$)+\s*$/; - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - // NB: `oldSettings` only exists for backwards compatibility. - function template(text, settings, oldSettings) { - if (!settings && oldSettings) settings = oldSettings; - settings = defaults({}, settings, _$1.templateSettings); - - // Combine delimiters into one regular expression via alternation. - var matcher = RegExp([ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', 'g'); - - // Compile the template source, escaping string literals appropriately. - var index = 0; - var source = "__p+='"; - text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset).replace(escapeRegExp, escapeChar); - index = offset + match.length; - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } else if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } else if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } - - // Adobe VMs need the match returned to produce the correct offset. - return match; - }); - source += "';\n"; - - var argument = settings.variable; - if (argument) { - // Insure against third-party code injection. (CVE-2021-23358) - if (!bareIdentifier.test(argument)) throw new Error( - 'variable is not a bare identifier: ' + argument - ); - } else { - // If a variable is not specified, place data values in local scope. - source = 'with(obj||{}){\n' + source + '}\n'; - argument = 'obj'; - } - - source = "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + 'return __p;\n'; - - var render; - try { - render = new Function(argument, '_', source); - } catch (e) { - e.source = source; - throw e; - } - - var template = function(data) { - return render.call(this, data, _$1); - }; - - // Provide the compiled source as a convenience for precompilation. - template.source = 'function(' + argument + '){\n' + source + '}'; - - return template; - } - - // Traverses the children of `obj` along `path`. If a child is a function, it - // is invoked with its parent as context. Returns the value of the final - // child, or `fallback` if any child is undefined. - function result(obj, path, fallback) { - path = toPath(path); - var length = path.length; - if (!length) { - return isFunction$1(fallback) ? fallback.call(obj) : fallback; - } - for (var i = 0; i < length; i++) { - var prop = obj == null ? void 0 : obj[path[i]]; - if (prop === void 0) { - prop = fallback; - i = length; // Ensure we don't continue iterating. - } - obj = isFunction$1(prop) ? prop.call(obj) : prop; - } - return obj; - } - - // Generate a unique integer id (unique within the entire client session). - // Useful for temporary DOM ids. - var idCounter = 0; - function uniqueId(prefix) { - var id = ++idCounter + ''; - return prefix ? prefix + id : id; - } - - // Start chaining a wrapped Underscore object. - function chain(obj) { - var instance = _$1(obj); - instance._chain = true; - return instance; - } - - // Internal function to execute `sourceFunc` bound to `context` with optional - // `args`. Determines whether to execute a function as a constructor or as a - // normal function. - function executeBound(sourceFunc, boundFunc, context, callingContext, args) { - if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); - var self = baseCreate(sourceFunc.prototype); - var result = sourceFunc.apply(self, args); - if (isObject(result)) return result; - return self; - } - - // Partially apply a function by creating a version that has had some of its - // arguments pre-filled, without changing its dynamic `this` context. `_` acts - // as a placeholder by default, allowing any combination of arguments to be - // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument. - var partial = restArguments(function(func, boundArgs) { - var placeholder = partial.placeholder; - var bound = function() { - var position = 0, length = boundArgs.length; - var args = Array(length); - for (var i = 0; i < length; i++) { - args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i]; - } - while (position < arguments.length) args.push(arguments[position++]); - return executeBound(func, bound, this, this, args); - }; - return bound; - }); - - partial.placeholder = _$1; - - // Create a function bound to a given object (assigning `this`, and arguments, - // optionally). - var bind = restArguments(function(func, context, args) { - if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function'); - var bound = restArguments(function(callArgs) { - return executeBound(func, bound, context, this, args.concat(callArgs)); - }); - return bound; - }); - - // Internal helper for collection methods to determine whether a collection - // should be iterated as an array or as an object. - // Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength - // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094 - var isArrayLike = createSizePropertyCheck(getLength); - - // Internal implementation of a recursive `flatten` function. - function flatten$1(input, depth, strict, output) { - output = output || []; - if (!depth && depth !== 0) { - depth = Infinity; - } else if (depth <= 0) { - return output.concat(input); - } - var idx = output.length; - for (var i = 0, length = getLength(input); i < length; i++) { - var value = input[i]; - if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) { - // Flatten current level of array or arguments object. - if (depth > 1) { - flatten$1(value, depth - 1, strict, output); - idx = output.length; - } else { - var j = 0, len = value.length; - while (j < len) output[idx++] = value[j++]; - } - } else if (!strict) { - output[idx++] = value; - } - } - return output; - } - - // Bind a number of an object's methods to that object. Remaining arguments - // are the method names to be bound. Useful for ensuring that all callbacks - // defined on an object belong to it. - var bindAll = restArguments(function(obj, keys) { - keys = flatten$1(keys, false, false); - var index = keys.length; - if (index < 1) throw new Error('bindAll must be passed function names'); - while (index--) { - var key = keys[index]; - obj[key] = bind(obj[key], obj); - } - return obj; - }); - - // Memoize an expensive function by storing its results. - function memoize(func, hasher) { - var memoize = function(key) { - var cache = memoize.cache; - var address = '' + (hasher ? hasher.apply(this, arguments) : key); - if (!has$1(cache, address)) cache[address] = func.apply(this, arguments); - return cache[address]; - }; - memoize.cache = {}; - return memoize; - } - - // Delays a function for the given number of milliseconds, and then calls - // it with the arguments supplied. - var delay = restArguments(function(func, wait, args) { - return setTimeout(function() { - return func.apply(null, args); - }, wait); - }); - - // Defers a function, scheduling it to run after the current call stack has - // cleared. - var defer = partial(delay, _$1, 1); - - // Returns a function, that, when invoked, will only be triggered at most once - // during a given window of time. Normally, the throttled function will run - // as much as it can, without ever going more than once per `wait` duration; - // but if you'd like to disable the execution on the leading edge, pass - // `{leading: false}`. To disable execution on the trailing edge, ditto. - function throttle(func, wait, options) { - var timeout, context, args, result; - var previous = 0; - if (!options) options = {}; - - var later = function() { - previous = options.leading === false ? 0 : now(); - timeout = null; - result = func.apply(context, args); - if (!timeout) context = args = null; - }; - - var throttled = function() { - var _now = now(); - if (!previous && options.leading === false) previous = _now; - var remaining = wait - (_now - previous); - context = this; - args = arguments; - if (remaining <= 0 || remaining > wait) { - if (timeout) { - clearTimeout(timeout); - timeout = null; - } - previous = _now; - result = func.apply(context, args); - if (!timeout) context = args = null; - } else if (!timeout && options.trailing !== false) { - timeout = setTimeout(later, remaining); - } - return result; - }; - - throttled.cancel = function() { - clearTimeout(timeout); - previous = 0; - timeout = context = args = null; - }; - - return throttled; - } - - // When a sequence of calls of the returned function ends, the argument - // function is triggered. The end of a sequence is defined by the `wait` - // parameter. If `immediate` is passed, the argument function will be - // triggered at the beginning of the sequence instead of at the end. - function debounce(func, wait, immediate) { - var timeout, previous, args, result, context; - - var later = function() { - var passed = now() - previous; - if (wait > passed) { - timeout = setTimeout(later, wait - passed); - } else { - timeout = null; - if (!immediate) result = func.apply(context, args); - // This check is needed because `func` can recursively invoke `debounced`. - if (!timeout) args = context = null; - } - }; - - var debounced = restArguments(function(_args) { - context = this; - args = _args; - previous = now(); - if (!timeout) { - timeout = setTimeout(later, wait); - if (immediate) result = func.apply(context, args); - } - return result; - }); - - debounced.cancel = function() { - clearTimeout(timeout); - timeout = args = context = null; - }; - - return debounced; - } - - // Returns the first function passed as an argument to the second, - // allowing you to adjust arguments, run code before and after, and - // conditionally execute the original function. - function wrap(func, wrapper) { - return partial(wrapper, func); - } - - // Returns a negated version of the passed-in predicate. - function negate(predicate) { - return function() { - return !predicate.apply(this, arguments); - }; - } - - // Returns a function that is the composition of a list of functions, each - // consuming the return value of the function that follows. - function compose() { - var args = arguments; - var start = args.length - 1; - return function() { - var i = start; - var result = args[start].apply(this, arguments); - while (i--) result = args[i].call(this, result); - return result; - }; - } - - // Returns a function that will only be executed on and after the Nth call. - function after(times, func) { - return function() { - if (--times < 1) { - return func.apply(this, arguments); - } - }; - } - - // Returns a function that will only be executed up to (but not including) the - // Nth call. - function before(times, func) { - var memo; - return function() { - if (--times > 0) { - memo = func.apply(this, arguments); - } - if (times <= 1) func = null; - return memo; - }; - } - - // Returns a function that will be executed at most one time, no matter how - // often you call it. Useful for lazy initialization. - var once = partial(before, 2); - - // Returns the first key on an object that passes a truth test. - function findKey(obj, predicate, context) { - predicate = cb(predicate, context); - var _keys = keys(obj), key; - for (var i = 0, length = _keys.length; i < length; i++) { - key = _keys[i]; - if (predicate(obj[key], key, obj)) return key; - } - } - - // Internal function to generate `_.findIndex` and `_.findLastIndex`. - function createPredicateIndexFinder(dir) { - return function(array, predicate, context) { - predicate = cb(predicate, context); - var length = getLength(array); - var index = dir > 0 ? 0 : length - 1; - for (; index >= 0 && index < length; index += dir) { - if (predicate(array[index], index, array)) return index; - } - return -1; - }; - } - - // Returns the first index on an array-like that passes a truth test. - var findIndex = createPredicateIndexFinder(1); - - // Returns the last index on an array-like that passes a truth test. - var findLastIndex = createPredicateIndexFinder(-1); - - // Use a comparator function to figure out the smallest index at which - // an object should be inserted so as to maintain order. Uses binary search. - function sortedIndex(array, obj, iteratee, context) { - iteratee = cb(iteratee, context, 1); - var value = iteratee(obj); - var low = 0, high = getLength(array); - while (low < high) { - var mid = Math.floor((low + high) / 2); - if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; - } - return low; - } - - // Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions. - function createIndexFinder(dir, predicateFind, sortedIndex) { - return function(array, item, idx) { - var i = 0, length = getLength(array); - if (typeof idx == 'number') { - if (dir > 0) { - i = idx >= 0 ? idx : Math.max(idx + length, i); - } else { - length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; - } - } else if (sortedIndex && idx && length) { - idx = sortedIndex(array, item); - return array[idx] === item ? idx : -1; - } - if (item !== item) { - idx = predicateFind(slice.call(array, i, length), isNaN$1); - return idx >= 0 ? idx + i : -1; - } - for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { - if (array[idx] === item) return idx; - } - return -1; - }; - } - - // Return the position of the first occurrence of an item in an array, - // or -1 if the item is not included in the array. - // If the array is large and already in sort order, pass `true` - // for **isSorted** to use binary search. - var indexOf = createIndexFinder(1, findIndex, sortedIndex); - - // Return the position of the last occurrence of an item in an array, - // or -1 if the item is not included in the array. - var lastIndexOf = createIndexFinder(-1, findLastIndex); - - // Return the first value which passes a truth test. - function find(obj, predicate, context) { - var keyFinder = isArrayLike(obj) ? findIndex : findKey; - var key = keyFinder(obj, predicate, context); - if (key !== void 0 && key !== -1) return obj[key]; - } - - // Convenience version of a common use case of `_.find`: getting the first - // object containing specific `key:value` pairs. - function findWhere(obj, attrs) { - return find(obj, matcher(attrs)); - } - - // The cornerstone for collection functions, an `each` - // implementation, aka `forEach`. - // Handles raw objects in addition to array-likes. Treats all - // sparse array-likes as if they were dense. - function each(obj, iteratee, context) { - iteratee = optimizeCb(iteratee, context); - var i, length; - if (isArrayLike(obj)) { - for (i = 0, length = obj.length; i < length; i++) { - iteratee(obj[i], i, obj); - } - } else { - var _keys = keys(obj); - for (i = 0, length = _keys.length; i < length; i++) { - iteratee(obj[_keys[i]], _keys[i], obj); - } - } - return obj; - } - - // Return the results of applying the iteratee to each element. - function map(obj, iteratee, context) { - iteratee = cb(iteratee, context); - var _keys = !isArrayLike(obj) && keys(obj), - length = (_keys || obj).length, - results = Array(length); - for (var index = 0; index < length; index++) { - var currentKey = _keys ? _keys[index] : index; - results[index] = iteratee(obj[currentKey], currentKey, obj); - } - return results; - } - - // Internal helper to create a reducing function, iterating left or right. - function createReduce(dir) { - // Wrap code that reassigns argument variables in a separate function than - // the one that accesses `arguments.length` to avoid a perf hit. (#1991) - var reducer = function(obj, iteratee, memo, initial) { - var _keys = !isArrayLike(obj) && keys(obj), - length = (_keys || obj).length, - index = dir > 0 ? 0 : length - 1; - if (!initial) { - memo = obj[_keys ? _keys[index] : index]; - index += dir; - } - for (; index >= 0 && index < length; index += dir) { - var currentKey = _keys ? _keys[index] : index; - memo = iteratee(memo, obj[currentKey], currentKey, obj); - } - return memo; - }; - - return function(obj, iteratee, memo, context) { - var initial = arguments.length >= 3; - return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial); - }; - } - - // **Reduce** builds up a single result from a list of values, aka `inject`, - // or `foldl`. - var reduce = createReduce(1); - - // The right-associative version of reduce, also known as `foldr`. - var reduceRight = createReduce(-1); - - // Return all the elements that pass a truth test. - function filter(obj, predicate, context) { - var results = []; - predicate = cb(predicate, context); - each(obj, function(value, index, list) { - if (predicate(value, index, list)) results.push(value); - }); - return results; - } - - // Return all the elements for which a truth test fails. - function reject(obj, predicate, context) { - return filter(obj, negate(cb(predicate)), context); - } - - // Determine whether all of the elements pass a truth test. - function every(obj, predicate, context) { - predicate = cb(predicate, context); - var _keys = !isArrayLike(obj) && keys(obj), - length = (_keys || obj).length; - for (var index = 0; index < length; index++) { - var currentKey = _keys ? _keys[index] : index; - if (!predicate(obj[currentKey], currentKey, obj)) return false; - } - return true; - } - - // Determine if at least one element in the object passes a truth test. - function some(obj, predicate, context) { - predicate = cb(predicate, context); - var _keys = !isArrayLike(obj) && keys(obj), - length = (_keys || obj).length; - for (var index = 0; index < length; index++) { - var currentKey = _keys ? _keys[index] : index; - if (predicate(obj[currentKey], currentKey, obj)) return true; - } - return false; - } - - // Determine if the array or object contains a given item (using `===`). - function contains(obj, item, fromIndex, guard) { - if (!isArrayLike(obj)) obj = values(obj); - if (typeof fromIndex != 'number' || guard) fromIndex = 0; - return indexOf(obj, item, fromIndex) >= 0; - } - - // Invoke a method (with arguments) on every item in a collection. - var invoke = restArguments(function(obj, path, args) { - var contextPath, func; - if (isFunction$1(path)) { - func = path; - } else { - path = toPath(path); - contextPath = path.slice(0, -1); - path = path[path.length - 1]; - } - return map(obj, function(context) { - var method = func; - if (!method) { - if (contextPath && contextPath.length) { - context = deepGet(context, contextPath); - } - if (context == null) return void 0; - method = context[path]; - } - return method == null ? method : method.apply(context, args); - }); - }); - - // Convenience version of a common use case of `_.map`: fetching a property. - function pluck(obj, key) { - return map(obj, property(key)); - } - - // Convenience version of a common use case of `_.filter`: selecting only - // objects containing specific `key:value` pairs. - function where(obj, attrs) { - return filter(obj, matcher(attrs)); - } - - // Return the maximum element (or element-based computation). - function max(obj, iteratee, context) { - var result = -Infinity, lastComputed = -Infinity, - value, computed; - if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { - obj = isArrayLike(obj) ? obj : values(obj); - for (var i = 0, length = obj.length; i < length; i++) { - value = obj[i]; - if (value != null && value > result) { - result = value; - } - } - } else { - iteratee = cb(iteratee, context); - each(obj, function(v, index, list) { - computed = iteratee(v, index, list); - if (computed > lastComputed || computed === -Infinity && result === -Infinity) { - result = v; - lastComputed = computed; - } - }); - } - return result; - } - - // Return the minimum element (or element-based computation). - function min(obj, iteratee, context) { - var result = Infinity, lastComputed = Infinity, - value, computed; - if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { - obj = isArrayLike(obj) ? obj : values(obj); - for (var i = 0, length = obj.length; i < length; i++) { - value = obj[i]; - if (value != null && value < result) { - result = value; - } - } - } else { - iteratee = cb(iteratee, context); - each(obj, function(v, index, list) { - computed = iteratee(v, index, list); - if (computed < lastComputed || computed === Infinity && result === Infinity) { - result = v; - lastComputed = computed; - } - }); - } - return result; - } - - // Sample **n** random values from a collection using the modern version of the - // [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle). - // If **n** is not specified, returns a single random element. - // The internal `guard` argument allows it to work with `_.map`. - function sample(obj, n, guard) { - if (n == null || guard) { - if (!isArrayLike(obj)) obj = values(obj); - return obj[random(obj.length - 1)]; - } - var sample = isArrayLike(obj) ? clone(obj) : values(obj); - var length = getLength(sample); - n = Math.max(Math.min(n, length), 0); - var last = length - 1; - for (var index = 0; index < n; index++) { - var rand = random(index, last); - var temp = sample[index]; - sample[index] = sample[rand]; - sample[rand] = temp; - } - return sample.slice(0, n); - } - - // Shuffle a collection. - function shuffle(obj) { - return sample(obj, Infinity); - } - - // Sort the object's values by a criterion produced by an iteratee. - function sortBy(obj, iteratee, context) { - var index = 0; - iteratee = cb(iteratee, context); - return pluck(map(obj, function(value, key, list) { - return { - value: value, - index: index++, - criteria: iteratee(value, key, list) - }; - }).sort(function(left, right) { - var a = left.criteria; - var b = right.criteria; - if (a !== b) { - if (a > b || a === void 0) return 1; - if (a < b || b === void 0) return -1; - } - return left.index - right.index; - }), 'value'); - } - - // An internal function used for aggregate "group by" operations. - function group(behavior, partition) { - return function(obj, iteratee, context) { - var result = partition ? [[], []] : {}; - iteratee = cb(iteratee, context); - each(obj, function(value, index) { - var key = iteratee(value, index, obj); - behavior(result, value, key); - }); - return result; - }; - } - - // Groups the object's values by a criterion. Pass either a string attribute - // to group by, or a function that returns the criterion. - var groupBy = group(function(result, value, key) { - if (has$1(result, key)) result[key].push(value); else result[key] = [value]; - }); - - // Indexes the object's values by a criterion, similar to `_.groupBy`, but for - // when you know that your index values will be unique. - var indexBy = group(function(result, value, key) { - result[key] = value; - }); - - // Counts instances of an object that group by a certain criterion. Pass - // either a string attribute to count by, or a function that returns the - // criterion. - var countBy = group(function(result, value, key) { - if (has$1(result, key)) result[key]++; else result[key] = 1; - }); - - // Split a collection into two arrays: one whose elements all pass the given - // truth test, and one whose elements all do not pass the truth test. - var partition = group(function(result, value, pass) { - result[pass ? 0 : 1].push(value); - }, true); - - // Safely create a real, live array from anything iterable. - var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g; - function toArray(obj) { - if (!obj) return []; - if (isArray(obj)) return slice.call(obj); - if (isString(obj)) { - // Keep surrogate pair characters together. - return obj.match(reStrSymbol); - } - if (isArrayLike(obj)) return map(obj, identity); - return values(obj); - } - - // Return the number of elements in a collection. - function size(obj) { - if (obj == null) return 0; - return isArrayLike(obj) ? obj.length : keys(obj).length; - } - - // Internal `_.pick` helper function to determine whether `key` is an enumerable - // property name of `obj`. - function keyInObj(value, key, obj) { - return key in obj; - } - - // Return a copy of the object only containing the allowed properties. - var pick = restArguments(function(obj, keys) { - var result = {}, iteratee = keys[0]; - if (obj == null) return result; - if (isFunction$1(iteratee)) { - if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]); - keys = allKeys(obj); - } else { - iteratee = keyInObj; - keys = flatten$1(keys, false, false); - obj = Object(obj); - } - for (var i = 0, length = keys.length; i < length; i++) { - var key = keys[i]; - var value = obj[key]; - if (iteratee(value, key, obj)) result[key] = value; - } - return result; - }); - - // Return a copy of the object without the disallowed properties. - var omit = restArguments(function(obj, keys) { - var iteratee = keys[0], context; - if (isFunction$1(iteratee)) { - iteratee = negate(iteratee); - if (keys.length > 1) context = keys[1]; - } else { - keys = map(flatten$1(keys, false, false), String); - iteratee = function(value, key) { - return !contains(keys, key); - }; - } - return pick(obj, iteratee, context); - }); - - // Returns everything but the last entry of the array. Especially useful on - // the arguments object. Passing **n** will return all the values in - // the array, excluding the last N. - function initial(array, n, guard) { - return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); - } - - // Get the first element of an array. Passing **n** will return the first N - // values in the array. The **guard** check allows it to work with `_.map`. - function first(array, n, guard) { - if (array == null || array.length < 1) return n == null || guard ? void 0 : []; - if (n == null || guard) return array[0]; - return initial(array, array.length - n); - } - - // Returns everything but the first entry of the `array`. Especially useful on - // the `arguments` object. Passing an **n** will return the rest N values in the - // `array`. - function rest(array, n, guard) { - return slice.call(array, n == null || guard ? 1 : n); - } - - // Get the last element of an array. Passing **n** will return the last N - // values in the array. - function last(array, n, guard) { - if (array == null || array.length < 1) return n == null || guard ? void 0 : []; - if (n == null || guard) return array[array.length - 1]; - return rest(array, Math.max(0, array.length - n)); - } - - // Trim out all falsy values from an array. - function compact(array) { - return filter(array, Boolean); - } - - // Flatten out an array, either recursively (by default), or up to `depth`. - // Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively. - function flatten(array, depth) { - return flatten$1(array, depth, false); - } - - // Take the difference between one array and a number of other arrays. - // Only the elements present in just the first array will remain. - var difference = restArguments(function(array, rest) { - rest = flatten$1(rest, true, true); - return filter(array, function(value){ - return !contains(rest, value); - }); - }); - - // Return a version of the array that does not contain the specified value(s). - var without = restArguments(function(array, otherArrays) { - return difference(array, otherArrays); - }); - - // Produce a duplicate-free version of the array. If the array has already - // been sorted, you have the option of using a faster algorithm. - // The faster algorithm will not work with an iteratee if the iteratee - // is not a one-to-one function, so providing an iteratee will disable - // the faster algorithm. - function uniq(array, isSorted, iteratee, context) { - if (!isBoolean(isSorted)) { - context = iteratee; - iteratee = isSorted; - isSorted = false; - } - if (iteratee != null) iteratee = cb(iteratee, context); - var result = []; - var seen = []; - for (var i = 0, length = getLength(array); i < length; i++) { - var value = array[i], - computed = iteratee ? iteratee(value, i, array) : value; - if (isSorted && !iteratee) { - if (!i || seen !== computed) result.push(value); - seen = computed; - } else if (iteratee) { - if (!contains(seen, computed)) { - seen.push(computed); - result.push(value); - } - } else if (!contains(result, value)) { - result.push(value); - } - } - return result; - } - - // Produce an array that contains the union: each distinct element from all of - // the passed-in arrays. - var union = restArguments(function(arrays) { - return uniq(flatten$1(arrays, true, true)); - }); - - // Produce an array that contains every item shared between all the - // passed-in arrays. - function intersection(array) { - var result = []; - var argsLength = arguments.length; - for (var i = 0, length = getLength(array); i < length; i++) { - var item = array[i]; - if (contains(result, item)) continue; - var j; - for (j = 1; j < argsLength; j++) { - if (!contains(arguments[j], item)) break; - } - if (j === argsLength) result.push(item); - } - return result; - } - - // Complement of zip. Unzip accepts an array of arrays and groups - // each array's elements on shared indices. - function unzip(array) { - var length = array && max(array, getLength).length || 0; - var result = Array(length); - - for (var index = 0; index < length; index++) { - result[index] = pluck(array, index); - } - return result; - } - - // Zip together multiple lists into a single array -- elements that share - // an index go together. - var zip = restArguments(unzip); - - // Converts lists into objects. Pass either a single array of `[key, value]` - // pairs, or two parallel arrays of the same length -- one of keys, and one of - // the corresponding values. Passing by pairs is the reverse of `_.pairs`. - function object(list, values) { - var result = {}; - for (var i = 0, length = getLength(list); i < length; i++) { - if (values) { - result[list[i]] = values[i]; - } else { - result[list[i][0]] = list[i][1]; - } - } - return result; - } - - // Generate an integer Array containing an arithmetic progression. A port of - // the native Python `range()` function. See - // [the Python documentation](https://docs.python.org/library/functions.html#range). - function range(start, stop, step) { - if (stop == null) { - stop = start || 0; - start = 0; - } - if (!step) { - step = stop < start ? -1 : 1; - } - - var length = Math.max(Math.ceil((stop - start) / step), 0); - var range = Array(length); - - for (var idx = 0; idx < length; idx++, start += step) { - range[idx] = start; - } - - return range; - } - - // Chunk a single array into multiple arrays, each containing `count` or fewer - // items. - function chunk(array, count) { - if (count == null || count < 1) return []; - var result = []; - var i = 0, length = array.length; - while (i < length) { - result.push(slice.call(array, i, i += count)); - } - return result; - } - - // Helper function to continue chaining intermediate results. - function chainResult(instance, obj) { - return instance._chain ? _$1(obj).chain() : obj; - } - - // Add your own custom functions to the Underscore object. - function mixin(obj) { - each(functions(obj), function(name) { - var func = _$1[name] = obj[name]; - _$1.prototype[name] = function() { - var args = [this._wrapped]; - push.apply(args, arguments); - return chainResult(this, func.apply(_$1, args)); - }; - }); - return _$1; - } - - // Add all mutator `Array` functions to the wrapper. - each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { - var method = ArrayProto[name]; - _$1.prototype[name] = function() { - var obj = this._wrapped; - if (obj != null) { - method.apply(obj, arguments); - if ((name === 'shift' || name === 'splice') && obj.length === 0) { - delete obj[0]; - } - } - return chainResult(this, obj); - }; - }); - - // Add all accessor `Array` functions to the wrapper. - each(['concat', 'join', 'slice'], function(name) { - var method = ArrayProto[name]; - _$1.prototype[name] = function() { - var obj = this._wrapped; - if (obj != null) obj = method.apply(obj, arguments); - return chainResult(this, obj); - }; - }); - - // Named Exports - - var allExports = { - __proto__: null, - VERSION: VERSION, - restArguments: restArguments, - isObject: isObject, - isNull: isNull, - isUndefined: isUndefined, - isBoolean: isBoolean, - isElement: isElement, - isString: isString, - isNumber: isNumber, - isDate: isDate, - isRegExp: isRegExp, - isError: isError, - isSymbol: isSymbol, - isArrayBuffer: isArrayBuffer, - isDataView: isDataView$1, - isArray: isArray, - isFunction: isFunction$1, - isArguments: isArguments$1, - isFinite: isFinite$1, - isNaN: isNaN$1, - isTypedArray: isTypedArray$1, - isEmpty: isEmpty, - isMatch: isMatch, - isEqual: isEqual, - isMap: isMap, - isWeakMap: isWeakMap, - isSet: isSet, - isWeakSet: isWeakSet, - keys: keys, - allKeys: allKeys, - values: values, - pairs: pairs, - invert: invert, - functions: functions, - methods: functions, - extend: extend, - extendOwn: extendOwn, - assign: extendOwn, - defaults: defaults, - create: create, - clone: clone, - tap: tap, - get: get, - has: has, - mapObject: mapObject, - identity: identity, - constant: constant, - noop: noop, - toPath: toPath$1, - property: property, - propertyOf: propertyOf, - matcher: matcher, - matches: matcher, - times: times, - random: random, - now: now, - escape: _escape, - unescape: _unescape, - templateSettings: templateSettings, - template: template, - result: result, - uniqueId: uniqueId, - chain: chain, - iteratee: iteratee, - partial: partial, - bind: bind, - bindAll: bindAll, - memoize: memoize, - delay: delay, - defer: defer, - throttle: throttle, - debounce: debounce, - wrap: wrap, - negate: negate, - compose: compose, - after: after, - before: before, - once: once, - findKey: findKey, - findIndex: findIndex, - findLastIndex: findLastIndex, - sortedIndex: sortedIndex, - indexOf: indexOf, - lastIndexOf: lastIndexOf, - find: find, - detect: find, - findWhere: findWhere, - each: each, - forEach: each, - map: map, - collect: map, - reduce: reduce, - foldl: reduce, - inject: reduce, - reduceRight: reduceRight, - foldr: reduceRight, - filter: filter, - select: filter, - reject: reject, - every: every, - all: every, - some: some, - any: some, - contains: contains, - includes: contains, - include: contains, - invoke: invoke, - pluck: pluck, - where: where, - max: max, - min: min, - shuffle: shuffle, - sample: sample, - sortBy: sortBy, - groupBy: groupBy, - indexBy: indexBy, - countBy: countBy, - partition: partition, - toArray: toArray, - size: size, - pick: pick, - omit: omit, - first: first, - head: first, - take: first, - initial: initial, - last: last, - rest: rest, - tail: rest, - drop: rest, - compact: compact, - flatten: flatten, - without: without, - uniq: uniq, - unique: uniq, - union: union, - intersection: intersection, - difference: difference, - unzip: unzip, - transpose: unzip, - zip: zip, - object: object, - range: range, - chunk: chunk, - mixin: mixin, - 'default': _$1 - }; - - // Default Export - - // Add all of the Underscore functions to the wrapper object. - var _ = mixin(allExports); - // Legacy Node.js API. - _._ = _; - - return _; - -}))); -//# sourceMappingURL=underscore-umd.js.map diff --git a/docs/_static/underscore.js b/docs/_static/underscore.js index cf177d4..5b55f32 100644 --- a/docs/_static/underscore.js +++ b/docs/_static/underscore.js @@ -1,6 +1,31 @@ -!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n="undefined"!=typeof globalThis?globalThis:n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){ -// Underscore.js 1.13.1 -// https://underscorejs.org -// (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors -// Underscore may be freely distributed under the MIT license. -var n="1.13.1",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,d=isFinite,g=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u=0&&t<=m}}function J(n){return function(r){return null==r?void 0:r[n]}}var G=J("byteLength"),H=K(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:C(!1),Y=J("length");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e":">",'"':""","'":"'","`":"`"},Cn=Ln($n),Kn=Ln(_n($n)),Jn=tn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Gn=/(.)^/,Hn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Qn=/\\|'|\r|\n|\u2028|\u2029/g;function Xn(n){return"\\"+Hn[n]}var Yn=/^\s*(\w|\$)+\s*$/;var Zn=0;function nr(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var o=Mn(n.prototype),i=n.apply(o,u);return _(i)?i:o}var rr=j((function(n,r){var t=rr.placeholder,e=function(){for(var u=0,o=r.length,i=Array(o),a=0;a1)ur(a,r-1,t,e),u=e.length;else for(var f=0,c=a.length;f0&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var lr=rr(cr,2);function sr(n,r,t){r=qn(r,t);for(var e,u=nn(n),o=0,i=u.length;o0?0:u-1;o>=0&&o0?a=o>=0?o:Math.max(o+f,a):f=o>=0?Math.min(o+1,f):o+f+1;else if(t&&o&&f)return e[o=t(e,u)]===u?o:-1;if(u!=u)return(o=r(i.call(e,a,f),$))>=0?o+a:-1;for(o=n>0?a:f-1;o>=0&&o0?0:i-1;for(u||(e=r[o?o[a]:a],a+=n);a>=0&&a=3;return r(n,Fn(t,u,4),e,o)}}var Ar=wr(1),xr=wr(-1);function Sr(n,r,t){var e=[];return r=qn(r,t),jr(n,(function(n,t,u){r(n,t,u)&&e.push(n)})),e}function Or(n,r,t){r=qn(r,t);for(var e=!er(n)&&nn(n),u=(e||n).length,o=0;o=0}var Br=j((function(n,r,t){var e,u;return D(r)?u=r:(r=Nn(r),e=r.slice(0,-1),r=r[r.length-1]),_r(n,(function(n){var o=u;if(!o){if(e&&e.length&&(n=In(n,e)),null==n)return;o=n[r]}return null==o?o:o.apply(n,t)}))}));function Nr(n,r){return _r(n,Rn(r))}function Ir(n,r,t){var e,u,o=-1/0,i=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;ao&&(o=e);else r=qn(r,t),jr(n,(function(n,t,e){((u=r(n,t,e))>i||u===-1/0&&o===-1/0)&&(o=n,i=u)}));return o}function Tr(n,r,t){if(null==r||t)return er(n)||(n=jn(n)),n[Wn(n.length-1)];var e=er(n)?En(n):jn(n),u=Y(e);r=Math.max(Math.min(r,u),0);for(var o=u-1,i=0;i1&&(e=Fn(e,r[1])),r=an(n)):(e=qr,r=ur(r,!1,!1),n=Object(n));for(var u=0,o=r.length;u1&&(t=r[1])):(r=_r(ur(r,!1,!1),String),e=function(n,t){return!Er(r,t)}),Ur(n,e,t)}));function zr(n,r,t){return i.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function Lr(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:zr(n,n.length-r)}function $r(n,r,t){return i.call(n,null==r||t?1:r)}var Cr=j((function(n,r){return r=ur(r,!0,!0),Sr(n,(function(n){return!Er(r,n)}))})),Kr=j((function(n,r){return Cr(n,r)}));function Jr(n,r,t,e){A(r)||(e=t,t=r,r=!1),null!=t&&(t=qn(t,e));for(var u=[],o=[],i=0,a=Y(n);ir?(e&&(clearTimeout(e),e=null),a=c,i=n.apply(u,o),e||(u=o=null)):e||!1===t.trailing||(e=setTimeout(f,l)),i};return c.cancel=function(){clearTimeout(e),a=0,e=u=o=null},c},debounce:function(n,r,t){var e,u,o,i,a,f=function(){var c=zn()-u;r>c?e=setTimeout(f,r-c):(e=null,t||(i=n.apply(a,o)),e||(o=a=null))},c=j((function(c){return a=this,o=c,u=zn(),e||(e=setTimeout(f,r),t&&(i=n.apply(a,o))),i}));return c.cancel=function(){clearTimeout(e),e=o=a=null},c},wrap:function(n,r){return rr(r,n)},negate:fr,compose:function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}},before:cr,once:lr,findKey:sr,findIndex:vr,findLastIndex:hr,sortedIndex:yr,indexOf:gr,lastIndexOf:br,find:mr,detect:mr,findWhere:function(n,r){return mr(n,Dn(r))},each:jr,forEach:jr,map:_r,collect:_r,reduce:Ar,foldl:Ar,inject:Ar,reduceRight:xr,foldr:xr,filter:Sr,select:Sr,reject:function(n,r,t){return Sr(n,fr(qn(r)),t)},every:Or,all:Or,some:Mr,any:Mr,contains:Er,includes:Er,include:Er,invoke:Br,pluck:Nr,where:function(n,r){return Sr(n,Dn(r))},max:Ir,min:function(n,r,t){var e,u,o=1/0,i=1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;ae||void 0===t)return 1;if(t2;a== +null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect= +function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e= +e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck= +function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a, +c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}}; +b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments, +1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)}; +b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"}; +b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a), +function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+ +u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]= +function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain= +true;return this};m.prototype.value=function(){return this._wrapped}}).call(this); diff --git a/docs/basic_main.html b/docs/basic_main.html index 551dae4..a74fa74 100644 --- a/docs/basic_main.html +++ b/docs/basic_main.html @@ -19,10 +19,6 @@ - - - - @@ -148,9 +144,6 @@ FILE_SUFFIX:'.html', HAS_SOURCE: true }; - - + diff --git a/docs/example.html b/docs/example.html index b77f93f..926439d 100644 --- a/docs/example.html +++ b/docs/example.html @@ -19,10 +19,6 @@ - - - - @@ -62,7 +58,7 @@ -

    Contents:

    +

    Contents:

      -
    • has_prior_net_structure (PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath property) +
    • has_prior_net_structure() (PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath property)
    • HillClimbing (class in PyCTBN.PyCTBN.optimizers.hill_climbing_search)
    • @@ -459,8 +448,6 @@

      M

        -
      • variables (PyCTBN.PyCTBN.structure_graph.network_generator.NetworkGenerator property) +
      • variables() (PyCTBN.PyCTBN.structure_graph.network_generator.NetworkGenerator property)
        • (PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter property) @@ -1319,9 +1422,6 @@ FILE_SUFFIX:'.html', HAS_SOURCE: true }; - - + diff --git a/docs/index.html b/docs/index.html index 8f2e8f1..910075a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -19,10 +19,6 @@ - - - - @@ -226,9 +222,6 @@ FILE_SUFFIX:'.html', HAS_SOURCE: true }; - - + diff --git a/docs/modules.html b/docs/modules.html index 1f64d19..9609747 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -19,10 +19,6 @@ - - - - @@ -174,9 +170,6 @@ FILE_SUFFIX:'.html', HAS_SOURCE: true }; - - + diff --git a/docs/objects.inv b/docs/objects.inv index bb95ee3..d3f8181 100644 Binary files a/docs/objects.inv and b/docs/objects.inv differ diff --git a/docs/py-modindex.html b/docs/py-modindex.html index d191c8c..460b1f7 100644 --- a/docs/py-modindex.html +++ b/docs/py-modindex.html @@ -19,10 +19,6 @@ - - - - @@ -123,20 +119,11 @@

          Python Module Index

          - e | p
          - - - - - @@ -300,16 +287,36 @@ + + + + + + + + + + + + + + + + + +
           
          - e
          - example -
           
          p
              PyCTBN.tests.estimators.test_parameters_estimator
              + PyCTBN.tests.estimators.test_structure_constraint_based_estimator +
              PyCTBN.tests.estimators.test_structure_estimator
              + PyCTBN.tests.estimators.test_structure_score_based_estimator +
              PyCTBN.tests.optimizers
              + PyCTBN.tests.optimizers.test_hill_climbing_search +
              + PyCTBN.tests.optimizers.test_tabu_search +
              @@ -320,6 +327,11 @@     PyCTBN.tests.structure_graph.test_cim
              + PyCTBN.tests.structure_graph.test_networkgenerator +
              @@ -345,6 +357,11 @@     PyCTBN.tests.structure_graph.test_trajectory
              + PyCTBN.tests.structure_graph.test_trajectorygenerator +
              @@ -395,9 +412,6 @@ FILE_SUFFIX:'.html', HAS_SOURCE: true }; - - + diff --git a/docs/search.html b/docs/search.html index 32554f6..21fd6c9 100644 --- a/docs/search.html +++ b/docs/search.html @@ -19,10 +19,6 @@ - - - - @@ -157,9 +153,6 @@ FILE_SUFFIX:'.html', HAS_SOURCE: true }; - - + diff --git a/docs/searchindex.js b/docs/searchindex.js index f7e966e..70f998c 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["PyCTBN","PyCTBN.PyCTBN","PyCTBN.PyCTBN.estimators","PyCTBN.PyCTBN.optimizers","PyCTBN.PyCTBN.structure_graph","PyCTBN.PyCTBN.utility","PyCTBN.tests","PyCTBN.tests.estimators","PyCTBN.tests.optimizers","PyCTBN.tests.structure_graph","PyCTBN.tests.utility","basic_main","examples","index","modules","setup"],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","PyCTBN.PyCTBN.rst","PyCTBN.PyCTBN.estimators.rst","PyCTBN.PyCTBN.optimizers.rst","PyCTBN.PyCTBN.structure_graph.rst","PyCTBN.PyCTBN.utility.rst","PyCTBN.tests.rst","PyCTBN.tests.estimators.rst","PyCTBN.tests.optimizers.rst","PyCTBN.tests.structure_graph.rst","PyCTBN.tests.utility.rst","basic_main.rst","examples.rst","index.rst","modules.rst","setup.rst"],objects:{"":{PyCTBN:[0,0,0,"-"]},"PyCTBN.PyCTBN":{estimators:[2,0,0,"-"],optimizers:[3,0,0,"-"],structure_graph:[4,0,0,"-"],utility:[5,0,0,"-"]},"PyCTBN.PyCTBN.estimators":{fam_score_calculator:[2,0,0,"-"],parameters_estimator:[2,0,0,"-"],structure_constraint_based_estimator:[2,0,0,"-"],structure_estimator:[2,0,0,"-"],structure_score_based_estimator:[2,0,0,"-"]},"PyCTBN.PyCTBN.estimators.fam_score_calculator":{FamScoreCalculator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator":{get_fam_score:[2,2,1,""],marginal_likelihood_q:[2,2,1,""],marginal_likelihood_theta:[2,2,1,""],single_cim_xu_marginal_likelihood_q:[2,2,1,""],single_cim_xu_marginal_likelihood_theta:[2,2,1,""],single_internal_cim_xxu_marginal_likelihood_theta:[2,2,1,""],variable_cim_xu_marginal_likelihood_q:[2,2,1,""],variable_cim_xu_marginal_likelihood_theta:[2,2,1,""]},"PyCTBN.PyCTBN.estimators.parameters_estimator":{ParametersEstimator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator":{compute_parameters_for_node:[2,2,1,""],compute_state_res_time_for_node:[2,2,1,""],compute_state_transitions_for_a_node:[2,2,1,""],fast_init:[2,2,1,""]},"PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator":{StructureConstraintBasedEstimator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator":{complete_test:[2,2,1,""],compute_thumb_value:[2,2,1,""],ctpc_algorithm:[2,2,1,""],estimate_structure:[2,2,1,""],independence_test:[2,2,1,""],one_iteration_of_CTPC_algorithm:[2,2,1,""]},"PyCTBN.PyCTBN.estimators.structure_estimator":{StructureEstimator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator":{adjacency_matrix:[2,2,1,""],build_complete_graph:[2,2,1,""],build_removable_edges_matrix:[2,2,1,""],estimate_structure:[2,2,1,""],generate_possible_sub_sets_of_size:[2,2,1,""],save_plot_estimated_structure_graph:[2,2,1,""],save_results:[2,2,1,""],spurious_edges:[2,2,1,""]},"PyCTBN.PyCTBN.estimators.structure_score_based_estimator":{StructureScoreBasedEstimator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator":{estimate_parents:[2,2,1,""],estimate_structure:[2,2,1,""],get_score_from_graph:[2,2,1,""]},"PyCTBN.PyCTBN.optimizers":{constraint_based_optimizer:[3,0,0,"-"],hill_climbing_search:[3,0,0,"-"],optimizer:[3,0,0,"-"],tabu_search:[3,0,0,"-"]},"PyCTBN.PyCTBN.optimizers.constraint_based_optimizer":{ConstraintBasedOptimizer:[3,1,1,""]},"PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer":{optimize_structure:[3,2,1,""]},"PyCTBN.PyCTBN.optimizers.hill_climbing_search":{HillClimbing:[3,1,1,""]},"PyCTBN.PyCTBN.optimizers.hill_climbing_search.HillClimbing":{optimize_structure:[3,2,1,""]},"PyCTBN.PyCTBN.optimizers.optimizer":{Optimizer:[3,1,1,""]},"PyCTBN.PyCTBN.optimizers.optimizer.Optimizer":{optimize_structure:[3,2,1,""]},"PyCTBN.PyCTBN.optimizers.tabu_search":{TabuSearch:[3,1,1,""]},"PyCTBN.PyCTBN.optimizers.tabu_search.TabuSearch":{optimize_structure:[3,2,1,""]},"PyCTBN.PyCTBN.structure_graph":{conditional_intensity_matrix:[4,0,0,"-"],network_graph:[4,0,0,"-"],sample_path:[4,0,0,"-"],set_of_cims:[4,0,0,"-"],structure:[4,0,0,"-"],trajectory:[4,0,0,"-"]},"PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix":{ConditionalIntensityMatrix:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix":{cim:[4,2,1,""],compute_cim_coefficients:[4,2,1,""],state_residence_times:[4,2,1,""],state_transition_matrix:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.network_graph":{NetworkGraph:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph":{add_edges:[4,2,1,""],add_nodes:[4,2,1,""],build_p_comb_structure_for_a_node:[4,2,1,""],build_time_columns_filtering_for_a_node:[4,2,1,""],build_time_scalar_indexing_structure_for_a_node:[4,2,1,""],build_transition_filtering_for_a_node:[4,2,1,""],build_transition_scalar_indexing_structure_for_a_node:[4,2,1,""],clear_indexing_filtering_structures:[4,2,1,""],edges:[4,2,1,""],fast_init:[4,2,1,""],get_node_indx:[4,2,1,""],get_ordered_by_indx_set_of_parents:[4,2,1,""],get_parents_by_id:[4,2,1,""],get_positional_node_indx:[4,2,1,""],get_states_number:[4,2,1,""],has_edge:[4,2,1,""],nodes:[4,2,1,""],nodes_indexes:[4,2,1,""],nodes_values:[4,2,1,""],p_combs:[4,2,1,""],remove_edges:[4,2,1,""],remove_node:[4,2,1,""],time_filtering:[4,2,1,""],time_scalar_indexing_strucure:[4,2,1,""],transition_filtering:[4,2,1,""],transition_scalar_indexing_structure:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.sample_path":{SamplePath:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath":{build_structure:[4,2,1,""],build_trajectories:[4,2,1,""],clear_memory:[4,2,1,""],has_prior_net_structure:[4,2,1,""],structure:[4,2,1,""],total_variables_count:[4,2,1,""],trajectories:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.set_of_cims":{SetOfCims:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims":{actual_cims:[4,2,1,""],build_cims:[4,2,1,""],build_times_and_transitions_structures:[4,2,1,""],filter_cims_with_mask:[4,2,1,""],get_cims_number:[4,2,1,""],p_combs:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.structure":{Structure:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.structure.Structure":{add_edge:[4,2,1,""],clean_structure_edges:[4,2,1,""],contains_edge:[4,2,1,""],edges:[4,2,1,""],get_node_id:[4,2,1,""],get_node_indx:[4,2,1,""],get_positional_node_indx:[4,2,1,""],get_states_number:[4,2,1,""],nodes_indexes:[4,2,1,""],nodes_labels:[4,2,1,""],nodes_values:[4,2,1,""],remove_edge:[4,2,1,""],remove_node:[4,2,1,""],total_variables_number:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.trajectory":{Trajectory:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory":{complete_trajectory:[4,2,1,""],size:[4,2,1,""],times:[4,2,1,""],trajectory:[4,2,1,""]},"PyCTBN.PyCTBN.utility":{abstract_importer:[5,0,0,"-"],cache:[5,0,0,"-"],json_importer:[5,0,0,"-"],sample_importer:[5,0,0,"-"]},"PyCTBN.PyCTBN.utility.abstract_importer":{AbstractImporter:[5,1,1,""]},"PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter":{build_list_of_samples_array:[5,2,1,""],build_sorter:[5,2,1,""],clear_concatenated_frame:[5,2,1,""],compute_row_delta_in_all_samples_frames:[5,2,1,""],compute_row_delta_sigle_samples_frame:[5,2,1,""],concatenated_samples:[5,2,1,""],dataset_id:[5,2,1,""],file_path:[5,2,1,""],sorter:[5,2,1,""],structure:[5,2,1,""],variables:[5,2,1,""]},"PyCTBN.PyCTBN.utility.cache":{Cache:[5,1,1,""]},"PyCTBN.PyCTBN.utility.cache.Cache":{clear:[5,2,1,""],find:[5,2,1,""],put:[5,2,1,""]},"PyCTBN.PyCTBN.utility.json_importer":{JsonImporter:[5,1,1,""]},"PyCTBN.PyCTBN.utility.json_importer.JsonImporter":{build_sorter:[5,2,1,""],clear_data_frame_list:[5,2,1,""],dataset_id:[5,2,1,""],import_data:[5,2,1,""],import_sampled_cims:[5,2,1,""],import_structure:[5,2,1,""],import_trajectories:[5,2,1,""],import_variables:[5,2,1,""],normalize_trajectories:[5,2,1,""],one_level_normalizing:[5,2,1,""],read_json_file:[5,2,1,""]},"PyCTBN.PyCTBN.utility.sample_importer":{SampleImporter:[5,1,1,""]},"PyCTBN.PyCTBN.utility.sample_importer.SampleImporter":{build_sorter:[5,2,1,""],dataset_id:[5,2,1,""],import_data:[5,2,1,""]},"PyCTBN.tests":{estimators:[7,0,0,"-"],optimizers:[8,0,0,"-"],structure_graph:[9,0,0,"-"],utility:[10,0,0,"-"]},"PyCTBN.tests.estimators":{test_parameters_estimator:[7,0,0,"-"],test_structure_constraint_based_estimator:[7,0,0,"-"],test_structure_estimator:[7,0,0,"-"],test_structure_score_based_estimator:[7,0,0,"-"]},"PyCTBN.tests.estimators.test_parameters_estimator":{TestParametersEstimatior:[7,1,1,""]},"PyCTBN.tests.estimators.test_parameters_estimator.TestParametersEstimatior":{aux_import_sampled_cims:[7,2,1,""],cim_equality_test:[7,2,1,""],equality_of_cims_of_node:[7,2,1,""],setUpClass:[7,2,1,""],test_compute_parameters_for_node:[7,2,1,""],test_fast_init:[7,2,1,""]},"PyCTBN.tests.estimators.test_structure_constraint_based_estimator":{TestStructureConstraintBasedEstimator:[7,1,1,""]},"PyCTBN.tests.estimators.test_structure_constraint_based_estimator.TestStructureConstraintBasedEstimator":{setUpClass:[7,2,1,""],test_structure_1:[7,2,1,""],test_structure_2:[7,2,1,""],test_structure_3:[7,2,1,""]},"PyCTBN.tests.estimators.test_structure_estimator":{TestStructureEstimator:[7,1,1,""]},"PyCTBN.tests.estimators.test_structure_estimator.TestStructureEstimator":{setUpClass:[7,2,1,""],test_adjacency_matrix:[7,2,1,""],test_build_complete_graph:[7,2,1,""],test_build_removable_edges_matrix:[7,2,1,""],test_generate_possible_sub_sets_of_size:[7,2,1,""],test_init:[7,2,1,""],test_save_plot_estimated_graph:[7,2,1,""],test_save_results:[7,2,1,""],test_time:[7,2,1,""]},"PyCTBN.tests.estimators.test_structure_score_based_estimator":{TestStructureScoreBasedEstimator:[7,1,1,""]},"PyCTBN.tests.estimators.test_structure_score_based_estimator.TestStructureScoreBasedEstimator":{setUpClass:[7,2,1,""],test_structure_1:[7,2,1,""],test_structure_2:[7,2,1,""],test_structure_3:[7,2,1,""],test_structure_monoprocesso:[7,2,1,""]},"PyCTBN.tests.optimizers":{test_hill_climbing_search:[8,0,0,"-"],test_tabu_search:[8,0,0,"-"]},"PyCTBN.tests.optimizers.test_hill_climbing_search":{TestHillClimbingSearch:[8,1,1,""]},"PyCTBN.tests.optimizers.test_hill_climbing_search.TestHillClimbingSearch":{setUpClass:[8,2,1,""],test_structure:[8,2,1,""],test_structure_3:[8,2,1,""]},"PyCTBN.tests.optimizers.test_tabu_search":{TestTabuSearch:[8,1,1,""]},"PyCTBN.tests.optimizers.test_tabu_search.TestTabuSearch":{setUpClass:[8,2,1,""],test_structure:[8,2,1,""],test_structure_3:[8,2,1,""]},"PyCTBN.tests.structure_graph":{test_cim:[9,0,0,"-"],test_networkgraph:[9,0,0,"-"],test_sample_path:[9,0,0,"-"],test_setofcims:[9,0,0,"-"],test_structure:[9,0,0,"-"],test_trajectory:[9,0,0,"-"]},"PyCTBN.tests.structure_graph.test_cim":{TestConditionalIntensityMatrix:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_cim.TestConditionalIntensityMatrix":{setUpClass:[9,2,1,""],test_compute_cim_coefficients:[9,2,1,""],test_init:[9,2,1,""],test_repr:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_networkgraph":{TestNetworkGraph:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_networkgraph.TestNetworkGraph":{aux_build_p_combs_structure:[9,2,1,""],aux_build_time_columns_filtering_structure_for_a_node:[9,2,1,""],aux_build_time_scalar_indexing_structure_for_a_node:[9,2,1,""],aux_build_transition_columns_filtering_structure:[9,2,1,""],aux_build_transition_scalar_indexing_structure_for_a_node:[9,2,1,""],setUpClass:[9,2,1,""],test_add_edges:[9,2,1,""],test_add_nodes:[9,2,1,""],test_build_p_combs_structure:[9,2,1,""],test_build_time_columns_filtering_structure_for_a_node:[9,2,1,""],test_build_time_scalar_indexing_structure_for_a_node:[9,2,1,""],test_build_transition_columns_filtering_structure:[9,2,1,""],test_build_transition_scalar_indexing_structure_for_a_node:[9,2,1,""],test_fast_init:[9,2,1,""],test_get_node_indx:[9,2,1,""],test_get_ordered_by_indx_set_of_parents:[9,2,1,""],test_get_parents_by_id:[9,2,1,""],test_get_states_number:[9,2,1,""],test_init:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_sample_path":{TestSamplePath:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_sample_path.TestSamplePath":{setUpClass:[9,2,1,""],test_buid_samplepath_no_concatenated_samples:[9,2,1,""],test_buid_samplepath_no_variables:[9,2,1,""],test_build_saplepath_no_prior_net_structure:[9,2,1,""],test_build_structure:[9,2,1,""],test_build_structure_bad_sorter:[9,2,1,""],test_build_trajectories:[9,2,1,""],test_init:[9,2,1,""],test_init_not_filled_dataframse:[9,2,1,""],test_init_not_initialized_importer:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_setofcims":{TestSetOfCims:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_setofcims.TestSetOfCims":{another_filtering_method:[9,2,1,""],aux_test_build_cims:[9,2,1,""],aux_test_init:[9,2,1,""],build_p_comb_structure_for_a_node:[9,2,1,""],setUpClass:[9,2,1,""],test_build_cims:[9,2,1,""],test_filter_cims_with_mask:[9,2,1,""],test_init:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_structure":{TestStructure:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_structure.TestStructure":{setUpClass:[9,2,1,""],test_edges_operations:[9,2,1,""],test_equality:[9,2,1,""],test_get_node_id:[9,2,1,""],test_get_node_indx:[9,2,1,""],test_get_positional_node_indx:[9,2,1,""],test_get_states_number:[9,2,1,""],test_init:[9,2,1,""],test_repr:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_trajectory":{TestTrajectory:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_trajectory.TestTrajectory":{setUpClass:[9,2,1,""],test_init:[9,2,1,""]},"PyCTBN.tests.utility":{test_cache:[10,0,0,"-"],test_json_importer:[10,0,0,"-"],test_sample_importer:[10,0,0,"-"]},"PyCTBN.tests.utility.test_cache":{TestCache:[10,1,1,""]},"PyCTBN.tests.utility.test_cache.TestCache":{test_clear:[10,2,1,""],test_find:[10,2,1,""],test_init:[10,2,1,""],test_put:[10,2,1,""]},"PyCTBN.tests.utility.test_json_importer":{TestJsonImporter:[10,1,1,""]},"PyCTBN.tests.utility.test_json_importer.TestJsonImporter":{ordered:[10,2,1,""],setUpClass:[10,2,1,""],test_build_sorter:[10,2,1,""],test_clear_concatenated_frame:[10,2,1,""],test_clear_data_frame_list:[10,2,1,""],test_compute_row_delta_in_all_frames:[10,2,1,""],test_compute_row_delta_in_all_frames_not_init_sorter:[10,2,1,""],test_compute_row_delta_single_samples_frame:[10,2,1,""],test_dataset_id:[10,2,1,""],test_file_path:[10,2,1,""],test_import_data:[10,2,1,""],test_import_sampled_cims:[10,2,1,""],test_import_structure:[10,2,1,""],test_import_variables:[10,2,1,""],test_init:[10,2,1,""],test_normalize_trajectories:[10,2,1,""],test_normalize_trajectories_wrong_indx:[10,2,1,""],test_normalize_trajectories_wrong_key:[10,2,1,""],test_read_json_file_found:[10,2,1,""],test_read_json_file_not_found:[10,2,1,""]},"PyCTBN.tests.utility.test_sample_importer":{TestSampleImporter:[10,1,1,""]},"PyCTBN.tests.utility.test_sample_importer.TestSampleImporter":{ordered:[10,2,1,""],setUpClass:[10,2,1,""],test_init:[10,2,1,""],test_order:[10,2,1,""]},PyCTBN:{PyCTBN:[1,0,0,"-"],tests:[6,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":[2,3,4,5,12],"boolean":[2,4],"case":[7,8,9,10],"class":[2,3,4,5,7,8,9,10,12],"default":[2,3,5],"float":2,"function":2,"import":[4,5,13,14],"int":[2,3,4,5],"null":2,"return":[2,3,4,5,9,12],"static":[2,4],"super":12,"true":[2,12],"var":12,HAS:5,Has:[2,4],NOT:2,The:[2,4,5,12],Use:[2,12],__actual_cach:5,__init__:12,__list_of_sets_of_par:5,_actual_cim:4,_actual_trajectori:4,_aggregated_info_about_nodes_par:4,_array_indx:5,_cach:2,_cim:4,_complete_graph:2,_df_samples_list:[5,12],_df_structur:5,_df_variabl:[5,12],_file_path:12,_graph:[4,12],_import:4,_net_graph:2,_node:2,_node_id:4,_nodes_indx:2,_nodes_v:2,_p_combs_structur:4,_raw_data:5,_sample_path:2,_single_set_of_cim:2,_sorter:[5,12],_state_residence_tim:4,_structur:4,_structure_label:5,_time:4,_time_filt:4,_time_scalar_indexing_structur:4,_total_variables_count:4,_total_variables_numb:4,_trajectori:4,_transition_filt:4,_transition_matric:4,_transition_scalar_indexing_structur:4,_variables_label:5,abc:[3,5],about:[3,4],abstract_import:[0,1,4,13,14],abstractimport:[4,5,12],act:5,actual:[2,4],actual_cim:[4,12],add:[4,5],add_edg:4,add_nod:4,added:2,addit:2,adjac:[2,12],adjacency_matrix:[2,12],after:5,against:2,aggreg:4,algorithm:[2,3,12],all:[2,3,4,5,9,12],alpha_xu:2,alpha_xxu:2,alreadi:[5,12],also:[2,4],ani:[2,3],anoth:4,another_filtering_method:9,approach:2,arc:5,arrai:[2,4,5,12],assign:2,assum:2,automat:2,aux_build_p_combs_structur:9,aux_build_time_columns_filtering_structure_for_a_nod:9,aux_build_time_scalar_indexing_structure_for_a_nod:9,aux_build_transition_columns_filtering_structur:9,aux_build_transition_scalar_indexing_structure_for_a_nod:9,aux_import_sampled_cim:7,aux_test_build_cim:9,aux_test_init:9,axi:12,base:[2,3,4,5,7,8,9,10],bayesian:2,befor:[2,3,7,8,9,10],belong:2,best:2,between:5,bool:[2,4],both:[2,5],bound:4,build:[2,4,5,9,12],build_cim:4,build_complete_graph:2,build_list_of_samples_arrai:5,build_p_comb_structure_for_a_nod:[4,9],build_removable_edges_matrix:2,build_sort:[5,12],build_structur:[4,12],build_time_columns_filtering_for_a_nod:4,build_time_scalar_indexing_structure_for_a_nod:4,build_times_and_transitions_structur:4,build_trajectori:[4,12],build_transition_filtering_for_a_nod:4,build_transition_scalar_indexing_structure_for_a_nod:4,built:2,cach:[0,1,2,13,14],calcul:2,call:[5,12],cardin:[2,4,5,9],cardinalit:[4,5],caridin:4,caridinalit:4,chang:[4,5],check:4,chi:2,chi_test:2,chi_test_alfa:2,child:[2,3],child_indx:2,child_states_numb:2,child_val:2,cim1:[2,7],cim2:[2,7],cim:[2,4,5,12],cim_equality_test:7,cims_kei:5,cims_label:7,classmethod:[7,8,9,10],clean_structure_edg:4,clear:[4,5],clear_concatenated_fram:5,clear_data_frame_list:5,clear_indexing_filtering_structur:4,clear_memori:4,climb:[2,3],coeffici:4,col:4,cols_filt:2,column:[2,4,5,12],columns_head:5,comb:4,combin:[4,5,9],combinatori:[4,9],common:2,complet:[2,4,5],complete_test:2,complete_trajectori:4,comput:[2,3,4,5,12],compute_cim_coeffici:4,compute_parameters_for_nod:[2,12],compute_row_delta_in_all_samples_fram:[5,12],compute_row_delta_sigle_samples_fram:5,compute_state_res_time_for_nod:2,compute_state_transitions_for_a_nod:2,compute_thumb_valu:2,concatanated_sampl:5,concaten:[4,5],concatenated_sampl:5,condit:4,conditional_intensity_matrix:[0,1,2,13,14],conditionalintensitymatrix:[2,4],consid:[2,4],constraint:2,constraint_based_optim:[0,1,13,14],constraintbasedoptim:3,construct:[4,5,12],conta:5,contain:[2,4,5,9],contains_edg:4,content:[13,14],convert:[2,5],copi:5,core:5,correct:[4,5],could:2,count:4,creat:[2,4,12],csv:12,csvimport:12,ctbn:2,ctpc:[2,3,12],ctpc_algorithm:[2,12],current:[2,3,5],cut:5,dafram:5,data:[2,3,4,5,13,14],datafram:[4,5,12],dataset:[3,4,5],dataset_id:[5,12],datfram:5,def:12,defin:5,definit:5,defualt:2,delta:[2,4,5],demonstr:12,describ:5,desir:[2,4],df_samples_list:5,dict:[5,12],dictionari:5,differ:5,differt:2,digraph:2,dimens:4,dir:12,direct:[2,4],directli:5,disabl:[2,3],disable_multiprocess:2,distribuit:2,doc:5,doubl:4,download:12,drop:12,duplic:4,dyn:12,each:[2,3,5],edg:[2,4,5,12],edges_list:4,end:5,entir:2,equal:4,equality_of_cims_of_nod:7,est:12,estim:[0,1,3,4,6,13,14],estimate_par:2,estimate_structur:2,estimated_cim:7,everi:[4,5],exam:12,exampl:[5,13,14],exclud:2,exctract:5,exist:5,exp_test_alfa:2,exponenti:2,expos:5,extend:12,extens:[2,5],extract:[4,5],fals:2,fam_score_calcul:[0,1,13,14],famscor:2,famscorecalcul:2,fast_init:[2,4,12],file:[2,5,12],file_path:[2,5,12],filepath:5,fill:[2,12],filter:[2,4],filter_cims_with_mask:4,find:[2,5],first:[2,12],fixtur:[7,8,9,10],follow:[4,5],form:4,format:12,formula:2,found:5,frame:5,from:[4,5,12],from_nod:5,gener:2,generate_possible_sub_sets_of_s:2,get:[2,5],get_cims_numb:4,get_fam_scor:2,get_node_id:4,get_node_indx:4,get_ordered_by_indx_set_of_par:4,get_parents_by_id:4,get_positional_node_indx:4,get_score_from_graph:2,get_states_numb:4,given:[2,4,5],glob:12,graph:[2,4,9,12],graph_struct:4,graphic:2,grid:[4,9],grpah:12,has:[5,12],has_edg:4,has_prior_net_structur:4,have:5,header:5,header_column:5,hill:[2,3],hill_climbing_search:[0,1,13,14],hillclimb:3,hold:[2,4],hook:[7,8,9,10],how:5,hyperparamet:2,hypothesi:2,identifi:[2,4,5],iff:2,implement:[3,5,13,14],import_data:[5,12],import_sampled_cim:5,import_structur:5,import_trajectori:5,import_vari:[5,12],improv:[2,3],includ:2,independ:2,independence_test:2,index:[2,4,5,12,13],indic:[2,4],indx:5,info:[4,12],inform:[3,4],init:12,initi:[2,4,5,12],inplac:12,insid:12,instal:[13,14],interest:4,interfac:3,intes:4,iter:[2,3],iterations_numb:[2,3],its:[2,3],join:12,json:[2,5,12],json_import:[0,1,13,14],jsonarrai:5,jsonimport:[5,12],keep:[2,3,5],kei:5,kind:2,knowledg:2,known:2,known_edg:2,label:[2,3,4,5],latest:12,lenght:[2,3],level:[2,5],likelihood:2,list:[2,3,4,5,12],list_of_column:4,list_of_edg:4,list_of_nod:4,load:5,loop:2,m_xu_suff_stat:2,m_xxu_suff_stat:2,main:12,margin:2,marginal_likelihood_q:2,marginal_likelihood_theta:2,mask:[4,9],mask_arr:4,matric:[2,4],matrix:[2,4,5,9,12],max_par:[2,3],maximum:[2,3],member:[4,5],mention:4,merg:5,method:[2,5,7,8,9,10],methodnam:[7,8,9,10],model:2,modul:[13,14],multipl:5,multiprocess:2,name:[2,4,5,12],ndarrai:[2,4,5],necessari:[2,4,5],nest:5,net:[2,3,4,5,12],net_graph:2,network:[2,4,5],network_graph:[0,1,2,13,14],networkgraph:[2,4,12],networkx:2,node:[2,3,4,5,9,12],node_id:[2,3,4,9],node_index:4,node_indx:[2,4],node_st:[4,9],node_states_numb:[4,9],nodes_index:4,nodes_indexes_arr:4,nodes_label:4,nodes_labels_list:4,nodes_numb:4,nodes_vals_arr:4,nodes_valu:[4,12],none:[2,3,4,5,7,9,10,12],normal:5,normalize_trajectori:5,number:[2,3,4],numpi:[2,4,5,9],obj:[10,12],object:[2,3,4,5,12],one:[4,5],one_iteration_of_ctpc_algorithm:2,one_level_norm:5,onli:5,oper:2,optim:[0,1,2,6,13,14],optimize_structur:3,option:[2,3],order:[2,5,10],origin:5,original_cols_numb:4,otherwis:[2,5],out:5,outer:[5,12],over:2,own:[13,14],p_comb:[4,9],p_indx:[4,9],p_val:9,p_valu:9,packag:[13,14],page:13,panda:[5,12],param:4,paramet:[2,3,4,5,9,13,14],parameters_estim:[0,1,13,14],parametersestim:[2,12],parent:[2,3,4,5],parent_indx:2,parent_label:2,parent_set:2,parent_set_v:2,parent_v:2,parent_valu:9,parents_cardin:4,parents_comb:5,parents_index:4,parents_indx:9,parents_label:[4,9],parents_states_numb:[4,9],parents_v:[4,9],parents_valu:[4,9],part:2,particular:[2,5],pass:12,path:[2,5,12],patienc:[2,3],peest:12,perform:2,pip:12,place:5,plot:2,png:2,posit:[4,5],possibl:[2,4],predict:3,prepar:5,present:[2,5],print:12,prior:[2,12],prior_net_structur:5,process:[2,3,4,5],processes_numb:2,properli:5,properti:[4,5],put:5,pyctbn:12,q_xx:4,rappres:4,raw:5,raw_data:5,read:[5,12],read_csv:12,read_csv_fil:12,read_fil:12,read_json_fil:5,real:[2,4,5,12],refer:[4,5],reject:2,rel:4,relat:5,releas:12,remain:5,remov:[2,4,5],remove_edg:4,remove_nod:4,repres:4,represent:2,res:4,resid:[2,4],result:[2,5,12],rtype:4,rule:[2,3],run:[7,8,9,10],runtest:[7,8,9,10],same:5,sampl:[4,5,12],sample_fram:[5,12],sample_import:[0,1,13,14],sample_path:[0,1,2,13,14],sampled_cim:7,sampleimport:5,samplepath:[2,4,12],samples_label:5,save:[2,12],save_plot_estimated_structure_graph:2,save_result:[2,12],scalar_index:2,scalar_indexes_struct:2,score:2,se1:12,search:[2,3,13],second:2,see:5,select:12,self:[2,5,12],sep:2,sep_set:2,set:[2,4,5,7,8,9,10],set_of_cim:[0,1,2,5,13,14],setofcim:[2,4,5,12],setupclass:[7,8,9,10],shift:[4,5],shifted_cols_head:5,show:2,signific:2,simbol:5,simpl:12,simpli:12,sinc:4,single_cim_xu_marginal_likelihood_q:2,single_cim_xu_marginal_likelihood_theta:2,single_internal_cim_xxu_marginal_likelihood_theta:2,size:[2,4],socim:5,sofc1:12,sorter:5,specif:[2,4,12],spuriou:2,spurious_edg:2,start:5,state:[2,4],state_res_tim:4,state_residence_tim:4,state_transition_matrix:4,statist:2,stop:[2,3],str:[2,3,4,5,12],string:[2,3,4,5],structur:[0,1,2,3,5,9,13,14],structure_constraint_based_estim:[0,1,13,14],structure_estim:[0,1,3,13,14],structure_estimation_exampl:12,structure_graph:[0,1,2,5,6,13,14],structure_label:5,structure_score_based_estim:[0,1,13,14],structureconstraintbasedestim:2,structureestim:[2,3,12],structurescorebasedestim:2,structut:4,style:2,submodul:[1,6,13,14],subpackag:[13,14],subset:2,suffici:2,suffuci:2,symbol:[4,5],synthet:5,t_xu_suff_stat:2,tabu:[2,3],tabu_length:[2,3],tabu_rules_dur:[2,3],tabu_search:[0,1,13,14],tabusearch:3,take:12,tar:12,task:[2,4],tau_xu:2,ternari:12,test:2,test_add_edg:9,test_add_nod:9,test_adjacency_matrix:7,test_buid_samplepath_no_concatenated_sampl:9,test_buid_samplepath_no_vari:9,test_build_cim:9,test_build_complete_graph:7,test_build_p_combs_structur:9,test_build_removable_edges_matrix:7,test_build_saplepath_no_prior_net_structur:9,test_build_sort:10,test_build_structur:9,test_build_structure_bad_sort:9,test_build_time_columns_filtering_structure_for_a_nod:9,test_build_time_scalar_indexing_structure_for_a_nod:9,test_build_trajectori:9,test_build_transition_columns_filtering_structur:9,test_build_transition_scalar_indexing_structure_for_a_nod:9,test_cach:6,test_child:2,test_cim:6,test_clear:10,test_clear_concatenated_fram:10,test_clear_data_frame_list:10,test_compute_cim_coeffici:9,test_compute_parameters_for_nod:7,test_compute_row_delta_in_all_fram:10,test_compute_row_delta_in_all_frames_not_init_sort:10,test_compute_row_delta_single_samples_fram:10,test_dataset_id:10,test_edges_oper:9,test_equ:9,test_fast_init:[7,9],test_file_path:10,test_filter_cims_with_mask:9,test_find:10,test_generate_possible_sub_sets_of_s:7,test_get_node_id:9,test_get_node_indx:9,test_get_ordered_by_indx_set_of_par:9,test_get_parents_by_id:9,test_get_positional_node_indx:9,test_get_states_numb:9,test_hill_climbing_search:6,test_import_data:10,test_import_sampled_cim:10,test_import_structur:10,test_import_vari:10,test_init:[7,9,10],test_init_not_filled_dataframs:9,test_init_not_initialized_import:9,test_json_import:6,test_networkgraph:6,test_normalize_trajectori:10,test_normalize_trajectories_wrong_indx:10,test_normalize_trajectories_wrong_kei:10,test_ord:10,test_par:2,test_parameters_estim:6,test_put:10,test_read_json_file_found:10,test_read_json_file_not_found:10,test_repr:9,test_sample_import:6,test_sample_path:6,test_save_plot_estimated_graph:7,test_save_result:7,test_setofcim:6,test_structur:[6,8],test_structure_1:7,test_structure_2:7,test_structure_3:[7,8],test_structure_constraint_based_estim:6,test_structure_estim:6,test_structure_monoprocesso:7,test_structure_score_based_estim:6,test_tabu_search:6,test_tim:7,test_trajectori:6,testcach:10,testcas:[7,8,9,10],testconditionalintensitymatrix:9,testhillclimbingsearch:8,testjsonimport:10,testnetworkgraph:9,testparametersestimatior:7,testsampleimport:10,testsamplepath:9,testsetofcim:9,teststructur:9,teststructureconstraintbasedestim:7,teststructureestim:7,teststructurescorebasedestim:7,testtabusearch:8,testtrajectori:9,tha:5,theta:2,thi:[2,4,5,12],three:12,threshold:2,thumb:2,thumb_threshold:2,thumb_valu:2,time:[2,4,5,12],time_filt:4,time_kei:5,time_scalar_indexing_strucur:4,timestamp:5,to_nod:5,tot_vars_count:[2,3],total:[2,4],total_variables_count:4,total_variables_numb:4,traj:5,trajecory_head:5,trajectori:[0,1,2,5,12,13,14],trajectories_kei:5,trajectory_list:5,trajectri:12,transit:[2,4,5],transition_filt:4,transition_matric:4,transition_scalar_indexing_structur:4,tri:5,tupl:4,tutori:5,two:2,type:[2,3,4,5,12],union:5,uniqu:5,unittest:[7,8,9,10],unus:4,usag:[13,14],use:[2,12],used:[2,3,4,5],using:[2,3,4,5],util:[0,1,4,6,13,14],valid:2,valu:[2,3,4,5,9,12],values_list:12,var_id:2,variabl:[2,3,4,5,12],variable_cardin:5,variable_cim_xu_marginal_likelihood_q:2,variable_cim_xu_marginal_likelihood_theta:2,variable_label:5,variables_kei:5,variables_label:5,vector:[2,4],want:12,when:2,where:5,which:[2,3,4,5],whl:12,who:2,without:[2,3],you:[2,5,12],your:[13,14]},titles:["PyCTBN package","PyCTBN.PyCTBN package","PyCTBN.PyCTBN.estimators package","PyCTBN.PyCTBN.optimizers package","PyCTBN.PyCTBN.structure_graph package","PyCTBN.PyCTBN.utility package","PyCTBN.tests package","PyCTBN.tests.estimators package","PyCTBN.tests.optimizers package","PyCTBN.tests.structure_graph package","PyCTBN.tests.utility package","basic_main module","Examples","Welcome to PyCTBN\u2019s documentation!","PyCTBN","setup module"],titleterms:{"import":12,abstract_import:5,basic_main:11,cach:5,conditional_intensity_matrix:4,constraint_based_optim:3,content:[0,1,2,3,4,5,6,7,8,9,10],data:12,document:13,estim:[2,7,12],exampl:12,fam_score_calcul:2,hill_climbing_search:3,implement:12,indic:13,instal:12,json_import:5,modul:[0,1,2,3,4,5,6,7,8,9,10,11,15],network_graph:4,optim:[3,8],own:12,packag:[0,1,2,3,4,5,6,7,8,9,10],paramet:12,parameters_estim:2,pyctbn:[0,1,2,3,4,5,6,7,8,9,10,13,14],sample_import:5,sample_path:4,set_of_cim:4,setup:15,structur:[4,12],structure_constraint_based_estim:2,structure_estim:2,structure_graph:[4,9],structure_score_based_estim:2,submodul:[0,2,3,4,5,7,8,9,10],subpackag:[0,1,6],tabl:13,tabu_search:3,test:[6,7,8,9,10],test_cach:10,test_cim:9,test_hill_climbing_search:8,test_json_import:10,test_networkgraph:9,test_parameters_estim:7,test_sample_import:10,test_sample_path:9,test_setofcim:9,test_structur:9,test_structure_constraint_based_estim:7,test_structure_estim:7,test_structure_score_based_estim:7,test_tabu_search:8,test_trajectori:9,trajectori:4,usag:12,util:[5,10],welcom:13,your:12}}) +Search.setIndex({docnames:["PyCTBN","PyCTBN.PyCTBN","PyCTBN.PyCTBN.estimators","PyCTBN.PyCTBN.optimizers","PyCTBN.PyCTBN.structure_graph","PyCTBN.PyCTBN.utility","PyCTBN.tests","PyCTBN.tests.estimators","PyCTBN.tests.optimizers","PyCTBN.tests.structure_graph","PyCTBN.tests.utility","basic_main","example","examples","index","modules","setup"],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","PyCTBN.PyCTBN.rst","PyCTBN.PyCTBN.estimators.rst","PyCTBN.PyCTBN.optimizers.rst","PyCTBN.PyCTBN.structure_graph.rst","PyCTBN.PyCTBN.utility.rst","PyCTBN.tests.rst","PyCTBN.tests.estimators.rst","PyCTBN.tests.optimizers.rst","PyCTBN.tests.structure_graph.rst","PyCTBN.tests.utility.rst","basic_main.rst","example.rst","examples.rst","index.rst","modules.rst","setup.rst"],objects:{"":{PyCTBN:[0,0,0,"-"]},"PyCTBN.PyCTBN":{estimators:[2,0,0,"-"],optimizers:[3,0,0,"-"],structure_graph:[4,0,0,"-"],utility:[5,0,0,"-"]},"PyCTBN.PyCTBN.estimators":{fam_score_calculator:[2,0,0,"-"],parameters_estimator:[2,0,0,"-"],structure_constraint_based_estimator:[2,0,0,"-"],structure_estimator:[2,0,0,"-"],structure_score_based_estimator:[2,0,0,"-"]},"PyCTBN.PyCTBN.estimators.fam_score_calculator":{FamScoreCalculator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator":{get_fam_score:[2,2,1,""],marginal_likelihood_q:[2,2,1,""],marginal_likelihood_theta:[2,2,1,""],single_cim_xu_marginal_likelihood_q:[2,2,1,""],single_cim_xu_marginal_likelihood_theta:[2,2,1,""],single_internal_cim_xxu_marginal_likelihood_theta:[2,2,1,""],variable_cim_xu_marginal_likelihood_q:[2,2,1,""],variable_cim_xu_marginal_likelihood_theta:[2,2,1,""]},"PyCTBN.PyCTBN.estimators.parameters_estimator":{ParametersEstimator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator":{compute_parameters_for_node:[2,2,1,""],compute_state_res_time_for_node:[2,2,1,""],compute_state_transitions_for_a_node:[2,2,1,""],fast_init:[2,2,1,""]},"PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator":{StructureConstraintBasedEstimator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator":{complete_test:[2,2,1,""],compute_thumb_value:[2,2,1,""],ctpc_algorithm:[2,2,1,""],estimate_structure:[2,2,1,""],independence_test:[2,2,1,""],one_iteration_of_CTPC_algorithm:[2,2,1,""]},"PyCTBN.PyCTBN.estimators.structure_estimator":{StructureEstimator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator":{adjacency_matrix:[2,2,1,""],build_complete_graph:[2,2,1,""],build_removable_edges_matrix:[2,2,1,""],estimate_structure:[2,2,1,""],generate_possible_sub_sets_of_size:[2,2,1,""],save_plot_estimated_structure_graph:[2,2,1,""],save_results:[2,2,1,""],spurious_edges:[2,2,1,""]},"PyCTBN.PyCTBN.estimators.structure_score_based_estimator":{StructureScoreBasedEstimator:[2,1,1,""]},"PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator":{estimate_parents:[2,2,1,""],estimate_structure:[2,2,1,""],get_score_from_graph:[2,2,1,""]},"PyCTBN.PyCTBN.optimizers":{constraint_based_optimizer:[3,0,0,"-"],hill_climbing_search:[3,0,0,"-"],optimizer:[3,0,0,"-"],tabu_search:[3,0,0,"-"]},"PyCTBN.PyCTBN.optimizers.constraint_based_optimizer":{ConstraintBasedOptimizer:[3,1,1,""]},"PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer":{optimize_structure:[3,2,1,""]},"PyCTBN.PyCTBN.optimizers.hill_climbing_search":{HillClimbing:[3,1,1,""]},"PyCTBN.PyCTBN.optimizers.hill_climbing_search.HillClimbing":{optimize_structure:[3,2,1,""]},"PyCTBN.PyCTBN.optimizers.optimizer":{Optimizer:[3,1,1,""]},"PyCTBN.PyCTBN.optimizers.optimizer.Optimizer":{optimize_structure:[3,2,1,""]},"PyCTBN.PyCTBN.optimizers.tabu_search":{TabuSearch:[3,1,1,""]},"PyCTBN.PyCTBN.optimizers.tabu_search.TabuSearch":{optimize_structure:[3,2,1,""]},"PyCTBN.PyCTBN.structure_graph":{conditional_intensity_matrix:[4,0,0,"-"],network_generator:[4,0,0,"-"],network_graph:[4,0,0,"-"],sample_path:[4,0,0,"-"],set_of_cims:[4,0,0,"-"],structure:[4,0,0,"-"],trajectory:[4,0,0,"-"],trajectory_generator:[4,0,0,"-"]},"PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix":{ConditionalIntensityMatrix:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix":{cim:[4,2,1,""],compute_cim_coefficients:[4,2,1,""],state_residence_times:[4,2,1,""],state_transition_matrix:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.network_generator":{NetworkGenerator:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.network_generator.NetworkGenerator":{cims:[4,2,1,""],dyn_str:[4,2,1,""],generate_cims:[4,2,1,""],generate_graph:[4,2,1,""],graph:[4,2,1,""],variables:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.network_graph":{NetworkGraph:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph":{add_edges:[4,2,1,""],add_nodes:[4,2,1,""],build_p_comb_structure_for_a_node:[4,2,1,""],build_time_columns_filtering_for_a_node:[4,2,1,""],build_time_scalar_indexing_structure_for_a_node:[4,2,1,""],build_transition_filtering_for_a_node:[4,2,1,""],build_transition_scalar_indexing_structure_for_a_node:[4,2,1,""],clear_indexing_filtering_structures:[4,2,1,""],edges:[4,2,1,""],fast_init:[4,2,1,""],get_node_indx:[4,2,1,""],get_ordered_by_indx_set_of_parents:[4,2,1,""],get_parents_by_id:[4,2,1,""],get_positional_node_indx:[4,2,1,""],get_states_number:[4,2,1,""],has_edge:[4,2,1,""],nodes:[4,2,1,""],nodes_indexes:[4,2,1,""],nodes_values:[4,2,1,""],p_combs:[4,2,1,""],remove_edges:[4,2,1,""],remove_node:[4,2,1,""],time_filtering:[4,2,1,""],time_scalar_indexing_strucure:[4,2,1,""],transition_filtering:[4,2,1,""],transition_scalar_indexing_structure:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.sample_path":{SamplePath:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath":{build_structure:[4,2,1,""],build_trajectories:[4,2,1,""],clear_memory:[4,2,1,""],has_prior_net_structure:[4,2,1,""],structure:[4,2,1,""],total_variables_count:[4,2,1,""],trajectories:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.set_of_cims":{SetOfCims:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims":{actual_cims:[4,2,1,""],build_cims:[4,2,1,""],build_times_and_transitions_structures:[4,2,1,""],filter_cims_with_mask:[4,2,1,""],get_cims_number:[4,2,1,""],p_combs:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.structure":{Structure:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.structure.Structure":{add_edge:[4,2,1,""],clean_structure_edges:[4,2,1,""],contains_edge:[4,2,1,""],edges:[4,2,1,""],get_node_id:[4,2,1,""],get_node_indx:[4,2,1,""],get_positional_node_indx:[4,2,1,""],get_states_number:[4,2,1,""],nodes_indexes:[4,2,1,""],nodes_labels:[4,2,1,""],nodes_values:[4,2,1,""],remove_edge:[4,2,1,""],remove_node:[4,2,1,""],total_variables_number:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.trajectory":{Trajectory:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory":{complete_trajectory:[4,2,1,""],size:[4,2,1,""],times:[4,2,1,""],trajectory:[4,2,1,""]},"PyCTBN.PyCTBN.structure_graph.trajectory_generator":{TrajectoryGenerator:[4,1,1,""]},"PyCTBN.PyCTBN.structure_graph.trajectory_generator.TrajectoryGenerator":{CTBN_Sample:[4,2,1,""],multi_trajectory:[4,2,1,""],worker:[4,2,1,""]},"PyCTBN.PyCTBN.utility":{abstract_exporter:[5,0,0,"-"],abstract_importer:[5,0,0,"-"],cache:[5,0,0,"-"],json_exporter:[5,0,0,"-"],json_importer:[5,0,0,"-"],sample_importer:[5,0,0,"-"]},"PyCTBN.PyCTBN.utility.abstract_exporter":{AbstractExporter:[5,1,1,""]},"PyCTBN.PyCTBN.utility.abstract_exporter.AbstractExporter":{add_trajectory:[5,2,1,""],out_file:[5,2,1,""]},"PyCTBN.PyCTBN.utility.abstract_importer":{AbstractImporter:[5,1,1,""]},"PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter":{build_list_of_samples_array:[5,2,1,""],build_sorter:[5,2,1,""],clear_concatenated_frame:[5,2,1,""],compute_row_delta_in_all_samples_frames:[5,2,1,""],compute_row_delta_sigle_samples_frame:[5,2,1,""],concatenated_samples:[5,2,1,""],dataset_id:[5,2,1,""],file_path:[5,2,1,""],sorter:[5,2,1,""],structure:[5,2,1,""],variables:[5,2,1,""]},"PyCTBN.PyCTBN.utility.cache":{Cache:[5,1,1,""]},"PyCTBN.PyCTBN.utility.cache.Cache":{clear:[5,2,1,""],find:[5,2,1,""],put:[5,2,1,""]},"PyCTBN.PyCTBN.utility.json_exporter":{JsonExporter:[5,1,1,""]},"PyCTBN.PyCTBN.utility.json_exporter.JsonExporter":{cims_to_json:[5,2,1,""],out_file:[5,2,1,""]},"PyCTBN.PyCTBN.utility.json_importer":{JsonImporter:[5,1,1,""]},"PyCTBN.PyCTBN.utility.json_importer.JsonImporter":{build_sorter:[5,2,1,""],clear_data_frame_list:[5,2,1,""],dataset_id:[5,2,1,""],import_data:[5,2,1,""],import_sampled_cims:[5,2,1,""],import_structure:[5,2,1,""],import_trajectories:[5,2,1,""],import_variables:[5,2,1,""],normalize_trajectories:[5,2,1,""],one_level_normalizing:[5,2,1,""],read_json_file:[5,2,1,""]},"PyCTBN.PyCTBN.utility.sample_importer":{SampleImporter:[5,1,1,""]},"PyCTBN.PyCTBN.utility.sample_importer.SampleImporter":{build_sorter:[5,2,1,""],dataset_id:[5,2,1,""],import_data:[5,2,1,""]},"PyCTBN.tests":{estimators:[7,0,0,"-"],optimizers:[8,0,0,"-"],structure_graph:[9,0,0,"-"],utility:[10,0,0,"-"]},"PyCTBN.tests.estimators":{test_parameters_estimator:[7,0,0,"-"],test_structure_constraint_based_estimator:[7,0,0,"-"],test_structure_estimator:[7,0,0,"-"],test_structure_score_based_estimator:[7,0,0,"-"]},"PyCTBN.tests.estimators.test_parameters_estimator":{TestParametersEstimatior:[7,1,1,""]},"PyCTBN.tests.estimators.test_parameters_estimator.TestParametersEstimatior":{aux_import_sampled_cims:[7,2,1,""],cim_equality_test:[7,2,1,""],equality_of_cims_of_node:[7,2,1,""],setUpClass:[7,2,1,""],test_compute_parameters_for_node:[7,2,1,""],test_fast_init:[7,2,1,""]},"PyCTBN.tests.estimators.test_structure_constraint_based_estimator":{TestStructureConstraintBasedEstimator:[7,1,1,""]},"PyCTBN.tests.estimators.test_structure_constraint_based_estimator.TestStructureConstraintBasedEstimator":{setUpClass:[7,2,1,""],test_structure_1:[7,2,1,""],test_structure_2:[7,2,1,""],test_structure_3:[7,2,1,""]},"PyCTBN.tests.estimators.test_structure_estimator":{TestStructureEstimator:[7,1,1,""]},"PyCTBN.tests.estimators.test_structure_estimator.TestStructureEstimator":{setUpClass:[7,2,1,""],test_adjacency_matrix:[7,2,1,""],test_build_complete_graph:[7,2,1,""],test_build_removable_edges_matrix:[7,2,1,""],test_generate_possible_sub_sets_of_size:[7,2,1,""],test_init:[7,2,1,""],test_save_plot_estimated_graph:[7,2,1,""],test_save_results:[7,2,1,""],test_time:[7,2,1,""]},"PyCTBN.tests.estimators.test_structure_score_based_estimator":{TestStructureScoreBasedEstimator:[7,1,1,""]},"PyCTBN.tests.estimators.test_structure_score_based_estimator.TestStructureScoreBasedEstimator":{setUpClass:[7,2,1,""],test_structure_1:[7,2,1,""],test_structure_2:[7,2,1,""],test_structure_3:[7,2,1,""],test_structure_monoprocesso:[7,2,1,""]},"PyCTBN.tests.optimizers":{test_hill_climbing_search:[8,0,0,"-"],test_tabu_search:[8,0,0,"-"]},"PyCTBN.tests.optimizers.test_hill_climbing_search":{TestHillClimbingSearch:[8,1,1,""]},"PyCTBN.tests.optimizers.test_hill_climbing_search.TestHillClimbingSearch":{setUpClass:[8,2,1,""],test_structure:[8,2,1,""],test_structure_3:[8,2,1,""]},"PyCTBN.tests.optimizers.test_tabu_search":{TestTabuSearch:[8,1,1,""]},"PyCTBN.tests.optimizers.test_tabu_search.TestTabuSearch":{setUpClass:[8,2,1,""],test_structure:[8,2,1,""],test_structure_3:[8,2,1,""]},"PyCTBN.tests.structure_graph":{test_cim:[9,0,0,"-"],test_networkgenerator:[9,0,0,"-"],test_networkgraph:[9,0,0,"-"],test_sample_path:[9,0,0,"-"],test_setofcims:[9,0,0,"-"],test_structure:[9,0,0,"-"],test_trajectory:[9,0,0,"-"],test_trajectorygenerator:[9,0,0,"-"]},"PyCTBN.tests.structure_graph.test_cim":{TestConditionalIntensityMatrix:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_cim.TestConditionalIntensityMatrix":{setUpClass:[9,2,1,""],test_compute_cim_coefficients:[9,2,1,""],test_init:[9,2,1,""],test_repr:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_networkgenerator":{TestNetworkGenerator:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_networkgenerator.TestNetworkGenerator":{test_generate_cims:[9,2,1,""],test_generate_graph:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_networkgraph":{TestNetworkGraph:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_networkgraph.TestNetworkGraph":{aux_build_p_combs_structure:[9,2,1,""],aux_build_time_columns_filtering_structure_for_a_node:[9,2,1,""],aux_build_time_scalar_indexing_structure_for_a_node:[9,2,1,""],aux_build_transition_columns_filtering_structure:[9,2,1,""],aux_build_transition_scalar_indexing_structure_for_a_node:[9,2,1,""],setUpClass:[9,2,1,""],test_add_edges:[9,2,1,""],test_add_nodes:[9,2,1,""],test_build_p_combs_structure:[9,2,1,""],test_build_time_columns_filtering_structure_for_a_node:[9,2,1,""],test_build_time_scalar_indexing_structure_for_a_node:[9,2,1,""],test_build_transition_columns_filtering_structure:[9,2,1,""],test_build_transition_scalar_indexing_structure_for_a_node:[9,2,1,""],test_fast_init:[9,2,1,""],test_get_node_indx:[9,2,1,""],test_get_ordered_by_indx_set_of_parents:[9,2,1,""],test_get_parents_by_id:[9,2,1,""],test_get_states_number:[9,2,1,""],test_init:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_sample_path":{TestSamplePath:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_sample_path.TestSamplePath":{setUpClass:[9,2,1,""],test_buid_samplepath_no_concatenated_samples:[9,2,1,""],test_buid_samplepath_no_variables:[9,2,1,""],test_build_saplepath_no_prior_net_structure:[9,2,1,""],test_build_structure:[9,2,1,""],test_build_structure_bad_sorter:[9,2,1,""],test_build_trajectories:[9,2,1,""],test_init:[9,2,1,""],test_init_not_filled_dataframse:[9,2,1,""],test_init_not_initialized_importer:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_setofcims":{TestSetOfCims:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_setofcims.TestSetOfCims":{another_filtering_method:[9,2,1,""],aux_test_build_cims:[9,2,1,""],aux_test_init:[9,2,1,""],build_p_comb_structure_for_a_node:[9,2,1,""],setUpClass:[9,2,1,""],test_build_cims:[9,2,1,""],test_filter_cims_with_mask:[9,2,1,""],test_init:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_structure":{TestStructure:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_structure.TestStructure":{setUpClass:[9,2,1,""],test_edges_operations:[9,2,1,""],test_equality:[9,2,1,""],test_get_node_id:[9,2,1,""],test_get_node_indx:[9,2,1,""],test_get_positional_node_indx:[9,2,1,""],test_get_states_number:[9,2,1,""],test_init:[9,2,1,""],test_repr:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_trajectory":{TestTrajectory:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_trajectory.TestTrajectory":{setUpClass:[9,2,1,""],test_init:[9,2,1,""]},"PyCTBN.tests.structure_graph.test_trajectorygenerator":{TestTrajectoryGenerator:[9,1,1,""]},"PyCTBN.tests.structure_graph.test_trajectorygenerator.TestTrajectoryGenerator":{setUpClass:[9,2,1,""],test_generated_trajectory:[9,2,1,""],test_generated_trajectory_max_tr:[9,2,1,""],test_init:[9,2,1,""],test_multi_trajectory:[9,2,1,""]},"PyCTBN.tests.utility":{test_cache:[10,0,0,"-"],test_json_importer:[10,0,0,"-"],test_sample_importer:[10,0,0,"-"]},"PyCTBN.tests.utility.test_cache":{TestCache:[10,1,1,""]},"PyCTBN.tests.utility.test_cache.TestCache":{test_clear:[10,2,1,""],test_find:[10,2,1,""],test_init:[10,2,1,""],test_put:[10,2,1,""]},"PyCTBN.tests.utility.test_json_importer":{TestJsonImporter:[10,1,1,""]},"PyCTBN.tests.utility.test_json_importer.TestJsonImporter":{ordered:[10,2,1,""],setUpClass:[10,2,1,""],test_build_sorter:[10,2,1,""],test_clear_concatenated_frame:[10,2,1,""],test_clear_data_frame_list:[10,2,1,""],test_compute_row_delta_in_all_frames:[10,2,1,""],test_compute_row_delta_in_all_frames_not_init_sorter:[10,2,1,""],test_compute_row_delta_single_samples_frame:[10,2,1,""],test_dataset_id:[10,2,1,""],test_file_path:[10,2,1,""],test_import_data:[10,2,1,""],test_import_sampled_cims:[10,2,1,""],test_import_structure:[10,2,1,""],test_import_variables:[10,2,1,""],test_init:[10,2,1,""],test_normalize_trajectories:[10,2,1,""],test_normalize_trajectories_wrong_indx:[10,2,1,""],test_normalize_trajectories_wrong_key:[10,2,1,""],test_read_json_file_found:[10,2,1,""],test_read_json_file_not_found:[10,2,1,""]},"PyCTBN.tests.utility.test_sample_importer":{TestSampleImporter:[10,1,1,""]},"PyCTBN.tests.utility.test_sample_importer.TestSampleImporter":{ordered:[10,2,1,""],setUpClass:[10,2,1,""],test_init:[10,2,1,""],test_order:[10,2,1,""]},PyCTBN:{PyCTBN:[1,0,0,"-"],tests:[6,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":[2,3,4,5,13],"boolean":[2,4],"case":[4,7,8,9,10],"class":[2,3,4,5,7,8,9,10,13],"default":[2,3,5],"float":[2,4],"function":2,"import":[4,5,14],"int":[2,3,4,5],"new":5,"null":2,"return":[2,3,4,5,9,13],"static":[2,4],"super":13,"true":[2,13],"var":13,For:4,HAS:5,Has:[2,4],NOT:2,The:[2,4,5,13],Use:[2,13],__actual_cach:5,__generate_cim:4,__init__:13,__list_of_sets_of_par:5,_actual_cim:4,_actual_trajectori:4,_aggregated_info_about_nodes_par:4,_array_indx:5,_cach:2,_cim:4,_complete_graph:2,_df_samples_list:[5,13],_df_structur:5,_df_variabl:[5,13],_dyn_cim:5,_dyn_str:5,_file_path:13,_generated_trajectori:4,_graph:[4,13],_import:4,_indx:4,_label:4,_net_graph:2,_node:2,_node_id:4,_nodes_indx:2,_nodes_v:2,_p_combs_structur:4,_parent:4,_raw_data:5,_sample_path:2,_single_set_of_cim:2,_sorter:[5,13],_state_residence_tim:4,_structur:4,_structure_label:5,_time:4,_time_filt:4,_time_scalar_indexing_structur:4,_total_variables_count:4,_total_variables_numb:4,_trajectori:[4,5],_transition_filt:4,_transition_matric:4,_transition_scalar_indexing_structur:4,_val:4,_variabl:5,_variables_label:5,_vname:4,abc:[3,5],about:[3,4],abstract_export:[0,1,14],abstract_import:[0,1,4,14],abstractexport:5,abstractimport:[4,5,13],accord:4,act:5,actual:[2,4],actual_cim:[4,13],add:[4,5],add_edg:4,add_nod:4,add_trajectori:5,added:[2,4,5],adding:4,addit:2,adjac:[2,13],adjacency_matrix:[2,13],after:[4,5],against:2,aggreg:4,algorithm:[2,3,13],all:[2,3,4,5,9,13],allow:4,along:5,alpha_xu:2,alpha_xxu:2,alreadi:[5,13],also:[2,4],ani:[2,3],anoth:4,another_filtering_method:9,approach:2,arc:5,arrai:[2,4,5,13],assign:2,assum:2,automat:2,aux_build_p_combs_structur:9,aux_build_time_columns_filtering_structure_for_a_nod:9,aux_build_time_scalar_indexing_structure_for_a_nod:9,aux_build_transition_columns_filtering_structur:9,aux_build_transition_scalar_indexing_structure_for_a_nod:9,aux_import_sampled_cim:7,aux_test_build_cim:9,aux_test_init:9,axi:13,base:[2,3,4,5,7,8,9,10],basic_main:15,bayesian:2,been:4,befor:[2,3,7,8,9,10],belong:[2,4],best:2,between:[4,5],bool:[2,4],both:[2,5],bound:4,build:[2,4,5,9,13],build_cim:4,build_complete_graph:2,build_list_of_samples_arrai:5,build_p_comb_structure_for_a_nod:[4,9],build_removable_edges_matrix:2,build_sort:[5,13],build_structur:[4,13],build_time_columns_filtering_for_a_nod:4,build_time_scalar_indexing_structure_for_a_nod:4,build_times_and_transitions_structur:4,build_trajectori:[4,13],build_transition_filtering_for_a_nod:4,build_transition_scalar_indexing_structure_for_a_nod:4,built:2,cach:[0,1,2,14],calcul:2,call:[5,13],can:5,cardin:[2,4,5,9],cardinalit:[4,5],care:4,caridin:4,caridinalit:4,chang:[4,5],check:4,chi:2,chi_test:2,chi_test_alfa:2,child:[2,3],child_indx:2,child_states_numb:2,child_val:2,cim1:[2,7],cim2:[2,7],cim:[2,4,5,13],cim_equality_test:7,cims_kei:5,cims_label:[5,7],cims_to_json:5,classmethod:[7,8,9,10],clean_structure_edg:4,clear:[4,5],clear_concatenated_fram:5,clear_data_frame_list:5,clear_indexing_filtering_structur:4,clear_memori:4,climb:[2,3],coeffici:4,col:4,cols_filt:2,column:[2,4,5,13],columns_head:5,comb:4,combin:[4,5,9],combinatori:[4,9],common:2,complet:[2,4,5],complete_test:2,complete_trajectori:4,comput:[2,3,4,5,13],compute_cim_coeffici:4,compute_parameters_for_nod:[2,13],compute_row_delta_in_all_samples_fram:[5,13],compute_row_delta_sigle_samples_fram:5,compute_state_res_time_for_nod:2,compute_state_transitions_for_a_nod:2,compute_thumb_valu:2,concatanated_sampl:5,concaten:[4,5],concatenated_sampl:5,condit:4,conditional_intensity_matrix:[0,1,2,14],conditionalintensitymatrix:[2,4],consid:[2,4],consider:4,constraint:2,constraint_based_optim:[0,1,14],constraintbasedoptim:3,construct:[4,5,13],conta:5,contain:[2,4,5,9],contains_edg:4,content:[14,15],convent:4,convert:[2,5],copi:5,core:[4,5],correct:[4,5],correspond:4,could:2,count:4,creat:[2,4,5,13],csv:13,csvimport:13,ctbn:2,ctbn_sampl:4,ctpc:[2,3,13],ctpc_algorithm:[2,13],current:[2,3,5],cut:5,dafram:5,data:[2,3,4,5,14],datafram:[4,5,13],dataset:[3,4,5],dataset_id:[5,13],datfram:5,def:13,defin:[4,5],definit:5,defualt:2,delta:[2,4,5],demonstr:13,densiti:4,describ:5,desir:[2,4],df_samples_list:5,dict:[4,5,13],dictionari:5,differ:5,differt:2,digraph:2,dimens:4,dir:13,direct:[2,4],directli:5,directori:5,disabl:[2,3],disable_multiprocess:2,distribuit:2,doc:5,doubl:4,download:13,drop:13,duplic:4,dyn:13,dyn_cim:[4,5],dyn_str:[4,5],each:[2,3,4,5],edg:[2,4,5,13],edges_list:4,end:[4,5],entir:2,equal:4,equality_of_cims_of_nod:7,est:13,estim:[0,1,3,4,6,14],estimate_par:2,estimate_structur:2,estimated_cim:7,everi:[4,5],exam:13,exampl:[5,14,15],exclud:2,exctract:5,execut:4,exist:[4,5],exp_test_alfa:2,exponenti:2,expos:5,extend:13,extens:[2,5],extract:[4,5],fals:[2,4],fam_score_calcul:[0,1,14],famscor:2,famscorecalcul:2,fast_init:[2,4,13],file:[2,5,13],file_path:[2,5,13],filenam:5,filepath:5,fill:[2,13],filter:[2,4],filter_cims_with_mask:4,find:[2,5],first:[2,13],fix:4,fixtur:[7,8,9,10],follow:[4,5],form:4,format:[5,13],formula:2,found:5,frame:[4,5],from:[4,5,13],from_nod:5,gener:[2,4,5],generate_cim:4,generate_graph:4,generate_possible_sub_sets_of_s:2,get:[2,5],get_cims_numb:4,get_fam_scor:2,get_node_id:4,get_node_indx:4,get_ordered_by_indx_set_of_par:4,get_parents_by_id:4,get_positional_node_indx:4,get_score_from_graph:2,get_states_numb:4,given:[2,4,5],glob:13,graph:[2,4,9,13],graph_struct:4,graphic:2,grid:[4,9],group:4,grpah:13,has:[4,5,13],has_edg:4,has_prior_net_structur:4,have:5,header:5,header_column:5,hill:[2,3],hill_climbing_search:[0,1,14],hillclimb:3,hold:[2,4],hook:[7,8,9,10],how:5,hyperparamet:2,hypothesi:2,identifi:[2,4,5],iff:2,implement:[3,4,5,14],import_data:[5,13],import_sampled_cim:5,import_structur:5,import_trajectori:5,import_vari:[5,13],improv:[2,3],includ:[2,5],independ:2,independence_test:2,index:[2,4,5,13,14],indic:[2,4],indx:5,info:[4,13],inform:[3,4,5],init:13,initi:[2,4,5,13],inplac:13,insid:13,instal:14,instanti:4,interest:4,interfac:3,intes:4,isn:4,item:4,iter:[2,3],iterations_numb:[2,3],its:[2,3],join:13,json:[2,5,13],json_export:[0,1,14],json_import:[0,1,14],jsonarrai:5,jsonexport:5,jsonimport:[5,13],just:4,keep:[2,3,5],kei:[4,5],kind:2,knowledg:2,known:2,known_edg:2,label:[2,3,4,5],last:4,latest:13,lenght:[2,3],level:[2,5],likelihood:2,list:[2,3,4,5,13],list_of_column:4,list_of_edg:4,list_of_nod:4,load:5,loop:2,m_xu_suff_stat:2,m_xxu_suff_stat:2,made:4,main:13,mandatori:4,margin:2,marginal_likelihood_q:2,marginal_likelihood_theta:2,mask:[4,9],mask_arr:4,matric:[2,4],matrix:[2,4,5,9,13],max_par:[2,3],max_tr:4,max_val:4,maximum:[2,3,4],member:[4,5],mention:4,merg:5,method:[2,4,5,7,8,9,10],methodnam:[7,8,9,10],min_val:4,minimum:4,model:2,modul:[14,15],more:5,multi_trajectori:4,multipl:5,multiprocess:2,must:[4,5],name:[2,4,5,13],ndarrai:[2,4,5],necessari:[2,4,5],nest:5,net:[2,3,4,5,13],net_graph:2,network:[2,4,5],network_gener:[0,1,14],network_graph:[0,1,2,14],networkgener:4,networkgraph:[2,4,13],networkx:2,node:[2,3,4,5,9,13],node_id:[2,3,4,9],node_index:4,node_indx:[2,4],node_st:[4,9],node_states_numb:[4,9],nodes_index:4,nodes_indexes_arr:4,nodes_label:4,nodes_labels_list:4,nodes_numb:4,nodes_vals_arr:4,nodes_valu:[4,13],none:[2,3,4,5,7,9,10,13],normal:5,normalize_trajectori:5,number:[2,3,4],numpi:[2,4,5,9],obj:[10,13],object:[2,3,4,5,13],obvious:4,one:[4,5],one_iteration_of_ctpc_algorithm:2,one_level_norm:5,onli:5,oper:2,optim:[0,1,2,6,14],optimize_structur:3,option:[2,3],order:[2,4,5,10],origin:5,original_cols_numb:4,otherwis:[2,4,5],out:5,out_fil:5,outer:[5,13],output:[4,5],over:2,own:14,p_comb:[4,9],p_indx:[4,9],p_val:9,p_valu:9,packag:[14,15],page:14,panda:[4,5,13],parallel:4,param:4,paramet:[2,3,4,5,9,14],parameters_estim:[0,1,14],parametersestim:[2,13],parent:[2,3,4,5],parent_indx:2,parent_label:2,parent_set:2,parent_set_v:2,parent_v:2,parent_valu:9,parents_cardin:4,parents_comb:5,parents_index:4,parents_indx:9,parents_label:[4,9],parents_states_numb:[4,9],parents_v:[4,9],parents_valu:[4,9],part:[2,4],particular:[2,5],pass:13,path:[2,5,13],patienc:[2,3],peest:13,perform:2,pip:13,place:5,plot:2,png:2,posit:[4,5],possibl:[2,4],predict:3,prepar:5,present:[2,5],previous:5,print:13,prior:[2,13],prior_net_structur:5,privat:4,probabl:4,process:[2,3,4,5],processes_numb:2,properli:5,properti:[4,5],provid:[4,5],put:5,pyctbn:13,q_xx:4,rappres:4,raw:5,raw_data:5,reach:4,read:[5,13],read_csv:13,read_csv_fil:13,read_fil:13,read_json_fil:5,real:[2,4,5,13],refer:[4,5],reject:2,rel:4,relat:[4,5],releas:13,remain:5,remov:[2,4,5],remove_edg:4,remove_nod:4,repres:4,represent:2,requir:4,res:4,resid:[2,4],respect:4,result:[2,4,5,13],row:4,rtype:4,rule:[2,3],run:[7,8,9,10],runtest:[7,8,9,10],same:[4,5],sampl:[4,5,13],sample_fram:[5,13],sample_import:[0,1,14],sample_path:[0,1,2,14],sampled_cim:7,sampleimport:5,samplepath:[2,4,13],samples_label:5,save:[2,5,13],save_plot_estimated_structure_graph:2,save_result:[2,13],scalar_index:2,scalar_indexes_struct:2,score:2,se1:13,search:[2,3,14],second:2,see:5,select:13,self:[2,5,13],sep:2,sep_set:2,set:[2,4,5,7,8,9,10],set_of_cim:[0,1,2,5,14],setofcim:[2,4,5,13],setup:15,setupclass:[7,8,9,10],share:4,shift:[4,5],shifted_cols_head:5,show:2,signific:2,simbol:5,simpl:13,simpli:13,sinc:4,singl:4,single_cim_xu_marginal_likelihood_q:2,single_cim_xu_marginal_likelihood_theta:2,single_internal_cim_xxu_marginal_likelihood_theta:2,size:[2,4],socim:5,sofc1:13,sorter:5,specif:[2,4,13],specifi:4,spuriou:2,spurious_edg:2,start:5,state:[2,4],state_res_tim:4,state_residence_tim:4,state_transition_matrix:4,statist:2,stop:[2,3],str:[2,3,4,5,13],string:[2,3,4,5],structur:[0,1,2,3,5,9,14],structure_constraint_based_estim:[0,1,14],structure_estim:[0,1,3,14],structure_estimation_exampl:13,structure_graph:[0,1,2,5,6,14],structure_label:5,structure_score_based_estim:[0,1,14],structureconstraintbasedestim:2,structureestim:[2,3,13],structurescorebasedestim:2,structut:4,style:2,submodul:[1,6,14,15],subpackag:[14,15],subsequ:5,subset:2,suffici:2,suffuci:2,symbol:[4,5],synthet:5,t_end:4,t_xu_suff_stat:2,tabu:[2,3],tabu_length:[2,3],tabu_rules_dur:[2,3],tabu_search:[0,1,14],tabusearch:3,take:[4,13],taken:4,tar:13,task:[2,4],tau_xu:2,ternari:13,test:[0,2,15],test_add_edg:9,test_add_nod:9,test_adjacency_matrix:7,test_buid_samplepath_no_concatenated_sampl:9,test_buid_samplepath_no_vari:9,test_build_cim:9,test_build_complete_graph:7,test_build_p_combs_structur:9,test_build_removable_edges_matrix:7,test_build_saplepath_no_prior_net_structur:9,test_build_sort:10,test_build_structur:9,test_build_structure_bad_sort:9,test_build_time_columns_filtering_structure_for_a_nod:9,test_build_time_scalar_indexing_structure_for_a_nod:9,test_build_trajectori:9,test_build_transition_columns_filtering_structur:9,test_build_transition_scalar_indexing_structure_for_a_nod:9,test_cach:[0,6],test_child:2,test_cim:[0,6],test_clear:10,test_clear_concatenated_fram:10,test_clear_data_frame_list:10,test_compute_cim_coeffici:9,test_compute_parameters_for_nod:7,test_compute_row_delta_in_all_fram:10,test_compute_row_delta_in_all_frames_not_init_sort:10,test_compute_row_delta_single_samples_fram:10,test_dataset_id:10,test_edges_oper:9,test_equ:9,test_fast_init:[7,9],test_file_path:10,test_filter_cims_with_mask:9,test_find:10,test_generate_cim:9,test_generate_graph:9,test_generate_possible_sub_sets_of_s:7,test_generated_trajectori:9,test_generated_trajectory_max_tr:9,test_get_node_id:9,test_get_node_indx:9,test_get_ordered_by_indx_set_of_par:9,test_get_parents_by_id:9,test_get_positional_node_indx:9,test_get_states_numb:9,test_hill_climbing_search:[0,6],test_import_data:10,test_import_sampled_cim:10,test_import_structur:10,test_import_vari:10,test_init:[7,9,10],test_init_not_filled_dataframs:9,test_init_not_initialized_import:9,test_json_import:[0,6],test_multi_trajectori:9,test_networkgener:[0,6],test_networkgraph:[0,6],test_normalize_trajectori:10,test_normalize_trajectories_wrong_indx:10,test_normalize_trajectories_wrong_kei:10,test_ord:10,test_par:2,test_parameters_estim:[0,6],test_put:10,test_read_json_file_found:10,test_read_json_file_not_found:10,test_repr:9,test_sample_import:[0,6],test_sample_path:[0,6],test_save_plot_estimated_graph:7,test_save_result:7,test_setofcim:[0,6],test_structur:[0,6,8],test_structure_1:7,test_structure_2:7,test_structure_3:[7,8],test_structure_constraint_based_estim:[0,6],test_structure_estim:[0,6],test_structure_monoprocesso:7,test_structure_score_based_estim:[0,6],test_tabu_search:[0,6],test_tim:7,test_trajectori:[0,6],test_trajectorygener:[0,6],testcach:10,testcas:[7,8,9,10],testconditionalintensitymatrix:9,testhillclimbingsearch:8,testjsonimport:10,testnetworkgener:9,testnetworkgraph:9,testparametersestimatior:7,testsampleimport:10,testsamplepath:9,testsetofcim:9,teststructur:9,teststructureconstraintbasedestim:7,teststructureestim:7,teststructurescorebasedestim:7,testtabusearch:8,testtrajectori:9,testtrajectorygener:9,tha:5,therefor:4,theta:2,thi:[2,4,5,13],three:13,threshold:2,thumb:2,thumb_threshold:2,thumb_valu:2,time:[2,4,5,13],time_filt:4,time_kei:5,time_scalar_indexing_strucur:4,timestamp:5,to_nod:5,tot_vars_count:[2,3],total:[2,4],total_variables_count:4,total_variables_numb:4,traj:5,trajecory_head:5,trajectori:[0,1,2,5,13,14],trajectories_kei:5,trajectory_gener:[0,1,14],trajectory_list:5,trajectorygener:4,trajectri:13,transit:[2,4,5],transition_filt:4,transition_matric:4,transition_scalar_indexing_structur:4,tri:5,tupl:4,tutori:5,two:[2,4],type:[2,3,4,5,13],union:5,uniqu:5,unittest:[7,8,9,10],unus:4,usag:14,use:[2,13],used:[2,3,4,5],using:[2,3,4,5],util:[0,1,4,6,14],val:4,valid:2,valu:[2,3,4,5,9,13],values_list:13,var_id:2,variabl:[2,3,4,5,13],variable_cardin:5,variable_cim_xu_marginal_likelihood_q:2,variable_cim_xu_marginal_likelihood_theta:2,variable_label:5,variables_kei:5,variables_label:5,vector:[2,4],want:13,when:[2,4],where:[4,5],whether:4,which:[2,3,4,5],whl:13,who:2,without:[2,3],worker:4,write:5,you:[2,5,13],your:14},titles:["PyCTBN package","PyCTBN.PyCTBN package","PyCTBN.PyCTBN.estimators package","PyCTBN.PyCTBN.optimizers package","PyCTBN.PyCTBN.structure_graph package","PyCTBN.PyCTBN.utility package","PyCTBN.tests package","PyCTBN.tests.estimators package","PyCTBN.tests.optimizers package","PyCTBN.tests.structure_graph package","PyCTBN.tests.utility package","basic_main module","example module","Examples","Welcome to PyCTBN\u2019s documentation!","PyCTBN","setup module"],titleterms:{"import":13,abstract_export:5,abstract_import:5,basic_main:[0,11],cach:5,conditional_intensity_matrix:4,constraint_based_optim:3,content:[0,1,2,3,4,5,6,7,8,9,10],data:13,document:14,estim:[2,7,13],exampl:[12,13],fam_score_calcul:2,hill_climbing_search:3,implement:13,indic:14,instal:13,json_export:5,json_import:5,modul:[0,1,2,3,4,5,6,7,8,9,10,11,12,16],network_gener:4,network_graph:4,optim:[3,8],own:13,packag:[0,1,2,3,4,5,6,7,8,9,10],paramet:13,parameters_estim:2,pyctbn:[0,1,2,3,4,5,6,7,8,9,10,14,15],sample_import:5,sample_path:4,set_of_cim:4,setup:[0,16],structur:[4,13],structure_constraint_based_estim:2,structure_estim:2,structure_graph:[4,9],structure_score_based_estim:2,submodul:[0,2,3,4,5,7,8,9,10],subpackag:[0,1,6],tabl:14,tabu_search:3,test:[6,7,8,9,10],test_cach:10,test_cim:9,test_hill_climbing_search:8,test_json_import:10,test_networkgener:9,test_networkgraph:9,test_parameters_estim:7,test_sample_import:10,test_sample_path:9,test_setofcim:9,test_structur:9,test_structure_constraint_based_estim:7,test_structure_estim:7,test_structure_score_based_estim:7,test_tabu_search:8,test_trajectori:9,test_trajectorygener:9,trajectori:4,trajectory_gener:4,usag:13,util:[5,10],welcom:14,your:13}}) \ No newline at end of file diff --git a/docs/setup.html b/docs/setup.html index 1e64098..8f74cf7 100644 --- a/docs/setup.html +++ b/docs/setup.html @@ -19,10 +19,6 @@ - - - - @@ -148,9 +144,6 @@ FILE_SUFFIX:'.html', HAS_SOURCE: true }; - - +