1
0
Fork 0

Add docs definitive version

master
Filippo Martini 4 years ago
parent df9a7d8ccc
commit 09590cba1d
  1. 1
      .gitignore
  2. 0
      docs-out/Makefile
  3. 53
      docs-out/PyCTBN.PyCTBN.estimators.rst
  4. 45
      docs-out/PyCTBN.PyCTBN.optimizers.rst
  5. 21
      docs-out/PyCTBN.PyCTBN.rst
  6. 61
      docs-out/PyCTBN.PyCTBN.structure_graph.rst
  7. 45
      docs-out/PyCTBN.PyCTBN.utility.rst
  8. 10
      docs-out/PyCTBN.rst
  9. BIN
      docs-out/_build/doctrees/PyCTBN.PyCTBN.doctree
  10. BIN
      docs-out/_build/doctrees/PyCTBN.PyCTBN.estimators.doctree
  11. BIN
      docs-out/_build/doctrees/PyCTBN.PyCTBN.optimizers.doctree
  12. BIN
      docs-out/_build/doctrees/PyCTBN.PyCTBN.structure_graph.doctree
  13. BIN
      docs-out/_build/doctrees/PyCTBN.PyCTBN.utility.doctree
  14. BIN
      docs-out/_build/doctrees/PyCTBN.doctree
  15. BIN
      docs-out/_build/doctrees/environment.pickle
  16. BIN
      docs-out/_build/doctrees/examples.doctree
  17. BIN
      docs-out/_build/doctrees/index.doctree
  18. BIN
      docs-out/_build/doctrees/modules.doctree
  19. 0
      docs-out/_build/html/.buildinfo
  20. 235
      docs-out/_build/html/PyCTBN.PyCTBN.estimators.html
  21. 97
      docs-out/_build/html/PyCTBN.PyCTBN.html
  22. 86
      docs-out/_build/html/PyCTBN.PyCTBN.optimizers.html
  23. 401
      docs-out/_build/html/PyCTBN.PyCTBN.structure_graph.html
  24. 207
      docs-out/_build/html/PyCTBN.PyCTBN.utility.html
  25. 231
      docs-out/_build/html/PyCTBN.html
  26. 53
      docs-out/_build/html/_sources/PyCTBN.PyCTBN.estimators.rst.txt
  27. 45
      docs-out/_build/html/_sources/PyCTBN.PyCTBN.optimizers.rst.txt
  28. 21
      docs-out/_build/html/_sources/PyCTBN.PyCTBN.rst.txt
  29. 61
      docs-out/_build/html/_sources/PyCTBN.PyCTBN.structure_graph.rst.txt
  30. 45
      docs-out/_build/html/_sources/PyCTBN.PyCTBN.utility.rst.txt
  31. 10
      docs-out/_build/html/_sources/PyCTBN.rst.txt
  32. 0
      docs-out/_build/html/_sources/examples.rst.txt
  33. 7
      docs-out/_build/html/_sources/index.rst.txt
  34. 5
      docs-out/_build/html/_sources/modules.rst.txt
  35. 0
      docs-out/_build/html/_static/basic.css
  36. 0
      docs-out/_build/html/_static/css/badge_only.css
  37. 0
      docs-out/_build/html/_static/css/darker.css
  38. 0
      docs-out/_build/html/_static/css/pdj.css
  39. 0
      docs-out/_build/html/_static/css/theme.css
  40. 0
      docs-out/_build/html/_static/doctools.js
  41. 0
      docs-out/_build/html/_static/documentation_options.js
  42. 0
      docs-out/_build/html/_static/file.png
  43. 0
      docs-out/_build/html/_static/fonts/fontawesome-webfont.eot
  44. 0
      docs-out/_build/html/_static/fonts/fontawesome-webfont.svg
  45. 0
      docs-out/_build/html/_static/fonts/fontawesome-webfont.ttf
  46. 0
      docs-out/_build/html/_static/fonts/fontawesome-webfont.woff
  47. 0
      docs-out/_build/html/_static/img/porao-branco.png
  48. 22
      docs-out/_build/html/_static/jquery-3.5.1.js
  49. 0
      docs-out/_build/html/_static/jquery.js
  50. 0
      docs-out/_build/html/_static/js/pdj.js
  51. 0
      docs-out/_build/html/_static/js/theme.js
  52. 0
      docs-out/_build/html/_static/language_data.js
  53. 0
      docs-out/_build/html/_static/minus.png
  54. 0
      docs-out/_build/html/_static/plus.png
  55. 0
      docs-out/_build/html/_static/pygments.css
  56. 0
      docs-out/_build/html/_static/searchtools.js
  57. 0
      docs-out/_build/html/_static/underscore-1.3.1.js
  58. 0
      docs-out/_build/html/_static/underscore.js
  59. 13
      docs-out/_build/html/examples.html
  60. 873
      docs-out/_build/html/genindex.html
  61. 36
      docs-out/_build/html/index.html
  62. 103
      docs-out/_build/html/modules.html
  63. BIN
      docs-out/_build/html/objects.inv
  64. 72
      docs-out/_build/html/py-modindex.html
  65. 8
      docs-out/_build/html/search.html
  66. 1
      docs-out/_build/html/searchindex.js
  67. 12
      docs-out/conf.py
  68. 0
      docs-out/examples.rst
  69. 7
      docs-out/index.rst
  70. 0
      docs-out/make.bat
  71. 5
      docs-out/modules.rst
  72. 0
      docs/.nojekyll
  73. 825
      docs/PyCTBN.PyCTBN.estimators.html
  74. 233
      docs/PyCTBN.PyCTBN.html
  75. 327
      docs/PyCTBN.PyCTBN.optimizers.html
  76. 851
      docs/PyCTBN.PyCTBN.structure_graph.html
  77. 646
      docs/PyCTBN.PyCTBN.utility.html
  78. 231
      docs/PyCTBN.html
  79. BIN
      docs/_build/doctrees/classes.estimators.doctree
  80. BIN
      docs/_build/doctrees/classes.optimizers.doctree
  81. BIN
      docs/_build/doctrees/classes.structure_graph.doctree
  82. BIN
      docs/_build/doctrees/classes.utility.doctree
  83. BIN
      docs/_build/doctrees/environment.pickle
  84. 53
      docs/_build/html/_sources/classes.estimators.rst.txt
  85. 45
      docs/_build/html/_sources/classes.optimizers.rst.txt
  86. 77
      docs/_build/html/_sources/classes.structure_graph.rst.txt
  87. 53
      docs/_build/html/_sources/classes.utility.rst.txt
  88. 923
      docs/_build/html/genindex.html
  89. BIN
      docs/_build/html/objects.inv
  90. 1
      docs/_build/html/searchindex.js
  91. 53
      docs/_sources/PyCTBN.PyCTBN.estimators.rst.txt
  92. 45
      docs/_sources/PyCTBN.PyCTBN.optimizers.rst.txt
  93. 21
      docs/_sources/PyCTBN.PyCTBN.rst.txt
  94. 61
      docs/_sources/PyCTBN.PyCTBN.structure_graph.rst.txt
  95. 45
      docs/_sources/PyCTBN.PyCTBN.utility.rst.txt
  96. 21
      docs/_sources/PyCTBN.rst.txt
  97. 121
      docs/_sources/examples.rst.txt
  98. 22
      docs/_sources/index.rst.txt
  99. 8
      docs/_sources/modules.rst.txt
  100. 856
      docs/_static/basic.css
  101. Some files were not shown because too many files have changed in this diff Show More

1
.gitignore vendored

@ -7,4 +7,3 @@ __pycache__
**/results_data **/results_data
**/.scannerwork **/.scannerwork
**/build **/build
**/sphinx-out

@ -0,0 +1,53 @@
PyCTBN.PyCTBN.estimators package
================================
Submodules
----------
PyCTBN.PyCTBN.estimators.fam\_score\_calculator module
------------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.estimators.fam_score_calculator
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.estimators.parameters\_estimator module
-----------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.estimators.parameters_estimator
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.estimators.structure\_constraint\_based\_estimator module
-----------------------------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.estimators.structure\_estimator module
----------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.estimators.structure_estimator
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.estimators.structure\_score\_based\_estimator module
------------------------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.estimators.structure_score_based_estimator
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: PyCTBN.PyCTBN.estimators
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,45 @@
PyCTBN.PyCTBN.optimizers package
================================
Submodules
----------
PyCTBN.PyCTBN.optimizers.constraint\_based\_optimizer module
------------------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.optimizers.constraint_based_optimizer
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.optimizers.hill\_climbing\_search module
------------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.optimizers.hill_climbing_search
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.optimizers.optimizer module
-----------------------------------------
.. automodule:: PyCTBN.PyCTBN.optimizers.optimizer
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.optimizers.tabu\_search module
--------------------------------------------
.. automodule:: PyCTBN.PyCTBN.optimizers.tabu_search
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: PyCTBN.PyCTBN.optimizers
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,21 @@
PyCTBN.PyCTBN package
=====================
Subpackages
-----------
.. toctree::
:maxdepth: 4
PyCTBN.PyCTBN.estimators
PyCTBN.PyCTBN.optimizers
PyCTBN.PyCTBN.structure_graph
PyCTBN.PyCTBN.utility
Module contents
---------------
.. automodule:: PyCTBN.PyCTBN
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,61 @@
PyCTBN.PyCTBN.structure\_graph package
======================================
Submodules
----------
PyCTBN.PyCTBN.structure\_graph.conditional\_intensity\_matrix module
--------------------------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.structure\_graph.network\_graph module
----------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.structure_graph.network_graph
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.structure\_graph.sample\_path module
--------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.structure_graph.sample_path
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.structure\_graph.set\_of\_cims module
---------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.structure_graph.set_of_cims
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.structure\_graph.structure module
-----------------------------------------------
.. automodule:: PyCTBN.PyCTBN.structure_graph.structure
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.structure\_graph.trajectory module
------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.structure_graph.trajectory
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: PyCTBN.PyCTBN.structure_graph
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,45 @@
PyCTBN.PyCTBN.utility package
=============================
Submodules
----------
PyCTBN.PyCTBN.utility.abstract\_importer module
-----------------------------------------------
.. automodule:: PyCTBN.PyCTBN.utility.abstract_importer
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.utility.cache module
----------------------------------
.. automodule:: PyCTBN.PyCTBN.utility.cache
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.utility.json\_importer module
-------------------------------------------
.. automodule:: PyCTBN.PyCTBN.utility.json_importer
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.utility.sample\_importer module
---------------------------------------------
.. automodule:: PyCTBN.PyCTBN.utility.sample_importer
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: PyCTBN.PyCTBN.utility
:members:
:undoc-members:
:show-inheritance:

@ -1,5 +1,5 @@
PyCTBN package PyCTBN package
=============== ==============
Subpackages Subpackages
----------- -----------
@ -7,10 +7,10 @@ Subpackages
.. toctree:: .. toctree::
:maxdepth: 4 :maxdepth: 4
PyCTBN.estimators PyCTBN.PyCTBN
PyCTBN.optimizers
PyCTBN.structure_graph Submodules
PyCTBN.utility ----------
Module contents Module contents
--------------- ---------------

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PyCTBN.estimators package &mdash; PyCTBN 2.0 documentation</title> <title>PyCTBN.PyCTBN.estimators package &mdash; PyCTBN 2.0 documentation</title>
@ -27,6 +27,9 @@
href="genindex.html"/> href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/> <link rel="search" title="Search" href="search.html"/>
<link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/> <link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/>
<link rel="up" title="PyCTBN.PyCTBN package" href="PyCTBN.PyCTBN.html"/>
<link rel="next" title="PyCTBN.PyCTBN.optimizers package" href="PyCTBN.PyCTBN.optimizers.html"/>
<link rel="prev" title="PyCTBN.PyCTBN package" href="PyCTBN.PyCTBN.html"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" /> <meta http-equiv="cache-control" content="public" />
@ -59,12 +62,10 @@
<p class="caption"><span class="caption-text">Contents:</span></p> <p class="caption"><span class="caption-text">Contents:</span></p>
<ul> <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a><ul> <li class="toctree-l1 current"><a class="reference internal" href="modules.html">PyCTBN</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="examples.html#installation-usage">Installation/Usage</a></li> <li class="toctree-l2 current"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#implementing-your-own-data-importer">Implementing your own data importer</a></li> <li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#parameters-estimation-example">Parameters Estimation Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#structure-estimation-example">Structure Estimation Example</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -107,21 +108,21 @@
<div role="main" class=""> <div role="main" class="">
<div id="content" class="hfeed entry-container hentry"> <div id="content" class="hfeed entry-container hentry">
<div class="section" id="PyCTBN-estimators-package"> <div class="section" id="pyctbn-pyctbn-estimators-package">
<h1>PyCTBN.estimators package<a class="headerlink" href="#PyCTBN-estimators-package" title="Permalink to this headline"></a></h1> <h1>PyCTBN.PyCTBN.estimators package<a class="headerlink" href="#pyctbn-pyctbn-estimators-package" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules"> <div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2> <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div> </div>
<div class="section" id="module-PyCTBN.estimators.fam_score_calculator"> <div class="section" id="module-PyCTBN.PyCTBN.estimators.fam_score_calculator">
<span id="PyCTBN-estimators-fam-score-calculator-module"></span><h2>PyCTBN.estimators.fam_score_calculator module<a class="headerlink" href="#module-PyCTBN.estimators.fam_score_calculator" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-estimators-fam-score-calculator-module"></span><h2>PyCTBN.PyCTBN.estimators.fam_score_calculator module<a class="headerlink" href="#module-PyCTBN.PyCTBN.estimators.fam_score_calculator" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.estimators.fam_score_calculator.FamScoreCalculator"> <dt id="PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.estimators.fam_score_calculator.</code><code class="sig-name descname">FamScoreCalculator</code><a class="headerlink" href="#PyCTBN.estimators.fam_score_calculator.FamScoreCalculator" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.estimators.fam_score_calculator.</code><code class="sig-name descname">FamScoreCalculator</code><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Has the task of calculating the FamScore of a node by using a Bayesian score function</p> <p>Has the task of calculating the FamScore of a node by using a Bayesian score function</p>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.get_fam_score"> <dt id="PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.get_fam_score">
<code class="sig-name descname">get_fam_score</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cims</span><span class="p">:</span> <span class="n">numpy.array</span></em>, <em class="sig-param"><span class="n">tau_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">0.1</span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">1</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.get_fam_score" title="Permalink to this definition"></a></dt> <code class="sig-name descname">get_fam_score</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cims</span><span class="p">:</span> <span class="n">numpy.array</span></em>, <em class="sig-param"><span class="n">tau_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">0.1</span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">1</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.get_fam_score" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the FamScore value of the node</p> <dd><p>Calculate the FamScore value of the node</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -141,8 +142,8 @@
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.marginal_likelihood_q"> <dt id="PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.marginal_likelihood_q">
<code class="sig-name descname">marginal_likelihood_q</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cims</span><span class="p">:</span> <span class="n">numpy.array</span></em>, <em class="sig-param"><span class="n">tau_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">0.1</span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">1</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.marginal_likelihood_q" title="Permalink to this definition"></a></dt> <code class="sig-name descname">marginal_likelihood_q</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cims</span><span class="p">:</span> <span class="n">numpy.array</span></em>, <em class="sig-param"><span class="n">tau_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">0.1</span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">1</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.marginal_likelihood_q" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the value of the marginal likelihood over q of the node identified by the label node_id</p> <dd><p>Calculate the value of the marginal likelihood over q of the node identified by the label node_id</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -162,8 +163,8 @@
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.marginal_likelihood_theta"> <dt id="PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.marginal_likelihood_theta">
<code class="sig-name descname">marginal_likelihood_theta</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cims</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</a></span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">alpha_xxu</span><span class="p">:</span> <span class="n">float</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.marginal_likelihood_theta" title="Permalink to this definition"></a></dt> <code class="sig-name descname">marginal_likelihood_theta</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cims</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</a></span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">alpha_xxu</span><span class="p">:</span> <span class="n">float</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.marginal_likelihood_theta" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the FamScore value of the node identified by the label node_id</p> <dd><p>Calculate the FamScore value of the node identified by the label node_id</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -183,8 +184,8 @@
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_cim_xu_marginal_likelihood_q"> <dt id="PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_cim_xu_marginal_likelihood_q">
<code class="sig-name descname">single_cim_xu_marginal_likelihood_q</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">M_xu_suff_stats</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">T_xu_suff_stats</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">tau_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">0.1</span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">1</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_cim_xu_marginal_likelihood_q" title="Permalink to this definition"></a></dt> <code class="sig-name descname">single_cim_xu_marginal_likelihood_q</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">M_xu_suff_stats</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">T_xu_suff_stats</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">tau_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">0.1</span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">1</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_cim_xu_marginal_likelihood_q" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the marginal likelihood on q of the node when assumes a specif value <dd><p>Calculate the marginal likelihood on q of the node when assumes a specif value
and a specif parents’s assignment</p> and a specif parents’s assignment</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -207,8 +208,8 @@ and a specif parents’s assignment</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_cim_xu_marginal_likelihood_theta"> <dt id="PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_cim_xu_marginal_likelihood_theta">
<code class="sig-name descname">single_cim_xu_marginal_likelihood_theta</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">index</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">cim</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</a></span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">alpha_xxu</span><span class="p">:</span> <span class="n">float</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_cim_xu_marginal_likelihood_theta" title="Permalink to this definition"></a></dt> <code class="sig-name descname">single_cim_xu_marginal_likelihood_theta</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">index</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">cim</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</a></span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">alpha_xxu</span><span class="p">:</span> <span class="n">float</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_cim_xu_marginal_likelihood_theta" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the marginal likelihood on q of the node when assumes a specif value <dd><p>Calculate the marginal likelihood on q of the node when assumes a specif value
and a specif parents’s assignment</p> and a specif parents’s assignment</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -229,8 +230,8 @@ and a specif parents’s assignment</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_internal_cim_xxu_marginal_likelihood_theta"> <dt id="PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_internal_cim_xxu_marginal_likelihood_theta">
<code class="sig-name descname">single_internal_cim_xxu_marginal_likelihood_theta</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">M_xxu_suff_stats</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">alpha_xxu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">1</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_internal_cim_xxu_marginal_likelihood_theta" title="Permalink to this definition"></a></dt> <code class="sig-name descname">single_internal_cim_xxu_marginal_likelihood_theta</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">M_xxu_suff_stats</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">alpha_xxu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">1</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_internal_cim_xxu_marginal_likelihood_theta" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the second part of the marginal likelihood over theta formula</p> <dd><p>Calculate the second part of the marginal likelihood over theta formula</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -249,8 +250,8 @@ and a specif parents’s assignment</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.variable_cim_xu_marginal_likelihood_q"> <dt id="PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.variable_cim_xu_marginal_likelihood_q">
<code class="sig-name descname">variable_cim_xu_marginal_likelihood_q</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cim</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</a></span></em>, <em class="sig-param"><span class="n">tau_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">0.1</span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">1</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.variable_cim_xu_marginal_likelihood_q" title="Permalink to this definition"></a></dt> <code class="sig-name descname">variable_cim_xu_marginal_likelihood_q</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cim</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</a></span></em>, <em class="sig-param"><span class="n">tau_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">0.1</span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">1</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.variable_cim_xu_marginal_likelihood_q" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the value of the marginal likelihood over q given a cim</p> <dd><p>Calculate the value of the marginal likelihood over q given a cim</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -270,8 +271,8 @@ and a specif parents’s assignment</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.variable_cim_xu_marginal_likelihood_theta"> <dt id="PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.variable_cim_xu_marginal_likelihood_theta">
<code class="sig-name descname">variable_cim_xu_marginal_likelihood_theta</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cim</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</a></span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">alpha_xxu</span><span class="p">:</span> <span class="n">float</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.variable_cim_xu_marginal_likelihood_theta" title="Permalink to this definition"></a></dt> <code class="sig-name descname">variable_cim_xu_marginal_likelihood_theta</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cim</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</a></span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">alpha_xxu</span><span class="p">:</span> <span class="n">float</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.variable_cim_xu_marginal_likelihood_theta" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the value of the marginal likelihood over theta given a cim</p> <dd><p>Calculate the value of the marginal likelihood over theta given a cim</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -293,19 +294,19 @@ and a specif parents’s assignment</p>
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.estimators.parameters_estimator"> <div class="section" id="module-PyCTBN.PyCTBN.estimators.parameters_estimator">
<span id="PyCTBN-estimators-parameters-estimator-module"></span><h2>PyCTBN.estimators.parameters_estimator module<a class="headerlink" href="#module-PyCTBN.estimators.parameters_estimator" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-estimators-parameters-estimator-module"></span><h2>PyCTBN.PyCTBN.estimators.parameters_estimator module<a class="headerlink" href="#module-PyCTBN.PyCTBN.estimators.parameters_estimator" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.estimators.parameters_estimator.ParametersEstimator"> <dt id="PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.estimators.parameters_estimator.</code><code class="sig-name descname">ParametersEstimator</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">trajectories</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.trajectory.Trajectory" title="PyCTBN.structure_graph.trajectory.Trajectory">PyCTBN.structure_graph.trajectory.Trajectory</a></span></em>, <em class="sig-param"><span class="n">net_graph</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph" title="PyCTBN.structure_graph.network_graph.NetworkGraph">PyCTBN.structure_graph.network_graph.NetworkGraph</a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.parameters_estimator.ParametersEstimator" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.estimators.parameters_estimator.</code><code class="sig-name descname">ParametersEstimator</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">trajectories</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory" title="PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory">PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory</a></span></em>, <em class="sig-param"><span class="n">net_graph</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph" title="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph">PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph</a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Has the task of computing the cims of particular node given the trajectories and the net structure <p>Has the task of computing the cims of particular node given the trajectories and the net structure
in the graph <code class="docutils literal notranslate"><span class="pre">_net_graph</span></code>.</p> in the graph <code class="docutils literal notranslate"><span class="pre">_net_graph</span></code>.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple"> <dd class="field-odd"><ul class="simple">
<li><p><strong>trajectories</strong> (<a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.trajectory.Trajectory" title="PyCTBN.structure_graph.trajectory.Trajectory"><em>Trajectory</em></a>) – the trajectories</p></li> <li><p><strong>trajectories</strong> (<a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory" title="PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory"><em>Trajectory</em></a>) – the trajectories</p></li>
<li><p><strong>net_graph</strong> (<a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph" title="PyCTBN.structure_graph.network_graph.NetworkGraph"><em>NetworkGraph</em></a>) – the net structure</p></li> <li><p><strong>net_graph</strong> (<a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph" title="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph"><em>NetworkGraph</em></a>) – the net structure</p></li>
</ul> </ul>
</dd> </dd>
<dt class="field-even">_single_set_of_cims</dt> <dt class="field-even">_single_set_of_cims</dt>
@ -313,13 +314,8 @@ in the graph <code class="docutils literal notranslate"><span class="pre">_net_g
</dd> </dd>
</dl> </dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_parameters"> <dt id="PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_parameters_for_node">
<code class="sig-name descname">compute_parameters</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_parameters" title="Permalink to this definition"></a></dt> <code class="sig-name descname">compute_parameters_for_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; <a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims" title="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims">PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims</a><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_parameters_for_node" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_parameters_for_node">
<code class="sig-name descname">compute_parameters_for_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; <a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.set_of_cims.SetOfCims" title="PyCTBN.structure_graph.set_of_cims.SetOfCims">PyCTBN.structure_graph.set_of_cims.SetOfCims</a><a class="headerlink" href="#PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_parameters_for_node" title="Permalink to this definition"></a></dt>
<dd><p>Compute the CIMS of the node identified by the label <code class="docutils literal notranslate"><span class="pre">node_id</span></code>.</p> <dd><p>Compute the CIMS of the node identified by the label <code class="docutils literal notranslate"><span class="pre">node_id</span></code>.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -329,14 +325,14 @@ in the graph <code class="docutils literal notranslate"><span class="pre">_net_g
<dd class="field-even"><p>A SetOfCims object filled with the computed CIMS</p> <dd class="field-even"><p>A SetOfCims object filled with the computed CIMS</p>
</dd> </dd>
<dt class="field-odd">Return type</dt> <dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.set_of_cims.SetOfCims" title="PyCTBN.structure_graph.set_of_cims.SetOfCims">SetOfCims</a></p> <dd class="field-odd"><p><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims" title="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims">SetOfCims</a></p>
</dd> </dd>
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_state_res_time_for_node"> <dt id="PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_state_res_time_for_node">
<em class="property">static </em><code class="sig-name descname">compute_state_res_time_for_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">times</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">trajectory</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">cols_filter</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">scalar_indexes_struct</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">T</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_state_res_time_for_node" title="Permalink to this definition"></a></dt> <em class="property">static </em><code class="sig-name descname">compute_state_res_time_for_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">times</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">trajectory</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">cols_filter</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">scalar_indexes_struct</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">T</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_state_res_time_for_node" title="Permalink to this definition"></a></dt>
<dd><p>Compute the state residence times for a node and fill the matrix <code class="docutils literal notranslate"><span class="pre">T</span></code> with the results</p> <dd><p>Compute the state residence times for a node and fill the matrix <code class="docutils literal notranslate"><span class="pre">T</span></code> with the results</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -353,8 +349,8 @@ in the graph <code class="docutils literal notranslate"><span class="pre">_net_g
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_state_transitions_for_a_node"> <dt id="PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_state_transitions_for_a_node">
<em class="property">static </em><code class="sig-name descname">compute_state_transitions_for_a_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_indx</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">trajectory</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">cols_filter</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">scalar_indexing</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">M</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_state_transitions_for_a_node" title="Permalink to this definition"></a></dt> <em class="property">static </em><code class="sig-name descname">compute_state_transitions_for_a_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_indx</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">trajectory</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">cols_filter</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">scalar_indexing</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">M</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_state_transitions_for_a_node" title="Permalink to this definition"></a></dt>
<dd><p>Compute the state residence times for a node and fill the matrices <code class="docutils literal notranslate"><span class="pre">M</span></code> with the results.</p> <dd><p>Compute the state residence times for a node and fill the matrices <code class="docutils literal notranslate"><span class="pre">M</span></code> with the results.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -370,8 +366,8 @@ in the graph <code class="docutils literal notranslate"><span class="pre">_net_g
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.parameters_estimator.ParametersEstimator.fast_init"> <dt id="PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.fast_init">
<code class="sig-name descname">fast_init</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.estimators.parameters_estimator.ParametersEstimator.fast_init" title="Permalink to this definition"></a></dt> <code class="sig-name descname">fast_init</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.fast_init" title="Permalink to this definition"></a></dt>
<dd><p>Initializes all the necessary structures for the parameters estimation for the node <code class="docutils literal notranslate"><span class="pre">node_id</span></code>.</p> <dd><p>Initializes all the necessary structures for the parameters estimation for the node <code class="docutils literal notranslate"><span class="pre">node_id</span></code>.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -380,25 +376,20 @@ in the graph <code class="docutils literal notranslate"><span class="pre">_net_g
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py method">
<dt id="PyCTBN.estimators.parameters_estimator.ParametersEstimator.init_sets_cims_container">
<code class="sig-name descname">init_sets_cims_container</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.parameters_estimator.ParametersEstimator.init_sets_cims_container" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.estimators.structure_constraint_based_estimator"> <div class="section" id="module-PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator">
<span id="PyCTBN-estimators-structure-constraint-based-estimator-module"></span><h2>PyCTBN.estimators.structure_constraint_based_estimator module<a class="headerlink" href="#module-PyCTBN.estimators.structure_constraint_based_estimator" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-estimators-structure-constraint-based-estimator-module"></span><h2>PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator module<a class="headerlink" href="#module-PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator"> <dt id="PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.estimators.structure_constraint_based_estimator.</code><code class="sig-name descname">StructureConstraintBasedEstimator</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_path</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.sample_path.SamplePath" title="PyCTBN.structure_graph.sample_path.SamplePath">PyCTBN.structure_graph.sample_path.SamplePath</a></span></em>, <em class="sig-param"><span class="n">exp_test_alfa</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">chi_test_alfa</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">known_edges</span><span class="p">:</span> <span class="n">List</span> <span class="o">=</span> <span class="default_value">[]</span></em>, <em class="sig-param"><span class="n">thumb_threshold</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">25</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.</code><code class="sig-name descname">StructureConstraintBasedEstimator</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_path</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath" title="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath">PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath</a></span></em>, <em class="sig-param"><span class="n">exp_test_alfa</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">chi_test_alfa</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">known_edges</span><span class="p">:</span> <span class="n">List</span> <span class="o">=</span> <span class="default_value">[]</span></em>, <em class="sig-param"><span class="n">thumb_threshold</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">25</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#PyCTBN.estimators.structure_estimator.StructureEstimator" title="PyCTBN.estimators.structure_estimator.StructureEstimator"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.estimators.structure_estimator.StructureEstimator</span></code></a></p> <dd><p>Bases: <a class="reference internal" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator" title="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator</span></code></a></p>
<p>Has the task of estimating the network structure given the trajectories in samplepath by using a constraint-based approach.</p> <p>Has the task of estimating the network structure given the trajectories in samplepath by using a constraint-based approach.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple"> <dd class="field-odd"><ul class="simple">
<li><p><strong>sample_path</strong> (<a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.sample_path.SamplePath" title="PyCTBN.structure_graph.sample_path.SamplePath"><em>SamplePath</em></a>) – the _sample_path object containing the trajectories and the real structure</p></li> <li><p><strong>sample_path</strong> (<a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath" title="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath"><em>SamplePath</em></a>) – the _sample_path object containing the trajectories and the real structure</p></li>
<li><p><strong>exp_test_alfa</strong> (<em>float</em>) – the significance level for the exponential Hp test</p></li> <li><p><strong>exp_test_alfa</strong> (<em>float</em>) – the significance level for the exponential Hp test</p></li>
<li><p><strong>chi_test_alfa</strong> (<em>float</em>) – the significance level for the chi Hp test</p></li> <li><p><strong>chi_test_alfa</strong> (<em>float</em>) – the significance level for the chi Hp test</p></li>
</ul> </ul>
@ -420,8 +411,8 @@ in the graph <code class="docutils literal notranslate"><span class="pre">_net_g
</dd> </dd>
</dl> </dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.complete_test"> <dt id="PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.complete_test">
<code class="sig-name descname">complete_test</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">test_parent</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">test_child</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">parent_set</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">child_states_numb</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">tot_vars_count</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">parent_indx</span></em>, <em class="sig-param"><span class="n">child_indx</span></em><span class="sig-paren">)</span> &#x2192; bool<a class="headerlink" href="#PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.complete_test" title="Permalink to this definition"></a></dt> <code class="sig-name descname">complete_test</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">test_parent</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">test_child</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">parent_set</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">child_states_numb</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">tot_vars_count</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">parent_indx</span></em>, <em class="sig-param"><span class="n">child_indx</span></em><span class="sig-paren">)</span> &#x2192; bool<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.complete_test" title="Permalink to this definition"></a></dt>
<dd><p>Performs a complete independence test on the directed graphs G1 = {test_child U parent_set} <dd><p>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). 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.</p> Generates all the necessary structures and datas to perform the tests.</p>
@ -445,8 +436,8 @@ Generates all the necessary structures and datas to perform the tests.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.compute_thumb_value"> <dt id="PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.compute_thumb_value">
<code class="sig-name descname">compute_thumb_value</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">parent_val</span></em>, <em class="sig-param"><span class="n">child_val</span></em>, <em class="sig-param"><span class="n">parent_set_vals</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.compute_thumb_value" title="Permalink to this definition"></a></dt> <code class="sig-name descname">compute_thumb_value</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">parent_val</span></em>, <em class="sig-param"><span class="n">child_val</span></em>, <em class="sig-param"><span class="n">parent_set_vals</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.compute_thumb_value" title="Permalink to this definition"></a></dt>
<dd><p>Compute the value to test against the thumb_threshold.</p> <dd><p>Compute the value to test against the thumb_threshold.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -466,14 +457,14 @@ Generates all the necessary structures and datas to perform the tests.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.ctpc_algorithm"> <dt id="PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.ctpc_algorithm">
<code class="sig-name descname">ctpc_algorithm</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">disable_multiprocessing</span><span class="p">:</span> <span class="n">bool</span> <span class="o">=</span> <span class="default_value">False</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.ctpc_algorithm" title="Permalink to this definition"></a></dt> <code class="sig-name descname">ctpc_algorithm</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">disable_multiprocessing</span><span class="p">:</span> <span class="n">bool</span> <span class="o">=</span> <span class="default_value">False</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.ctpc_algorithm" title="Permalink to this definition"></a></dt>
<dd><p>Compute the CTPC algorithm over the entire net.</p> <dd><p>Compute the CTPC algorithm over the entire net.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.estimate_structure"> <dt id="PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.estimate_structure">
<code class="sig-name descname">estimate_structure</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">disable_multiprocessing</span><span class="p">:</span> <span class="n">bool</span> <span class="o">=</span> <span class="default_value">False</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.estimate_structure" title="Permalink to this definition"></a></dt> <code class="sig-name descname">estimate_structure</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">disable_multiprocessing</span><span class="p">:</span> <span class="n">bool</span> <span class="o">=</span> <span class="default_value">False</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.estimate_structure" title="Permalink to this definition"></a></dt>
<dd><p>Abstract method to estimate the structure</p> <dd><p>Abstract method to estimate the structure</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Returns</dt> <dt class="field-odd">Returns</dt>
@ -486,8 +477,8 @@ Generates all the necessary structures and datas to perform the tests.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.independence_test"> <dt id="PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.independence_test">
<code class="sig-name descname">independence_test</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">child_states_numb</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">cim1</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</a></span></em>, <em class="sig-param"><span class="n">cim2</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</a></span></em>, <em class="sig-param"><span class="n">thumb_value</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">parent_indx</span></em>, <em class="sig-param"><span class="n">child_indx</span></em><span class="sig-paren">)</span> &#x2192; bool<a class="headerlink" href="#PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.independence_test" title="Permalink to this definition"></a></dt> <code class="sig-name descname">independence_test</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">child_states_numb</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">cim1</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</a></span></em>, <em class="sig-param"><span class="n">cim2</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</a></span></em>, <em class="sig-param"><span class="n">thumb_value</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">parent_indx</span></em>, <em class="sig-param"><span class="n">child_indx</span></em><span class="sig-paren">)</span> &#x2192; bool<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.independence_test" title="Permalink to this definition"></a></dt>
<dd><p>Compute the actual independence test using two cims. <dd><p>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 first the exponential test and if the null hypothesis is not rejected,
it is performed also the chi_test.</p> it is performed also the chi_test.</p>
@ -495,8 +486,8 @@ it is performed also the chi_test.</p>
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple"> <dd class="field-odd"><ul class="simple">
<li><p><strong>child_states_numb</strong> (<em>int</em>) – the cardinality of the test child</p></li> <li><p><strong>child_states_numb</strong> (<em>int</em>) – the cardinality of the test child</p></li>
<li><p><strong>cim1</strong> (<a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix"><em>ConditionalIntensityMatrix</em></a>) – a cim belonging to the graph without test parent</p></li> <li><p><strong>cim1</strong> (<a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix"><em>ConditionalIntensityMatrix</em></a>) – a cim belonging to the graph without test parent</p></li>
<li><p><strong>cim2</strong> (<a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix"><em>ConditionalIntensityMatrix</em></a>) – a cim belonging to the graph with test parent</p></li> <li><p><strong>cim2</strong> (<a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix"><em>ConditionalIntensityMatrix</em></a>) – a cim belonging to the graph with test parent</p></li>
</ul> </ul>
</dd> </dd>
<dt class="field-even">Returns</dt> <dt class="field-even">Returns</dt>
@ -509,8 +500,8 @@ it is performed also the chi_test.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.one_iteration_of_CTPC_algorithm"> <dt id="PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.one_iteration_of_CTPC_algorithm">
<code class="sig-name descname">one_iteration_of_CTPC_algorithm</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">var_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">tot_vars_count</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.one_iteration_of_CTPC_algorithm" title="Permalink to this definition"></a></dt> <code class="sig-name descname">one_iteration_of_CTPC_algorithm</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">var_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">tot_vars_count</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.one_iteration_of_CTPC_algorithm" title="Permalink to this definition"></a></dt>
<dd><p>Performs an iteration of the CTPC algorithm using the node <code class="docutils literal notranslate"><span class="pre">var_id</span></code> as <code class="docutils literal notranslate"><span class="pre">test_child</span></code>.</p> <dd><p>Performs an iteration of the CTPC algorithm using the node <code class="docutils literal notranslate"><span class="pre">var_id</span></code> as <code class="docutils literal notranslate"><span class="pre">test_child</span></code>.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -522,16 +513,16 @@ it is performed also the chi_test.</p>
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.estimators.structure_estimator"> <div class="section" id="module-PyCTBN.PyCTBN.estimators.structure_estimator">
<span id="PyCTBN-estimators-structure-estimator-module"></span><h2>PyCTBN.estimators.structure_estimator module<a class="headerlink" href="#module-PyCTBN.estimators.structure_estimator" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-estimators-structure-estimator-module"></span><h2>PyCTBN.PyCTBN.estimators.structure_estimator module<a class="headerlink" href="#module-PyCTBN.PyCTBN.estimators.structure_estimator" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.estimators.structure_estimator.StructureEstimator"> <dt id="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.estimators.structure_estimator.</code><code class="sig-name descname">StructureEstimator</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_path</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.sample_path.SamplePath" title="PyCTBN.structure_graph.sample_path.SamplePath">PyCTBN.structure_graph.sample_path.SamplePath</a></span></em>, <em class="sig-param"><span class="n">known_edges</span><span class="p">:</span> <span class="n">List</span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.structure_estimator.StructureEstimator" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.estimators.structure_estimator.</code><code class="sig-name descname">StructureEstimator</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_path</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath" title="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath">PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath</a></span></em>, <em class="sig-param"><span class="n">known_edges</span><span class="p">:</span> <span class="n">List</span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Has the task of estimating the network structure given the trajectories in <code class="docutils literal notranslate"><span class="pre">samplepath</span></code>.</p> <p>Has the task of estimating the network structure given the trajectories in <code class="docutils literal notranslate"><span class="pre">samplepath</span></code>.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>sample_path</strong> (<a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.sample_path.SamplePath" title="PyCTBN.structure_graph.sample_path.SamplePath"><em>SamplePath</em></a>) – the _sample_path object containing the trajectories and the real structure</p> <dd class="field-odd"><p><strong>sample_path</strong> (<a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath" title="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath"><em>SamplePath</em></a>) – the _sample_path object containing the trajectories and the real structure</p>
</dd> </dd>
<dt class="field-even">_nodes</dt> <dt class="field-even">_nodes</dt>
<dd class="field-even"><p>the nodes labels</p> <dd class="field-even"><p>the nodes labels</p>
@ -547,8 +538,8 @@ it is performed also the chi_test.</p>
</dd> </dd>
</dl> </dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.structure_estimator.StructureEstimator.adjacency_matrix"> <dt id="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.adjacency_matrix">
<code class="sig-name descname">adjacency_matrix</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.estimators.structure_estimator.StructureEstimator.adjacency_matrix" title="Permalink to this definition"></a></dt> <code class="sig-name descname">adjacency_matrix</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.adjacency_matrix" title="Permalink to this definition"></a></dt>
<dd><p>Converts the estimated structure <code class="docutils literal notranslate"><span class="pre">_complete_graph</span></code> to a boolean adjacency matrix representation.</p> <dd><p>Converts the estimated structure <code class="docutils literal notranslate"><span class="pre">_complete_graph</span></code> to a boolean adjacency matrix representation.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Returns</dt> <dt class="field-odd">Returns</dt>
@ -561,8 +552,8 @@ it is performed also the chi_test.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.structure_estimator.StructureEstimator.build_complete_graph"> <dt id="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.build_complete_graph">
<em class="property">static </em><code class="sig-name descname">build_complete_graph</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_ids</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; networkx.PyCTBN.digraph.DiGraph<a class="headerlink" href="#PyCTBN.estimators.structure_estimator.StructureEstimator.build_complete_graph" title="Permalink to this definition"></a></dt> <em class="property">static </em><code class="sig-name descname">build_complete_graph</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_ids</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; networkx.classes.digraph.DiGraph<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.build_complete_graph" title="Permalink to this definition"></a></dt>
<dd><p>Builds a complete directed graph (no self loops) given the nodes labels in the list <code class="docutils literal notranslate"><span class="pre">node_ids</span></code>:</p> <dd><p>Builds a complete directed graph (no self loops) given the nodes labels in the list <code class="docutils literal notranslate"><span class="pre">node_ids</span></code>:</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -578,8 +569,8 @@ it is performed also the chi_test.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.structure_estimator.StructureEstimator.build_removable_edges_matrix"> <dt id="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.build_removable_edges_matrix">
<code class="sig-name descname">build_removable_edges_matrix</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">known_edges</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.structure_estimator.StructureEstimator.build_removable_edges_matrix" title="Permalink to this definition"></a></dt> <code class="sig-name descname">build_removable_edges_matrix</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">known_edges</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.build_removable_edges_matrix" title="Permalink to this definition"></a></dt>
<dd><p>Builds a boolean matrix who shows if a edge could be removed or not, based on prior knowledge given:</p> <dd><p>Builds a boolean matrix who shows if a edge could be removed or not, based on prior knowledge given:</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -595,8 +586,8 @@ it is performed also the chi_test.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.structure_estimator.StructureEstimator.estimate_structure"> <dt id="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.estimate_structure">
<em class="property">abstract </em><code class="sig-name descname">estimate_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.estimators.structure_estimator.StructureEstimator.estimate_structure" title="Permalink to this definition"></a></dt> <em class="property">abstract </em><code class="sig-name descname">estimate_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.estimate_structure" title="Permalink to this definition"></a></dt>
<dd><p>Abstract method to estimate the structure</p> <dd><p>Abstract method to estimate the structure</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Returns</dt> <dt class="field-odd">Returns</dt>
@ -609,8 +600,8 @@ it is performed also the chi_test.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.structure_estimator.StructureEstimator.generate_possible_sub_sets_of_size"> <dt id="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.generate_possible_sub_sets_of_size">
<em class="property">static </em><code class="sig-name descname">generate_possible_sub_sets_of_size</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">u</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">size</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">parent_label</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.structure_estimator.StructureEstimator.generate_possible_sub_sets_of_size" title="Permalink to this definition"></a></dt> <em class="property">static </em><code class="sig-name descname">generate_possible_sub_sets_of_size</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">u</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">size</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">parent_label</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.generate_possible_sub_sets_of_size" title="Permalink to this definition"></a></dt>
<dd><p>Creates a list containing all possible subsets of the list <code class="docutils literal notranslate"><span class="pre">u</span></code> of size <code class="docutils literal notranslate"><span class="pre">size</span></code>, <dd><p>Creates a list containing all possible subsets of the list <code class="docutils literal notranslate"><span class="pre">u</span></code> of size <code class="docutils literal notranslate"><span class="pre">size</span></code>,
that do not contains a the node identified by <code class="docutils literal notranslate"><span class="pre">parent_label</span></code>.</p> that do not contains a the node identified by <code class="docutils literal notranslate"><span class="pre">parent_label</span></code>.</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -631,27 +622,30 @@ that do not contains a the node identified by <code class="docutils literal notr
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.structure_estimator.StructureEstimator.remove_diagonal_elements"> <dt id="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.save_plot_estimated_structure_graph">
<code class="sig-name descname">remove_diagonal_elements</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">matrix</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.structure_estimator.StructureEstimator.remove_diagonal_elements" title="Permalink to this definition"></a></dt> <code class="sig-name descname">save_plot_estimated_structure_graph</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">file_path</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.save_plot_estimated_structure_graph" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd><p>Plot the estimated structure in a graphical model style, use .png extension.
Spurious edges are colored in red if a prior structure is present.</p>
<dl class="py method"> <dl class="field-list simple">
<dt id="PyCTBN.estimators.structure_estimator.StructureEstimator.save_plot_estimated_structure_graph"> <dt class="field-odd">Parameters</dt>
<code class="sig-name descname">save_plot_estimated_structure_graph</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.estimators.structure_estimator.StructureEstimator.save_plot_estimated_structure_graph" title="Permalink to this definition"></a></dt> <dd class="field-odd"><p><strong>file_path</strong> – path to save the file to</p>
<dd><p>Plot the estimated structure in a graphical model style. </dd>
Spurious edges are colored in red.</p> <dt class="field-even">Type</dt>
<dd class="field-even"><p>string</p>
</dd>
</dl>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.structure_estimator.StructureEstimator.save_results"> <dt id="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.save_results">
<code class="sig-name descname">save_results</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.estimators.structure_estimator.StructureEstimator.save_results" title="Permalink to this definition"></a></dt> <code class="sig-name descname">save_results</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.save_results" title="Permalink to this definition"></a></dt>
<dd><p>Save the estimated Structure to a .json file in the path where the data are loaded from. <dd><p>Save the estimated Structure to a .json file in the path where the data are loaded from.
The file is named as the input dataset but the <cite>results_</cite> word is appended to the results file.</p> The file is named as the input dataset but the <cite>results_</cite> word is appended to the results file.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.structure_estimator.StructureEstimator.spurious_edges"> <dt id="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.spurious_edges">
<code class="sig-name descname">spurious_edges</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.estimators.structure_estimator.StructureEstimator.spurious_edges" title="Permalink to this definition"></a></dt> <code class="sig-name descname">spurious_edges</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.spurious_edges" title="Permalink to this definition"></a></dt>
<dd><dl class="simple"> <dd><dl class="simple">
<dt>Return the spurious edges present in the estimated structure, if a prior net structure is present in</dt><dd><p><code class="docutils literal notranslate"><span class="pre">_sample_path.structure</span></code>.</p> <dt>Return the spurious edges present in the estimated structure, if a prior net structure is present in</dt><dd><p><code class="docutils literal notranslate"><span class="pre">_sample_path.structure</span></code>.</p>
</dd> </dd>
@ -669,18 +663,18 @@ The file is named as the input dataset but the <cite>results_</cite> word is app
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.estimators.structure_score_based_estimator"> <div class="section" id="module-PyCTBN.PyCTBN.estimators.structure_score_based_estimator">
<span id="PyCTBN-estimators-structure-score-based-estimator-module"></span><h2>PyCTBN.estimators.structure_score_based_estimator module<a class="headerlink" href="#module-PyCTBN.estimators.structure_score_based_estimator" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-estimators-structure-score-based-estimator-module"></span><h2>PyCTBN.PyCTBN.estimators.structure_score_based_estimator module<a class="headerlink" href="#module-PyCTBN.PyCTBN.estimators.structure_score_based_estimator" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator"> <dt id="PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.estimators.structure_score_based_estimator.</code><code class="sig-name descname">StructureScoreBasedEstimator</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_path</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.sample_path.SamplePath" title="PyCTBN.structure_graph.sample_path.SamplePath">PyCTBN.structure_graph.sample_path.SamplePath</a></span></em>, <em class="sig-param"><span class="n">tau_xu</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">0.1</span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">1</span></em>, <em class="sig-param"><span class="n">known_edges</span><span class="p">:</span> <span class="n">List</span> <span class="o">=</span> <span class="default_value">[]</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.estimators.structure_score_based_estimator.</code><code class="sig-name descname">StructureScoreBasedEstimator</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_path</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath" title="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath">PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath</a></span></em>, <em class="sig-param"><span class="n">tau_xu</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">0.1</span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">1</span></em>, <em class="sig-param"><span class="n">known_edges</span><span class="p">:</span> <span class="n">List</span> <span class="o">=</span> <span class="default_value">[]</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#PyCTBN.estimators.structure_estimator.StructureEstimator" title="PyCTBN.estimators.structure_estimator.StructureEstimator"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.estimators.structure_estimator.StructureEstimator</span></code></a></p> <dd><p>Bases: <a class="reference internal" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator" title="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator</span></code></a></p>
<p>Has the task of estimating the network structure given the trajectories in samplepath by <p>Has the task of estimating the network structure given the trajectories in samplepath by
using a score based approach.</p> using a score based approach.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple"> <dd class="field-odd"><ul class="simple">
<li><p><strong>sample_path</strong> (<a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.sample_path.SamplePath" title="PyCTBN.structure_graph.sample_path.SamplePath"><em>SamplePath</em></a>) – the _sample_path object containing the trajectories and the real structure</p></li> <li><p><strong>sample_path</strong> (<a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath" title="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath"><em>SamplePath</em></a>) – the _sample_path object containing the trajectories and the real structure</p></li>
<li><p><strong>tau_xu</strong> (<em>float</em><em>, </em><em>optional</em>) – hyperparameter over the CTBN’s q parameters, default to 0.1</p></li> <li><p><strong>tau_xu</strong> (<em>float</em><em>, </em><em>optional</em>) – hyperparameter over the CTBN’s q parameters, default to 0.1</p></li>
<li><p><strong>alpha_xu</strong> (<em>float</em><em>, </em><em>optional</em>) – hyperparameter over the CTBN’s q parameters, default to 1</p></li> <li><p><strong>alpha_xu</strong> (<em>float</em><em>, </em><em>optional</em>) – hyperparameter over the CTBN’s q parameters, default to 1</p></li>
<li><p><strong>known_edges</strong> (<em>List</em><em>, </em><em>optional</em>) – List of known edges, default to []</p></li> <li><p><strong>known_edges</strong> (<em>List</em><em>, </em><em>optional</em>) – List of known edges, default to []</p></li>
@ -688,8 +682,8 @@ using a score based approach.</p>
</dd> </dd>
</dl> </dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.estimate_parents"> <dt id="PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.estimate_parents">
<code class="sig-name descname">estimate_parents</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">max_parents</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">iterations_number</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">40</span></em>, <em class="sig-param"><span class="n">patience</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">10</span></em>, <em class="sig-param"><span class="n">tabu_length</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tabu_rules_duration</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">5</span></em>, <em class="sig-param"><span class="n">optimizer</span><span class="p">:</span> <span class="n">str</span> <span class="o">=</span> <span class="default_value">'hill'</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.estimate_parents" title="Permalink to this definition"></a></dt> <code class="sig-name descname">estimate_parents</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">max_parents</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">iterations_number</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">40</span></em>, <em class="sig-param"><span class="n">patience</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">10</span></em>, <em class="sig-param"><span class="n">tabu_length</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tabu_rules_duration</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">5</span></em>, <em class="sig-param"><span class="n">optimizer</span><span class="p">:</span> <span class="n">str</span> <span class="o">=</span> <span class="default_value">'hill'</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.estimate_parents" title="Permalink to this definition"></a></dt>
<dd><p>Use the FamScore of a node in order to find the best parent nodes</p> <dd><p>Use the FamScore of a node in order to find the best parent nodes</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -713,8 +707,8 @@ using a score based approach.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.estimate_structure"> <dt id="PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.estimate_structure">
<code class="sig-name descname">estimate_structure</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">max_parents</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">iterations_number</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">40</span></em>, <em class="sig-param"><span class="n">patience</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tabu_length</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tabu_rules_duration</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">optimizer</span><span class="p">:</span> <span class="n">str</span> <span class="o">=</span> <span class="default_value">'tabu'</span></em>, <em class="sig-param"><span class="n">disable_multiprocessing</span><span class="p">:</span> <span class="n">bool</span> <span class="o">=</span> <span class="default_value">False</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.estimate_structure" title="Permalink to this definition"></a></dt> <code class="sig-name descname">estimate_structure</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">max_parents</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">iterations_number</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">40</span></em>, <em class="sig-param"><span class="n">patience</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tabu_length</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tabu_rules_duration</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">optimizer</span><span class="p">:</span> <span class="n">str</span> <span class="o">=</span> <span class="default_value">'tabu'</span></em>, <em class="sig-param"><span class="n">disable_multiprocessing</span><span class="p">:</span> <span class="n">bool</span> <span class="o">=</span> <span class="default_value">False</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.estimate_structure" title="Permalink to this definition"></a></dt>
<dd><p>Compute the score-based algorithm to find the optimal structure</p> <dd><p>Compute the score-based algorithm to find the optimal structure</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -732,8 +726,8 @@ using a score based approach.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.get_score_from_graph"> <dt id="PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.get_score_from_graph">
<code class="sig-name descname">get_score_from_graph</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">graph</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph" title="PyCTBN.structure_graph.network_graph.NetworkGraph">PyCTBN.structure_graph.network_graph.NetworkGraph</a></span></em>, <em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.get_score_from_graph" title="Permalink to this definition"></a></dt> <code class="sig-name descname">get_score_from_graph</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">graph</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph" title="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph">PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph</a></span></em>, <em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.get_score_from_graph" title="Permalink to this definition"></a></dt>
<dd><p>Get the FamScore of a node</p> <dd><p>Get the FamScore of a node</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -754,8 +748,8 @@ using a score based approach.</p>
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.estimators"> <div class="section" id="module-PyCTBN.PyCTBN.estimators">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-PyCTBN.estimators" title="Permalink to this headline"></a></h2> <span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-PyCTBN.PyCTBN.estimators" title="Permalink to this headline"></a></h2>
</div> </div>
</div> </div>
@ -763,6 +757,15 @@ using a score based approach.</p>
</div> </div>
<footer> <footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="PyCTBN.PyCTBN.optimizers.html" class="btn btn-neutral float-right" title="PyCTBN.PyCTBN.optimizers package">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="PyCTBN.PyCTBN.html" class="btn btn-neutral" title="PyCTBN.PyCTBN package"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/> <hr/>

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PyCTBN package &mdash; PyCTBN 2.0 documentation</title> <title>PyCTBN.PyCTBN package &mdash; PyCTBN 2.0 documentation</title>
@ -27,6 +27,9 @@
href="genindex.html"/> href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/> <link rel="search" title="Search" href="search.html"/>
<link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/> <link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/>
<link rel="up" title="PyCTBN" href="modules.html"/>
<link rel="next" title="PyCTBN.PyCTBN.estimators package" href="PyCTBN.PyCTBN.estimators.html"/>
<link rel="prev" title="PyCTBN" href="modules.html"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" /> <meta http-equiv="cache-control" content="public" />
@ -59,12 +62,10 @@
<p class="caption"><span class="caption-text">Contents:</span></p> <p class="caption"><span class="caption-text">Contents:</span></p>
<ul> <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a><ul> <li class="toctree-l1 current"><a class="reference internal" href="modules.html">PyCTBN</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="examples.html#installation-usage">Installation/Usage</a></li> <li class="toctree-l2 current"><a class="current reference internal" href="#">PyCTBN.PyCTBN package</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#implementing-your-own-data-importer">Implementing your own data importer</a></li> <li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#parameters-estimation-example">Parameters Estimation Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#structure-estimation-example">Structure Estimation Example</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -107,59 +108,56 @@
<div role="main" class=""> <div role="main" class="">
<div id="content" class="hfeed entry-container hentry"> <div id="content" class="hfeed entry-container hentry">
<div class="section" id="PyCTBN-package"> <div class="section" id="pyctbn-pyctbn-package">
<h1>PyCTBN package<a class="headerlink" href="#PyCTBN-package" title="Permalink to this headline"></a></h1> <h1>PyCTBN.PyCTBN package<a class="headerlink" href="#pyctbn-pyctbn-package" title="Permalink to this headline"></a></h1>
<div class="section" id="subpackages"> <div class="section" id="subpackages">
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline"></a></h2> <h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound"> <div class="toctree-wrapper compound">
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="PyCTBN.estimators.html">PyCTBN.estimators package</a><ul> <li class="toctree-l1"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html">PyCTBN.PyCTBN.estimators package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.estimators.html#submodules">Submodules</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.estimators.html#module-PyCTBN.estimators.fam_score_calculator">PyCTBN.estimators.fam_score_calculator module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.fam_score_calculator">PyCTBN.PyCTBN.estimators.fam_score_calculator module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.estimators.html#module-PyCTBN.estimators.parameters_estimator">PyCTBN.estimators.parameters_estimator module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.parameters_estimator">PyCTBN.PyCTBN.estimators.parameters_estimator module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.estimators.html#module-PyCTBN.estimators.structure_constraint_based_estimator">PyCTBN.estimators.structure_constraint_based_estimator module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator">PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.estimators.html#module-PyCTBN.estimators.structure_estimator">PyCTBN.estimators.structure_estimator module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_estimator">PyCTBN.PyCTBN.estimators.structure_estimator module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.estimators.html#module-PyCTBN.estimators.structure_score_based_estimator">PyCTBN.estimators.structure_score_based_estimator module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_score_based_estimator">PyCTBN.PyCTBN.estimators.structure_score_based_estimator module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.estimators.html#module-PyCTBN.estimators">Module contents</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators">Module contents</a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l1"><a class="reference internal" href="PyCTBN.optimizers.html">PyCTBN.optimizers package</a><ul> <li class="toctree-l1"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html">PyCTBN.PyCTBN.optimizers package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.optimizers.html#submodules">Submodules</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.constraint_based_optimizer">PyCTBN.optimizers.constraint_based_optimizer module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.constraint_based_optimizer">PyCTBN.PyCTBN.optimizers.constraint_based_optimizer module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.hill_climbing_search">PyCTBN.optimizers.hill_climbing_search module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.hill_climbing_search">PyCTBN.PyCTBN.optimizers.hill_climbing_search module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.optimizer">PyCTBN.optimizers.optimizer module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.optimizer">PyCTBN.PyCTBN.optimizers.optimizer module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.tabu_search">PyCTBN.optimizers.tabu_search module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.tabu_search">PyCTBN.PyCTBN.optimizers.tabu_search module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.optimizers.html#module-PyCTBN.optimizers">Module contents</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers">Module contents</a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l1"><a class="reference internal" href="PyCTBN.structure_graph.html">PyCTBN.structure_graph package</a><ul> <li class="toctree-l1"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html">PyCTBN.PyCTBN.structure_graph package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.structure_graph.html#submodules">Submodules</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.abstract_sample_path">PyCTBN.structure_graph.abstract_sample_path module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.conditional_intensity_matrix">PyCTBN.structure_graph.conditional_intensity_matrix module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.network_graph">PyCTBN.PyCTBN.structure_graph.network_graph module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.network_graph">PyCTBN.structure_graph.network_graph module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.sample_path">PyCTBN.PyCTBN.structure_graph.sample_path module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.sample_path">PyCTBN.structure_graph.sample_path module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.set_of_cims">PyCTBN.PyCTBN.structure_graph.set_of_cims module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.set_of_cims">PyCTBN.structure_graph.set_of_cims module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.structure">PyCTBN.PyCTBN.structure_graph.structure module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.sets_of_cims_container">PyCTBN.structure_graph.sets_of_cims_container module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.trajectory">PyCTBN.PyCTBN.structure_graph.trajectory module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.structure">PyCTBN.structure_graph.structure module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph">Module contents</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.trajectory">PyCTBN.structure_graph.trajectory module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph">Module contents</a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l1"><a class="reference internal" href="PyCTBN.utility.html">PyCTBN.utility package</a><ul> <li class="toctree-l1"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html">PyCTBN.PyCTBN.utility package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.utility.html#submodules">Submodules</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.utility.html#module-PyCTBN.utility.abstract_importer">PyCTBN.utility.abstract_importer module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.abstract_importer">PyCTBN.PyCTBN.utility.abstract_importer module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.utility.html#module-PyCTBN.utility.cache">PyCTBN.utility.cache module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.cache">PyCTBN.PyCTBN.utility.cache module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.utility.html#module-PyCTBN.utility.decorators">PyCTBN.utility.decorators module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.json_importer">PyCTBN.PyCTBN.utility.json_importer module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.utility.html#module-PyCTBN.utility.json_importer">PyCTBN.utility.json_importer module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.sample_importer">PyCTBN.PyCTBN.utility.sample_importer module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.utility.html#module-PyCTBN.utility.sample_importer">PyCTBN.utility.sample_importer module</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility">Module contents</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.utility.html#module-PyCTBN.utility">Module contents</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<div class="section" id="module-PyCTBN"> <div class="section" id="module-PyCTBN.PyCTBN">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-PyCTBN" title="Permalink to this headline"></a></h2> <span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-PyCTBN.PyCTBN" title="Permalink to this headline"></a></h2>
</div> </div>
</div> </div>
@ -167,6 +165,15 @@
</div> </div>
<footer> <footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="PyCTBN.PyCTBN.estimators.html" class="btn btn-neutral float-right" title="PyCTBN.PyCTBN.estimators package">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="modules.html" class="btn btn-neutral" title="PyCTBN"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/> <hr/>

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PyCTBN.optimizers package &mdash; PyCTBN 2.0 documentation</title> <title>PyCTBN.PyCTBN.optimizers package &mdash; PyCTBN 2.0 documentation</title>
@ -27,6 +27,9 @@
href="genindex.html"/> href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/> <link rel="search" title="Search" href="search.html"/>
<link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/> <link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/>
<link rel="up" title="PyCTBN.PyCTBN package" href="PyCTBN.PyCTBN.html"/>
<link rel="next" title="PyCTBN.PyCTBN.structure_graph package" href="PyCTBN.PyCTBN.structure_graph.html"/>
<link rel="prev" title="PyCTBN.PyCTBN.estimators package" href="PyCTBN.PyCTBN.estimators.html"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" /> <meta http-equiv="cache-control" content="public" />
@ -59,12 +62,10 @@
<p class="caption"><span class="caption-text">Contents:</span></p> <p class="caption"><span class="caption-text">Contents:</span></p>
<ul> <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a><ul> <li class="toctree-l1 current"><a class="reference internal" href="modules.html">PyCTBN</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="examples.html#installation-usage">Installation/Usage</a></li> <li class="toctree-l2 current"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#implementing-your-own-data-importer">Implementing your own data importer</a></li> <li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#parameters-estimation-example">Parameters Estimation Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#structure-estimation-example">Structure Estimation Example</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -107,17 +108,17 @@
<div role="main" class=""> <div role="main" class="">
<div id="content" class="hfeed entry-container hentry"> <div id="content" class="hfeed entry-container hentry">
<div class="section" id="PyCTBN-optimizers-package"> <div class="section" id="pyctbn-pyctbn-optimizers-package">
<h1>PyCTBN.optimizers package<a class="headerlink" href="#PyCTBN-optimizers-package" title="Permalink to this headline"></a></h1> <h1>PyCTBN.PyCTBN.optimizers package<a class="headerlink" href="#pyctbn-pyctbn-optimizers-package" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules"> <div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2> <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div> </div>
<div class="section" id="module-PyCTBN.optimizers.constraint_based_optimizer"> <div class="section" id="module-PyCTBN.PyCTBN.optimizers.constraint_based_optimizer">
<span id="PyCTBN-optimizers-constraint-based-optimizer-module"></span><h2>PyCTBN.optimizers.constraint_based_optimizer module<a class="headerlink" href="#module-PyCTBN.optimizers.constraint_based_optimizer" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-optimizers-constraint-based-optimizer-module"></span><h2>PyCTBN.PyCTBN.optimizers.constraint_based_optimizer module<a class="headerlink" href="#module-PyCTBN.PyCTBN.optimizers.constraint_based_optimizer" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer"> <dt id="PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.optimizers.constraint_based_optimizer.</code><code class="sig-name descname">ConstraintBasedOptimizer</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">structure_estimator</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.estimators.html#PyCTBN.estimators.structure_estimator.StructureEstimator" title="PyCTBN.estimators.structure_estimator.StructureEstimator">PyCTBN.estimators.structure_estimator.StructureEstimator</a></span></em>, <em class="sig-param"><span class="n">tot_vars_count</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.</code><code class="sig-name descname">ConstraintBasedOptimizer</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">structure_estimator</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator" title="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator">PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator</a></span></em>, <em class="sig-param"><span class="n">tot_vars_count</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#PyCTBN.optimizers.optimizer.Optimizer" title="PyCTBN.optimizers.optimizer.Optimizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.optimizers.optimizer.Optimizer</span></code></a></p> <dd><p>Bases: <a class="reference internal" href="#PyCTBN.PyCTBN.optimizers.optimizer.Optimizer" title="PyCTBN.PyCTBN.optimizers.optimizer.Optimizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.PyCTBN.optimizers.optimizer.Optimizer</span></code></a></p>
<p>Optimizer class that implement a CTPC Algorithm</p> <p>Optimizer class that implement a CTPC Algorithm</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -129,8 +130,8 @@
</dd> </dd>
</dl> </dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer.optimize_structure"> <dt id="PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer.optimize_structure">
<code class="sig-name descname">optimize_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer.optimize_structure" title="Permalink to this definition"></a></dt> <code class="sig-name descname">optimize_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer.optimize_structure" title="Permalink to this definition"></a></dt>
<dd><p>Compute Optimization process for a structure_estimator by using a CTPC Algorithm</p> <dd><p>Compute Optimization process for a structure_estimator by using a CTPC Algorithm</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Returns</dt> <dt class="field-odd">Returns</dt>
@ -145,12 +146,12 @@
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.optimizers.hill_climbing_search"> <div class="section" id="module-PyCTBN.PyCTBN.optimizers.hill_climbing_search">
<span id="PyCTBN-optimizers-hill-climbing-search-module"></span><h2>PyCTBN.optimizers.hill_climbing_search module<a class="headerlink" href="#module-PyCTBN.optimizers.hill_climbing_search" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-optimizers-hill-climbing-search-module"></span><h2>PyCTBN.PyCTBN.optimizers.hill_climbing_search module<a class="headerlink" href="#module-PyCTBN.PyCTBN.optimizers.hill_climbing_search" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.optimizers.hill_climbing_search.HillClimbing"> <dt id="PyCTBN.PyCTBN.optimizers.hill_climbing_search.HillClimbing">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.optimizers.hill_climbing_search.</code><code class="sig-name descname">HillClimbing</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">structure_estimator</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.estimators.html#PyCTBN.estimators.structure_estimator.StructureEstimator" title="PyCTBN.estimators.structure_estimator.StructureEstimator">PyCTBN.estimators.structure_estimator.StructureEstimator</a></span></em>, <em class="sig-param"><span class="n">max_parents</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">iterations_number</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">40</span></em>, <em class="sig-param"><span class="n">patience</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.optimizers.hill_climbing_search.HillClimbing" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.optimizers.hill_climbing_search.</code><code class="sig-name descname">HillClimbing</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">structure_estimator</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator" title="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator">PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator</a></span></em>, <em class="sig-param"><span class="n">max_parents</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">iterations_number</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">40</span></em>, <em class="sig-param"><span class="n">patience</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.optimizers.hill_climbing_search.HillClimbing" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#PyCTBN.optimizers.optimizer.Optimizer" title="PyCTBN.optimizers.optimizer.Optimizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.optimizers.optimizer.Optimizer</span></code></a></p> <dd><p>Bases: <a class="reference internal" href="#PyCTBN.PyCTBN.optimizers.optimizer.Optimizer" title="PyCTBN.PyCTBN.optimizers.optimizer.Optimizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.PyCTBN.optimizers.optimizer.Optimizer</span></code></a></p>
<p>Optimizer class that implement Hill Climbing Search</p> <p>Optimizer class that implement Hill Climbing Search</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -164,8 +165,8 @@
</dd> </dd>
</dl> </dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.optimizers.hill_climbing_search.HillClimbing.optimize_structure"> <dt id="PyCTBN.PyCTBN.optimizers.hill_climbing_search.HillClimbing.optimize_structure">
<code class="sig-name descname">optimize_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.optimizers.hill_climbing_search.HillClimbing.optimize_structure" title="Permalink to this definition"></a></dt> <code class="sig-name descname">optimize_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.optimizers.hill_climbing_search.HillClimbing.optimize_structure" title="Permalink to this definition"></a></dt>
<dd><p>Compute Optimization process for a structure_estimator by using a Hill Climbing Algorithm</p> <dd><p>Compute Optimization process for a structure_estimator by using a Hill Climbing Algorithm</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Returns</dt> <dt class="field-odd">Returns</dt>
@ -180,11 +181,11 @@
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.optimizers.optimizer"> <div class="section" id="module-PyCTBN.PyCTBN.optimizers.optimizer">
<span id="PyCTBN-optimizers-optimizer-module"></span><h2>PyCTBN.optimizers.optimizer module<a class="headerlink" href="#module-PyCTBN.optimizers.optimizer" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-optimizers-optimizer-module"></span><h2>PyCTBN.PyCTBN.optimizers.optimizer module<a class="headerlink" href="#module-PyCTBN.PyCTBN.optimizers.optimizer" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.optimizers.optimizer.Optimizer"> <dt id="PyCTBN.PyCTBN.optimizers.optimizer.Optimizer">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.optimizers.optimizer.</code><code class="sig-name descname">Optimizer</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">structure_estimator</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.estimators.html#PyCTBN.estimators.structure_estimator.StructureEstimator" title="PyCTBN.estimators.structure_estimator.StructureEstimator">PyCTBN.estimators.structure_estimator.StructureEstimator</a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.optimizers.optimizer.Optimizer" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.optimizers.optimizer.</code><code class="sig-name descname">Optimizer</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">structure_estimator</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator" title="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator">PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator</a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.optimizers.optimizer.Optimizer" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">abc.ABC</span></code></p> <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">abc.ABC</span></code></p>
<p>Interface class for all the optimizer’s child PyCTBN</p> <p>Interface class for all the optimizer’s child PyCTBN</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -196,8 +197,8 @@
</dd> </dd>
</dl> </dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.optimizers.optimizer.Optimizer.optimize_structure"> <dt id="PyCTBN.PyCTBN.optimizers.optimizer.Optimizer.optimize_structure">
<em class="property">abstract </em><code class="sig-name descname">optimize_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.optimizers.optimizer.Optimizer.optimize_structure" title="Permalink to this definition"></a></dt> <em class="property">abstract </em><code class="sig-name descname">optimize_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.optimizers.optimizer.Optimizer.optimize_structure" title="Permalink to this definition"></a></dt>
<dd><p>Compute Optimization process for a structure_estimator</p> <dd><p>Compute Optimization process for a structure_estimator</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Returns</dt> <dt class="field-odd">Returns</dt>
@ -212,12 +213,12 @@
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.optimizers.tabu_search"> <div class="section" id="module-PyCTBN.PyCTBN.optimizers.tabu_search">
<span id="PyCTBN-optimizers-tabu-search-module"></span><h2>PyCTBN.optimizers.tabu_search module<a class="headerlink" href="#module-PyCTBN.optimizers.tabu_search" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-optimizers-tabu-search-module"></span><h2>PyCTBN.PyCTBN.optimizers.tabu_search module<a class="headerlink" href="#module-PyCTBN.PyCTBN.optimizers.tabu_search" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.optimizers.tabu_search.TabuSearch"> <dt id="PyCTBN.PyCTBN.optimizers.tabu_search.TabuSearch">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.optimizers.tabu_search.</code><code class="sig-name descname">TabuSearch</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">structure_estimator</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.estimators.html#PyCTBN.estimators.structure_estimator.StructureEstimator" title="PyCTBN.estimators.structure_estimator.StructureEstimator">PyCTBN.estimators.structure_estimator.StructureEstimator</a></span></em>, <em class="sig-param"><span class="n">max_parents</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">iterations_number</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">40</span></em>, <em class="sig-param"><span class="n">patience</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tabu_length</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tabu_rules_duration</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.optimizers.tabu_search.TabuSearch" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.optimizers.tabu_search.</code><code class="sig-name descname">TabuSearch</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">structure_estimator</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator" title="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator">PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator</a></span></em>, <em class="sig-param"><span class="n">max_parents</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">iterations_number</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">40</span></em>, <em class="sig-param"><span class="n">patience</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tabu_length</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tabu_rules_duration</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.optimizers.tabu_search.TabuSearch" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#PyCTBN.optimizers.optimizer.Optimizer" title="PyCTBN.optimizers.optimizer.Optimizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.optimizers.optimizer.Optimizer</span></code></a></p> <dd><p>Bases: <a class="reference internal" href="#PyCTBN.PyCTBN.optimizers.optimizer.Optimizer" title="PyCTBN.PyCTBN.optimizers.optimizer.Optimizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.PyCTBN.optimizers.optimizer.Optimizer</span></code></a></p>
<p>Optimizer class that implement Tabu Search</p> <p>Optimizer class that implement Tabu Search</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -233,8 +234,8 @@
</dd> </dd>
</dl> </dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.optimizers.tabu_search.TabuSearch.optimize_structure"> <dt id="PyCTBN.PyCTBN.optimizers.tabu_search.TabuSearch.optimize_structure">
<code class="sig-name descname">optimize_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.optimizers.tabu_search.TabuSearch.optimize_structure" title="Permalink to this definition"></a></dt> <code class="sig-name descname">optimize_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.optimizers.tabu_search.TabuSearch.optimize_structure" title="Permalink to this definition"></a></dt>
<dd><p>Compute Optimization process for a structure_estimator by using a Hill Climbing Algorithm</p> <dd><p>Compute Optimization process for a structure_estimator by using a Hill Climbing Algorithm</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Returns</dt> <dt class="field-odd">Returns</dt>
@ -249,8 +250,8 @@
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.optimizers"> <div class="section" id="module-PyCTBN.PyCTBN.optimizers">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-PyCTBN.optimizers" title="Permalink to this headline"></a></h2> <span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-PyCTBN.PyCTBN.optimizers" title="Permalink to this headline"></a></h2>
</div> </div>
</div> </div>
@ -258,6 +259,15 @@
</div> </div>
<footer> <footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="PyCTBN.PyCTBN.structure_graph.html" class="btn btn-neutral float-right" title="PyCTBN.PyCTBN.structure_graph package">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="PyCTBN.PyCTBN.estimators.html" class="btn btn-neutral" title="PyCTBN.PyCTBN.estimators package"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/> <hr/>

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PyCTBN.structure_graph package &mdash; PyCTBN 2.0 documentation</title> <title>PyCTBN.PyCTBN.structure_graph package &mdash; PyCTBN 2.0 documentation</title>
@ -27,6 +27,9 @@
href="genindex.html"/> href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/> <link rel="search" title="Search" href="search.html"/>
<link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/> <link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/>
<link rel="up" title="PyCTBN.PyCTBN package" href="PyCTBN.PyCTBN.html"/>
<link rel="next" title="PyCTBN.PyCTBN.utility package" href="PyCTBN.PyCTBN.utility.html"/>
<link rel="prev" title="PyCTBN.PyCTBN.optimizers package" href="PyCTBN.PyCTBN.optimizers.html"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" /> <meta http-equiv="cache-control" content="public" />
@ -59,12 +62,10 @@
<p class="caption"><span class="caption-text">Contents:</span></p> <p class="caption"><span class="caption-text">Contents:</span></p>
<ul> <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a><ul> <li class="toctree-l1 current"><a class="reference internal" href="modules.html">PyCTBN</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="examples.html#installation-usage">Installation/Usage</a></li> <li class="toctree-l2 current"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#implementing-your-own-data-importer">Implementing your own data importer</a></li> <li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#parameters-estimation-example">Parameters Estimation Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#structure-estimation-example">Structure Estimation Example</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -107,54 +108,16 @@
<div role="main" class=""> <div role="main" class="">
<div id="content" class="hfeed entry-container hentry"> <div id="content" class="hfeed entry-container hentry">
<div class="section" id="PyCTBN-structure-graph-package"> <div class="section" id="pyctbn-pyctbn-structure-graph-package">
<h1>PyCTBN.structure_graph package<a class="headerlink" href="#PyCTBN-structure-graph-package" title="Permalink to this headline"></a></h1> <h1>PyCTBN.PyCTBN.structure_graph package<a class="headerlink" href="#pyctbn-pyctbn-structure-graph-package" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules"> <div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2> <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div> </div>
<div class="section" id="module-PyCTBN.structure_graph.abstract_sample_path"> <div class="section" id="module-PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix">
<span id="PyCTBN-structure-graph-abstract-sample-path-module"></span><h2>PyCTBN.structure_graph.abstract_sample_path module<a class="headerlink" href="#module-PyCTBN.structure_graph.abstract_sample_path" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-structure-graph-conditional-intensity-matrix-module"></span><h2>PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix module<a class="headerlink" href="#module-PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.structure_graph.abstract_sample_path.AbstractSamplePath"> <dt id="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.structure_graph.abstract_sample_path.</code><code class="sig-name descname">AbstractSamplePath</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">importer</span><span class="p">:</span> <span class="n">utility.abstract_importer.AbstractImporter</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.abstract_sample_path.AbstractSamplePath" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.</code><code class="sig-name descname">ConditionalIntensityMatrix</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">state_residence_times</span><span class="p">:</span> <span class="n">numpy.array</span></em>, <em class="sig-param"><span class="n">state_transition_matrix</span><span class="p">:</span> <span class="n">numpy.array</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">abc.ABC</span></code></p>
<dl class="py method">
<dt id="PyCTBN.structure_graph.abstract_sample_path.AbstractSamplePath.build_structure">
<em class="property">abstract </em><code class="sig-name descname">build_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.abstract_sample_path.AbstractSamplePath.build_structure" title="Permalink to this definition"></a></dt>
<dd><p>Builds the Structure object that aggregates all the infos about the net.
Assigns the Structure object to the instance attribuite _structure
Parameters:</p>
<blockquote>
<div><p>void</p>
</div></blockquote>
<dl class="simple">
<dt>Returns:</dt><dd><p>void</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.structure_graph.abstract_sample_path.AbstractSamplePath.build_trajectories">
<em class="property">abstract </em><code class="sig-name descname">build_trajectories</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.abstract_sample_path.AbstractSamplePath.build_trajectories" title="Permalink to this definition"></a></dt>
<dd><p>Builds the Trajectory object that will contain all the trajectories.
Assigns the Trajectoriy object to the instance attribute _trajectories
Clears all the unused dataframes in Importer Object</p>
<dl class="simple">
<dt>Parameters:</dt><dd><p>void</p>
</dd>
<dt>Returns:</dt><dd><p>void</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.structure_graph.conditional_intensity_matrix">
<span id="PyCTBN-structure-graph-conditional-intensity-matrix-module"></span><h2>PyCTBN.structure_graph.conditional_intensity_matrix module<a class="headerlink" href="#module-PyCTBN.structure_graph.conditional_intensity_matrix" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.structure_graph.conditional_intensity_matrix.</code><code class="sig-name descname">ConditionalIntensityMatrix</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">state_residence_times</span><span class="p">:</span> <span class="n">numpy.array</span></em>, <em class="sig-param"><span class="n">state_transition_matrix</span><span class="p">:</span> <span class="n">numpy.array</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Abstracts the Conditional Intesity matrix of a node as aggregation of the state residence times vector <p>Abstracts the Conditional Intesity matrix of a node as aggregation of the state residence times vector
and state transition matrix and the actual CIM matrix.</p> and state transition matrix and the actual CIM matrix.</p>
@ -170,41 +133,41 @@ and state transition matrix and the actual CIM matrix.</p>
</dd> </dd>
</dl> </dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.cim"> <dt id="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.cim">
<em class="property">property </em><code class="sig-name descname">cim</code><a class="headerlink" href="#PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.cim" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">cim</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.cim" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.compute_cim_coefficients"> <dt id="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.compute_cim_coefficients">
<code class="sig-name descname">compute_cim_coefficients</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.compute_cim_coefficients" title="Permalink to this definition"></a></dt> <code class="sig-name descname">compute_cim_coefficients</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.compute_cim_coefficients" title="Permalink to this definition"></a></dt>
<dd><p>Compute the coefficients of the matrix _cim by using the following equality q_xx’ = M[x, x’] / T[x]. <dd><p>Compute the coefficients of the matrix _cim by using the following equality q_xx’ = M[x, x’] / T[x].
The class member <code class="docutils literal notranslate"><span class="pre">_cim</span></code> will contain the computed cim</p> The class member <code class="docutils literal notranslate"><span class="pre">_cim</span></code> will contain the computed cim</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.state_residence_times"> <dt id="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.state_residence_times">
<em class="property">property </em><code class="sig-name descname">state_residence_times</code><a class="headerlink" href="#PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.state_residence_times" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">state_residence_times</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.state_residence_times" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.state_transition_matrix"> <dt id="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.state_transition_matrix">
<em class="property">property </em><code class="sig-name descname">state_transition_matrix</code><a class="headerlink" href="#PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.state_transition_matrix" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">state_transition_matrix</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.state_transition_matrix" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.structure_graph.network_graph"> <div class="section" id="module-PyCTBN.PyCTBN.structure_graph.network_graph">
<span id="PyCTBN-structure-graph-network-graph-module"></span><h2>PyCTBN.structure_graph.network_graph module<a class="headerlink" href="#module-PyCTBN.structure_graph.network_graph" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-structure-graph-network-graph-module"></span><h2>PyCTBN.PyCTBN.structure_graph.network_graph module<a class="headerlink" href="#module-PyCTBN.PyCTBN.structure_graph.network_graph" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.structure_graph.network_graph.</code><code class="sig-name descname">NetworkGraph</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">graph_struct</span><span class="p">:</span> <span class="n"><a class="reference internal" href="#PyCTBN.structure_graph.structure.Structure" title="PyCTBN.structure_graph.structure.Structure">PyCTBN.structure_graph.structure.Structure</a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.structure_graph.network_graph.</code><code class="sig-name descname">NetworkGraph</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">graph_struct</span><span class="p">:</span> <span class="n"><a class="reference internal" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure" title="PyCTBN.PyCTBN.structure_graph.structure.Structure">PyCTBN.PyCTBN.structure_graph.structure.Structure</a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Abstracts the infos contained in the Structure class in the form of a directed graph. <p>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</p> Has the task of creating all the necessary filtering and indexing structures for parameters estimation</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>graph_struct</strong> (<a class="reference internal" href="#PyCTBN.structure_graph.structure.Structure" title="PyCTBN.structure_graph.structure.Structure"><em>Structure</em></a>) – the <code class="docutils literal notranslate"><span class="pre">Structure</span></code> object from which infos about the net will be extracted</p> <dd class="field-odd"><p><strong>graph_struct</strong> (<a class="reference internal" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure" title="PyCTBN.PyCTBN.structure_graph.structure.Structure"><em>Structure</em></a>) – the <code class="docutils literal notranslate"><span class="pre">Structure</span></code> object from which infos about the net will be extracted</p>
</dd> </dd>
<dt class="field-even">_graph</dt> <dt class="field-even">_graph</dt>
<dd class="field-even"><p>directed graph</p> <dd class="field-even"><p>directed graph</p>
@ -231,8 +194,8 @@ from one state to another</p>
</dd> </dd>
</dl> </dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.add_edges"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.add_edges">
<code class="sig-name descname">add_edges</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">list_of_edges</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.add_edges" title="Permalink to this definition"></a></dt> <code class="sig-name descname">add_edges</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">list_of_edges</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.add_edges" title="Permalink to this definition"></a></dt>
<dd><p>Add the edges to the <code class="docutils literal notranslate"><span class="pre">_graph</span></code> contained in the list <code class="docutils literal notranslate"><span class="pre">list_of_edges</span></code>.</p> <dd><p>Add the edges to the <code class="docutils literal notranslate"><span class="pre">_graph</span></code> contained in the list <code class="docutils literal notranslate"><span class="pre">list_of_edges</span></code>.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -242,8 +205,8 @@ from one state to another</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.add_nodes"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.add_nodes">
<code class="sig-name descname">add_nodes</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">list_of_nodes</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.add_nodes" title="Permalink to this definition"></a></dt> <code class="sig-name descname">add_nodes</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">list_of_nodes</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.add_nodes" title="Permalink to this definition"></a></dt>
<dd><p>Adds the nodes to the <code class="docutils literal notranslate"><span class="pre">_graph</span></code> contained in the list of nodes <code class="docutils literal notranslate"><span class="pre">list_of_nodes</span></code>. <dd><p>Adds the nodes to the <code class="docutils literal notranslate"><span class="pre">_graph</span></code> contained in the list of nodes <code class="docutils literal notranslate"><span class="pre">list_of_nodes</span></code>.
Sets all the properties that identify a nodes (index, positional index, cardinality)</p> Sets all the properties that identify a nodes (index, positional index, cardinality)</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -254,8 +217,8 @@ Sets all the properties that identify a nodes (index, positional index, cardinal
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.build_p_comb_structure_for_a_node"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_p_comb_structure_for_a_node">
<em class="property">static </em><code class="sig-name descname">build_p_comb_structure_for_a_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">parents_values</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.build_p_comb_structure_for_a_node" title="Permalink to this definition"></a></dt> <em class="property">static </em><code class="sig-name descname">build_p_comb_structure_for_a_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">parents_values</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_p_comb_structure_for_a_node" title="Permalink to this definition"></a></dt>
<dd><p>Builds the combinatorial structure that contains the combinations of all the values contained in <dd><p>Builds the combinatorial structure that contains the combinations of all the values contained in
<code class="docutils literal notranslate"><span class="pre">parents_values</span></code>.</p> <code class="docutils literal notranslate"><span class="pre">parents_values</span></code>.</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -272,8 +235,8 @@ Sets all the properties that identify a nodes (index, positional index, cardinal
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.build_time_columns_filtering_for_a_node"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_time_columns_filtering_for_a_node">
<em class="property">static </em><code class="sig-name descname">build_time_columns_filtering_for_a_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_indx</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">p_indxs</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.build_time_columns_filtering_for_a_node" title="Permalink to this definition"></a></dt> <em class="property">static </em><code class="sig-name descname">build_time_columns_filtering_for_a_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_indx</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">p_indxs</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_time_columns_filtering_for_a_node" title="Permalink to this definition"></a></dt>
<dd><p>Builds the necessary structure to filter the desired columns indicated by <code class="docutils literal notranslate"><span class="pre">node_indx</span></code> and <code class="docutils literal notranslate"><span class="pre">p_indxs</span></code> <dd><p>Builds the necessary structure to filter the desired columns indicated by <code class="docutils literal notranslate"><span class="pre">node_indx</span></code> and <code class="docutils literal notranslate"><span class="pre">p_indxs</span></code>
in the dataset. in the dataset.
This structute will be used in the computation of the state res times. This structute will be used in the computation of the state res times.
@ -286,8 +249,8 @@ This structute will be used in the computation of the state res times.
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.build_time_scalar_indexing_structure_for_a_node"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_time_scalar_indexing_structure_for_a_node">
<em class="property">static </em><code class="sig-name descname">build_time_scalar_indexing_structure_for_a_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_states</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">parents_vals</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.build_time_scalar_indexing_structure_for_a_node" title="Permalink to this definition"></a></dt> <em class="property">static </em><code class="sig-name descname">build_time_scalar_indexing_structure_for_a_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_states</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">parents_vals</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_time_scalar_indexing_structure_for_a_node" title="Permalink to this definition"></a></dt>
<dd><p>Builds an indexing structure for the computation of state residence times values.</p> <dd><p>Builds an indexing structure for the computation of state residence times values.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -306,8 +269,8 @@ This structute will be used in the computation of the state res times.
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.build_transition_filtering_for_a_node"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_transition_filtering_for_a_node">
<em class="property">static </em><code class="sig-name descname">build_transition_filtering_for_a_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_indx</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">p_indxs</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">nodes_number</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.build_transition_filtering_for_a_node" title="Permalink to this definition"></a></dt> <em class="property">static </em><code class="sig-name descname">build_transition_filtering_for_a_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_indx</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">p_indxs</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">nodes_number</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_transition_filtering_for_a_node" title="Permalink to this definition"></a></dt>
<dd><p>Builds the necessary structure to filter the desired columns indicated by <code class="docutils literal notranslate"><span class="pre">node_indx</span></code> and <code class="docutils literal notranslate"><span class="pre">p_indxs</span></code> <dd><p>Builds the necessary structure to filter the desired columns indicated by <code class="docutils literal notranslate"><span class="pre">node_indx</span></code> and <code class="docutils literal notranslate"><span class="pre">p_indxs</span></code>
in the dataset. in the dataset.
This structure will be used in the computation of the state transitions values. This structure will be used in the computation of the state transitions values.
@ -322,8 +285,8 @@ This structure will be used in the computation of the state transitions values.
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.build_transition_scalar_indexing_structure_for_a_node"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_transition_scalar_indexing_structure_for_a_node">
<em class="property">static </em><code class="sig-name descname">build_transition_scalar_indexing_structure_for_a_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_states_number</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">parents_vals</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.build_transition_scalar_indexing_structure_for_a_node" title="Permalink to this definition"></a></dt> <em class="property">static </em><code class="sig-name descname">build_transition_scalar_indexing_structure_for_a_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_states_number</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">parents_vals</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_transition_scalar_indexing_structure_for_a_node" title="Permalink to this definition"></a></dt>
<dd><p>Builds an indexing structure for the computation of state transitions values.</p> <dd><p>Builds an indexing structure for the computation of state transitions values.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -342,19 +305,19 @@ This structure will be used in the computation of the state transitions values.
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.clear_indexing_filtering_structures"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.clear_indexing_filtering_structures">
<code class="sig-name descname">clear_indexing_filtering_structures</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.clear_indexing_filtering_structures" title="Permalink to this definition"></a></dt> <code class="sig-name descname">clear_indexing_filtering_structures</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.clear_indexing_filtering_structures" title="Permalink to this definition"></a></dt>
<dd><p>Initialize all the filtering/indexing structures.</p> <dd><p>Initialize all the filtering/indexing structures.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.edges"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.edges">
<em class="property">property </em><code class="sig-name descname">edges</code><a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.edges" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">edges</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.edges" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.fast_init"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.fast_init">
<code class="sig-name descname">fast_init</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.fast_init" title="Permalink to this definition"></a></dt> <code class="sig-name descname">fast_init</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.fast_init" title="Permalink to this definition"></a></dt>
<dd><p>Initializes all the necessary structures for parameters estimation of the node identified by the label <dd><p>Initializes all the necessary structures for parameters estimation of the node identified by the label
node_id</p> node_id</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -365,13 +328,13 @@ node_id</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.get_node_indx"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_node_indx">
<code class="sig-name descname">get_node_indx</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.get_node_indx" title="Permalink to this definition"></a></dt> <code class="sig-name descname">get_node_indx</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_node_indx" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.get_ordered_by_indx_set_of_parents"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_ordered_by_indx_set_of_parents">
<code class="sig-name descname">get_ordered_by_indx_set_of_parents</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; Tuple<a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.get_ordered_by_indx_set_of_parents" title="Permalink to this definition"></a></dt> <code class="sig-name descname">get_ordered_by_indx_set_of_parents</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; Tuple<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_ordered_by_indx_set_of_parents" title="Permalink to this definition"></a></dt>
<dd><p>Builds the aggregated structure that holds all the infos relative to the parent set of the node, namely <dd><p>Builds the aggregated structure that holds all the infos relative to the parent set of the node, namely
(parents_labels, parents_indexes, parents_cardinalities).</p> (parents_labels, parents_indexes, parents_cardinalities).</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -388,8 +351,8 @@ node_id</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.get_parents_by_id"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_parents_by_id">
<code class="sig-name descname">get_parents_by_id</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.get_parents_by_id" title="Permalink to this definition"></a></dt> <code class="sig-name descname">get_parents_by_id</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_parents_by_id" title="Permalink to this definition"></a></dt>
<dd><p>Returns a list of labels of the parents of the node <code class="docutils literal notranslate"><span class="pre">node_id</span></code></p> <dd><p>Returns a list of labels of the parents of the node <code class="docutils literal notranslate"><span class="pre">node_id</span></code></p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -405,18 +368,18 @@ node_id</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.get_positional_node_indx"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_positional_node_indx">
<code class="sig-name descname">get_positional_node_indx</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.get_positional_node_indx" title="Permalink to this definition"></a></dt> <code class="sig-name descname">get_positional_node_indx</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_positional_node_indx" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.get_states_number"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_states_number">
<code class="sig-name descname">get_states_number</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.get_states_number" title="Permalink to this definition"></a></dt> <code class="sig-name descname">get_states_number</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_states_number" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.has_edge"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.has_edge">
<code class="sig-name descname">has_edge</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">edge</span><span class="p">:</span> <span class="n">tuple</span></em><span class="sig-paren">)</span> &#x2192; bool<a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.has_edge" title="Permalink to this definition"></a></dt> <code class="sig-name descname">has_edge</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">edge</span><span class="p">:</span> <span class="n">tuple</span></em><span class="sig-paren">)</span> &#x2192; bool<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.has_edge" title="Permalink to this definition"></a></dt>
<dd><p>Check if the graph contains a specific edge</p> <dd><p>Check if the graph contains a specific edge</p>
<dl class="simple"> <dl class="simple">
<dt>Parameters:</dt><dd><p>edge: a tuple that rappresents the edge</p> <dt>Parameters:</dt><dd><p>edge: a tuple that rappresents the edge</p>
@ -427,33 +390,28 @@ node_id</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.init_graph"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.nodes">
<code class="sig-name descname">init_graph</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.init_graph" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">nodes</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.nodes" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.nodes">
<em class="property">property </em><code class="sig-name descname">nodes</code><a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.nodes" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.nodes_indexes"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.nodes_indexes">
<em class="property">property </em><code class="sig-name descname">nodes_indexes</code><a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.nodes_indexes" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">nodes_indexes</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.nodes_indexes" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.nodes_values"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.nodes_values">
<em class="property">property </em><code class="sig-name descname">nodes_values</code><a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.nodes_values" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">nodes_values</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.nodes_values" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.p_combs"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.p_combs">
<em class="property">property </em><code class="sig-name descname">p_combs</code><a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.p_combs" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">p_combs</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.p_combs" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.remove_edges"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.remove_edges">
<code class="sig-name descname">remove_edges</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">list_of_edges</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.remove_edges" title="Permalink to this definition"></a></dt> <code class="sig-name descname">remove_edges</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">list_of_edges</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.remove_edges" title="Permalink to this definition"></a></dt>
<dd><p>Remove the edges to the graph contained in the list list_of_edges.</p> <dd><p>Remove the edges to the graph contained in the list list_of_edges.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -463,47 +421,47 @@ node_id</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.remove_node"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.remove_node">
<code class="sig-name descname">remove_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.remove_node" title="Permalink to this definition"></a></dt> <code class="sig-name descname">remove_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.remove_node" title="Permalink to this definition"></a></dt>
<dd><p>Remove the node <code class="docutils literal notranslate"><span class="pre">node_id</span></code> from all the class members. <dd><p>Remove the node <code class="docutils literal notranslate"><span class="pre">node_id</span></code> from all the class members.
Initialize all the filtering/indexing structures.</p> Initialize all the filtering/indexing structures.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.time_filtering"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.time_filtering">
<em class="property">property </em><code class="sig-name descname">time_filtering</code><a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.time_filtering" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">time_filtering</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.time_filtering" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.time_scalar_indexing_strucure"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.time_scalar_indexing_strucure">
<em class="property">property </em><code class="sig-name descname">time_scalar_indexing_strucure</code><a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.time_scalar_indexing_strucure" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">time_scalar_indexing_strucure</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.time_scalar_indexing_strucure" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.transition_filtering"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.transition_filtering">
<em class="property">property </em><code class="sig-name descname">transition_filtering</code><a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.transition_filtering" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">transition_filtering</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.transition_filtering" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.network_graph.NetworkGraph.transition_scalar_indexing_structure"> <dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.transition_scalar_indexing_structure">
<em class="property">property </em><code class="sig-name descname">transition_scalar_indexing_structure</code><a class="headerlink" href="#PyCTBN.structure_graph.network_graph.NetworkGraph.transition_scalar_indexing_structure" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">transition_scalar_indexing_structure</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.transition_scalar_indexing_structure" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.structure_graph.sample_path"> <div class="section" id="module-PyCTBN.PyCTBN.structure_graph.sample_path">
<span id="PyCTBN-structure-graph-sample-path-module"></span><h2>PyCTBN.structure_graph.sample_path module<a class="headerlink" href="#module-PyCTBN.structure_graph.sample_path" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-structure-graph-sample-path-module"></span><h2>PyCTBN.PyCTBN.structure_graph.sample_path module<a class="headerlink" href="#module-PyCTBN.PyCTBN.structure_graph.sample_path" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.structure_graph.sample_path.SamplePath"> <dt id="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.structure_graph.sample_path.</code><code class="sig-name descname">SamplePath</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">importer</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.utility.html#PyCTBN.utility.abstract_importer.AbstractImporter" title="PyCTBN.utility.abstract_importer.AbstractImporter">PyCTBN.utility.abstract_importer.AbstractImporter</a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.sample_path.SamplePath" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.structure_graph.sample_path.</code><code class="sig-name descname">SamplePath</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">importer</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter" title="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter">PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter</a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Aggregates all the informations about the trajectories, the real structure of the sampled net and variables <p>Aggregates all the informations about the trajectories, the real structure of the sampled net and variables
cardinalites. Has the task of creating the objects <code class="docutils literal notranslate"><span class="pre">Trajectory</span></code> and <code class="docutils literal notranslate"><span class="pre">Structure</span></code> that will cardinalites. Has the task of creating the objects <code class="docutils literal notranslate"><span class="pre">Trajectory</span></code> and <code class="docutils literal notranslate"><span class="pre">Structure</span></code> that will
contain the mentioned data.</p> contain the mentioned data.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>importer</strong> (<a class="reference internal" href="PyCTBN.utility.html#PyCTBN.utility.abstract_importer.AbstractImporter" title="PyCTBN.utility.abstract_importer.AbstractImporter"><em>AbstractImporter</em></a>) – the Importer object which contains the imported and processed data</p> <dd class="field-odd"><p><strong>importer</strong> (<a class="reference internal" href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter" title="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter"><em>AbstractImporter</em></a>) – the Importer object which contains the imported and processed data</p>
</dd> </dd>
<dt class="field-even">_trajectories</dt> <dt class="field-even">_trajectories</dt>
<dd class="field-even"><p>the <code class="docutils literal notranslate"><span class="pre">Trajectory</span></code> object that will contain all the concatenated trajectories</p> <dd class="field-even"><p>the <code class="docutils literal notranslate"><span class="pre">Trajectory</span></code> object that will contain all the concatenated trajectories</p>
@ -516,51 +474,51 @@ contain the mentioned data.</p>
</dd> </dd>
</dl> </dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.sample_path.SamplePath.build_structure"> <dt id="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.build_structure">
<code class="sig-name descname">build_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.structure_graph.sample_path.SamplePath.build_structure" title="Permalink to this definition"></a></dt> <code class="sig-name descname">build_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.build_structure" title="Permalink to this definition"></a></dt>
<dd><p>Builds the <code class="docutils literal notranslate"><span class="pre">Structure</span></code> object that aggregates all the infos about the net.</p> <dd><p>Builds the <code class="docutils literal notranslate"><span class="pre">Structure</span></code> object that aggregates all the infos about the net.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.sample_path.SamplePath.build_trajectories"> <dt id="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.build_trajectories">
<code class="sig-name descname">build_trajectories</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.structure_graph.sample_path.SamplePath.build_trajectories" title="Permalink to this definition"></a></dt> <code class="sig-name descname">build_trajectories</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.build_trajectories" title="Permalink to this definition"></a></dt>
<dd><p>Builds the Trajectory object that will contain all the trajectories. <dd><p>Builds the Trajectory object that will contain all the trajectories.
Clears all the unused dataframes in <code class="docutils literal notranslate"><span class="pre">_importer</span></code> Object</p> Clears all the unused dataframes in <code class="docutils literal notranslate"><span class="pre">_importer</span></code> Object</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.sample_path.SamplePath.clear_memory"> <dt id="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.clear_memory">
<code class="sig-name descname">clear_memory</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.sample_path.SamplePath.clear_memory" title="Permalink to this definition"></a></dt> <code class="sig-name descname">clear_memory</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.clear_memory" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.sample_path.SamplePath.has_prior_net_structure"> <dt id="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.has_prior_net_structure">
<em class="property">property </em><code class="sig-name descname">has_prior_net_structure</code><a class="headerlink" href="#PyCTBN.structure_graph.sample_path.SamplePath.has_prior_net_structure" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">has_prior_net_structure</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.has_prior_net_structure" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.sample_path.SamplePath.structure"> <dt id="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.structure">
<em class="property">property </em><code class="sig-name descname">structure</code><a class="headerlink" href="#PyCTBN.structure_graph.sample_path.SamplePath.structure" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">structure</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.structure" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.sample_path.SamplePath.total_variables_count"> <dt id="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.total_variables_count">
<em class="property">property </em><code class="sig-name descname">total_variables_count</code><a class="headerlink" href="#PyCTBN.structure_graph.sample_path.SamplePath.total_variables_count" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">total_variables_count</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.total_variables_count" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.sample_path.SamplePath.trajectories"> <dt id="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.trajectories">
<em class="property">property </em><code class="sig-name descname">trajectories</code><a class="headerlink" href="#PyCTBN.structure_graph.sample_path.SamplePath.trajectories" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">trajectories</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.trajectories" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.structure_graph.set_of_cims"> <div class="section" id="module-PyCTBN.PyCTBN.structure_graph.set_of_cims">
<span id="PyCTBN-structure-graph-set-of-cims-module"></span><h2>PyCTBN.structure_graph.set_of_cims module<a class="headerlink" href="#module-PyCTBN.structure_graph.set_of_cims" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-structure-graph-set-of-cims-module"></span><h2>PyCTBN.PyCTBN.structure_graph.set_of_cims module<a class="headerlink" href="#module-PyCTBN.PyCTBN.structure_graph.set_of_cims" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.structure_graph.set_of_cims.SetOfCims"> <dt id="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.structure_graph.set_of_cims.</code><code class="sig-name descname">SetOfCims</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">parents_states_number</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">node_states_number</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">p_combs</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.set_of_cims.SetOfCims" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.structure_graph.set_of_cims.</code><code class="sig-name descname">SetOfCims</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">parents_states_number</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">node_states_number</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">p_combs</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Aggregates all the CIMS of the node identified by the label _node_id.</p> <p>Aggregates all the CIMS of the node identified by the label _node_id.</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -583,13 +541,13 @@ Clears all the unused dataframes in <code class="docutils literal notranslate"><
</dd> </dd>
</dl> </dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.set_of_cims.SetOfCims.actual_cims"> <dt id="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.actual_cims">
<em class="property">property </em><code class="sig-name descname">actual_cims</code><a class="headerlink" href="#PyCTBN.structure_graph.set_of_cims.SetOfCims.actual_cims" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">actual_cims</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.actual_cims" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.set_of_cims.SetOfCims.build_cims"> <dt id="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.build_cims">
<code class="sig-name descname">build_cims</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">state_res_times</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">transition_matrices</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.structure_graph.set_of_cims.SetOfCims.build_cims" title="Permalink to this definition"></a></dt> <code class="sig-name descname">build_cims</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">state_res_times</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">transition_matrices</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.build_cims" title="Permalink to this definition"></a></dt>
<dd><p>Build the <code class="docutils literal notranslate"><span class="pre">ConditionalIntensityMatrix</span></code> objects given the state residence times and transitions matrices. <dd><p>Build the <code class="docutils literal notranslate"><span class="pre">ConditionalIntensityMatrix</span></code> objects given the state residence times and transitions matrices.
Compute the cim coefficients.The class member <code class="docutils literal notranslate"><span class="pre">_actual_cims</span></code> will contain the computed cims.</p> Compute the cim coefficients.The class member <code class="docutils literal notranslate"><span class="pre">_actual_cims</span></code> will contain the computed cims.</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -603,14 +561,14 @@ Compute the cim coefficients.The class member <code class="docutils literal notr
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.set_of_cims.SetOfCims.build_times_and_transitions_structures"> <dt id="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.build_times_and_transitions_structures">
<code class="sig-name descname">build_times_and_transitions_structures</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.structure_graph.set_of_cims.SetOfCims.build_times_and_transitions_structures" title="Permalink to this definition"></a></dt> <code class="sig-name descname">build_times_and_transitions_structures</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.build_times_and_transitions_structures" title="Permalink to this definition"></a></dt>
<dd><p>Initializes at the correct dimensions the state residence times matrix and the state transition matrices.</p> <dd><p>Initializes at the correct dimensions the state residence times matrix and the state transition matrices.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.set_of_cims.SetOfCims.filter_cims_with_mask"> <dt id="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.filter_cims_with_mask">
<code class="sig-name descname">filter_cims_with_mask</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mask_arr</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">comb</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.structure_graph.set_of_cims.SetOfCims.filter_cims_with_mask" title="Permalink to this definition"></a></dt> <code class="sig-name descname">filter_cims_with_mask</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mask_arr</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">comb</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.filter_cims_with_mask" title="Permalink to this definition"></a></dt>
<dd><p>Filter the cims contained in the array <code class="docutils literal notranslate"><span class="pre">_actual_cims</span></code> given the boolean mask <code class="docutils literal notranslate"><span class="pre">mask_arr</span></code> and the index <dd><p>Filter the cims contained in the array <code class="docutils literal notranslate"><span class="pre">_actual_cims</span></code> given the boolean mask <code class="docutils literal notranslate"><span class="pre">mask_arr</span></code> and the index
<code class="docutils literal notranslate"><span class="pre">comb</span></code>.</p> <code class="docutils literal notranslate"><span class="pre">comb</span></code>.</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -630,53 +588,23 @@ Compute the cim coefficients.The class member <code class="docutils literal notr
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.set_of_cims.SetOfCims.get_cims_number"> <dt id="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.get_cims_number">
<code class="sig-name descname">get_cims_number</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.set_of_cims.SetOfCims.get_cims_number" title="Permalink to this definition"></a></dt> <code class="sig-name descname">get_cims_number</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.get_cims_number" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.set_of_cims.SetOfCims.p_combs"> <dt id="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.p_combs">
<em class="property">property </em><code class="sig-name descname">p_combs</code><a class="headerlink" href="#PyCTBN.structure_graph.set_of_cims.SetOfCims.p_combs" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">p_combs</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.p_combs" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.structure_graph.sets_of_cims_container"> <div class="section" id="module-PyCTBN.PyCTBN.structure_graph.structure">
<span id="PyCTBN-structure-graph-sets-of-cims-container-module"></span><h2>PyCTBN.structure_graph.sets_of_cims_container module<a class="headerlink" href="#module-PyCTBN.structure_graph.sets_of_cims_container" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-structure-graph-structure-module"></span><h2>PyCTBN.PyCTBN.structure_graph.structure module<a class="headerlink" href="#module-PyCTBN.PyCTBN.structure_graph.structure" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.structure_graph.sets_of_cims_container.SetsOfCimsContainer"> <dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.structure_graph.sets_of_cims_container.</code><code class="sig-name descname">SetsOfCimsContainer</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">list_of_keys</span></em>, <em class="sig-param"><span class="n">states_number_per_node</span></em>, <em class="sig-param"><span class="n">list_of_parents_states_number</span></em>, <em class="sig-param"><span class="n">p_combs_list</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.sets_of_cims_container.SetsOfCimsContainer" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.structure_graph.structure.</code><code class="sig-name descname">Structure</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">nodes_labels_list</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">nodes_indexes_arr</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">nodes_vals_arr</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">edges_list</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">total_variables_number</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Aggrega un insieme di oggetti SetOfCims</p>
<dl class="py method">
<dt id="PyCTBN.structure_graph.sets_of_cims_container.SetsOfCimsContainer.get_cims_of_node">
<code class="sig-name descname">get_cims_of_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_indx</span></em>, <em class="sig-param"><span class="n">cim_indx</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.sets_of_cims_container.SetsOfCimsContainer.get_cims_of_node" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.structure_graph.sets_of_cims_container.SetsOfCimsContainer.get_set_of_cims">
<code class="sig-name descname">get_set_of_cims</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_indx</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.sets_of_cims_container.SetsOfCimsContainer.get_set_of_cims" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.structure_graph.sets_of_cims_container.SetsOfCimsContainer.init_cims_structure">
<code class="sig-name descname">init_cims_structure</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">keys</span></em>, <em class="sig-param"><span class="n">states_number_per_node</span></em>, <em class="sig-param"><span class="n">list_of_parents_states_number</span></em>, <em class="sig-param"><span class="n">p_combs_list</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.sets_of_cims_container.SetsOfCimsContainer.init_cims_structure" title="Permalink to this definition"></a></dt>
<dd><p>for indx, key in enumerate(keys):
self.sets_of_cims.append(</p>
<blockquote>
<div><p>socim.SetOfCims(key, list_of_parents_states_number[indx], states_number_per_node[indx]))</p>
</div></blockquote>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.structure_graph.structure">
<span id="PyCTBN-structure-graph-structure-module"></span><h2>PyCTBN.structure_graph.structure module<a class="headerlink" href="#module-PyCTBN.structure_graph.structure" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.structure_graph.structure.Structure">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.structure_graph.structure.</code><code class="sig-name descname">Structure</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">nodes_labels_list</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">nodes_indexes_arr</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">nodes_vals_arr</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">edges_list</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">total_variables_number</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.structure.Structure" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Contains all the infos about the network structure(nodes labels, nodes caridinalites, edges, indexes)</p> <p>Contains all the infos about the network structure(nodes labels, nodes caridinalites, edges, indexes)</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -691,28 +619,28 @@ self.sets_of_cims.append(</p>
</dd> </dd>
</dl> </dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.structure.Structure.add_edge"> <dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.add_edge">
<code class="sig-name descname">add_edge</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">edge</span><span class="p">:</span> <span class="n">tuple</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.structure.Structure.add_edge" title="Permalink to this definition"></a></dt> <code class="sig-name descname">add_edge</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">edge</span><span class="p">:</span> <span class="n">tuple</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.add_edge" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.structure.Structure.clean_structure_edges"> <dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.clean_structure_edges">
<code class="sig-name descname">clean_structure_edges</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.structure.Structure.clean_structure_edges" title="Permalink to this definition"></a></dt> <code class="sig-name descname">clean_structure_edges</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.clean_structure_edges" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.structure.Structure.contains_edge"> <dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.contains_edge">
<code class="sig-name descname">contains_edge</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">edge</span><span class="p">:</span> <span class="n">tuple</span></em><span class="sig-paren">)</span> &#x2192; bool<a class="headerlink" href="#PyCTBN.structure_graph.structure.Structure.contains_edge" title="Permalink to this definition"></a></dt> <code class="sig-name descname">contains_edge</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">edge</span><span class="p">:</span> <span class="n">tuple</span></em><span class="sig-paren">)</span> &#x2192; bool<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.contains_edge" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.structure.Structure.edges"> <dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.edges">
<em class="property">property </em><code class="sig-name descname">edges</code><a class="headerlink" href="#PyCTBN.structure_graph.structure.Structure.edges" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">edges</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.edges" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.structure.Structure.get_node_id"> <dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.get_node_id">
<code class="sig-name descname">get_node_id</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_indx</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; str<a class="headerlink" href="#PyCTBN.structure_graph.structure.Structure.get_node_id" title="Permalink to this definition"></a></dt> <code class="sig-name descname">get_node_id</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_indx</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; str<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.get_node_id" title="Permalink to this definition"></a></dt>
<dd><p>Given the <code class="docutils literal notranslate"><span class="pre">node_index</span></code> returns the node label.</p> <dd><p>Given the <code class="docutils literal notranslate"><span class="pre">node_index</span></code> returns the node label.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -728,8 +656,8 @@ self.sets_of_cims.append(</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.structure.Structure.get_node_indx"> <dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.get_node_indx">
<code class="sig-name descname">get_node_indx</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#PyCTBN.structure_graph.structure.Structure.get_node_indx" title="Permalink to this definition"></a></dt> <code class="sig-name descname">get_node_indx</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.get_node_indx" title="Permalink to this definition"></a></dt>
<dd><p>Given the <code class="docutils literal notranslate"><span class="pre">node_index</span></code> returns the node label.</p> <dd><p>Given the <code class="docutils literal notranslate"><span class="pre">node_index</span></code> returns the node label.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -745,13 +673,13 @@ self.sets_of_cims.append(</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.structure.Structure.get_positional_node_indx"> <dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.get_positional_node_indx">
<code class="sig-name descname">get_positional_node_indx</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#PyCTBN.structure_graph.structure.Structure.get_positional_node_indx" title="Permalink to this definition"></a></dt> <code class="sig-name descname">get_positional_node_indx</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.get_positional_node_indx" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.structure.Structure.get_states_number"> <dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.get_states_number">
<code class="sig-name descname">get_states_number</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#PyCTBN.structure_graph.structure.Structure.get_states_number" title="Permalink to this definition"></a></dt> <code class="sig-name descname">get_states_number</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.get_states_number" title="Permalink to this definition"></a></dt>
<dd><p>Given the node label <code class="docutils literal notranslate"><span class="pre">node</span></code> returns the cardinality of the node.</p> <dd><p>Given the node label <code class="docutils literal notranslate"><span class="pre">node</span></code> returns the cardinality of the node.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -767,45 +695,45 @@ self.sets_of_cims.append(</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.structure.Structure.nodes_indexes"> <dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.nodes_indexes">
<em class="property">property </em><code class="sig-name descname">nodes_indexes</code><a class="headerlink" href="#PyCTBN.structure_graph.structure.Structure.nodes_indexes" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">nodes_indexes</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.nodes_indexes" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.structure.Structure.nodes_labels"> <dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.nodes_labels">
<em class="property">property </em><code class="sig-name descname">nodes_labels</code><a class="headerlink" href="#PyCTBN.structure_graph.structure.Structure.nodes_labels" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">nodes_labels</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.nodes_labels" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.structure.Structure.nodes_values"> <dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.nodes_values">
<em class="property">property </em><code class="sig-name descname">nodes_values</code><a class="headerlink" href="#PyCTBN.structure_graph.structure.Structure.nodes_values" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">nodes_values</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.nodes_values" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.structure.Structure.remove_edge"> <dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.remove_edge">
<code class="sig-name descname">remove_edge</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">edge</span><span class="p">:</span> <span class="n">tuple</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.structure.Structure.remove_edge" title="Permalink to this definition"></a></dt> <code class="sig-name descname">remove_edge</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">edge</span><span class="p">:</span> <span class="n">tuple</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.remove_edge" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.structure.Structure.remove_node"> <dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.remove_node">
<code class="sig-name descname">remove_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.structure_graph.structure.Structure.remove_node" title="Permalink to this definition"></a></dt> <code class="sig-name descname">remove_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.remove_node" title="Permalink to this definition"></a></dt>
<dd><p>Remove the node <code class="docutils literal notranslate"><span class="pre">node_id</span></code> from all the class members. <dd><p>Remove the node <code class="docutils literal notranslate"><span class="pre">node_id</span></code> from all the class members.
The class member <code class="docutils literal notranslate"><span class="pre">_total_variables_number</span></code> since it refers to the total number of variables in the dataset.</p> The class member <code class="docutils literal notranslate"><span class="pre">_total_variables_number</span></code> since it refers to the total number of variables in the dataset.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.structure.Structure.total_variables_number"> <dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.total_variables_number">
<em class="property">property </em><code class="sig-name descname">total_variables_number</code><a class="headerlink" href="#PyCTBN.structure_graph.structure.Structure.total_variables_number" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">total_variables_number</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.total_variables_number" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.structure_graph.trajectory"> <div class="section" id="module-PyCTBN.PyCTBN.structure_graph.trajectory">
<span id="PyCTBN-structure-graph-trajectory-module"></span><h2>PyCTBN.structure_graph.trajectory module<a class="headerlink" href="#module-PyCTBN.structure_graph.trajectory" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-structure-graph-trajectory-module"></span><h2>PyCTBN.PyCTBN.structure_graph.trajectory module<a class="headerlink" href="#module-PyCTBN.PyCTBN.structure_graph.trajectory" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.structure_graph.trajectory.Trajectory"> <dt id="PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.structure_graph.trajectory.</code><code class="sig-name descname">Trajectory</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">list_of_columns</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">original_cols_number</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.trajectory.Trajectory" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.structure_graph.trajectory.</code><code class="sig-name descname">Trajectory</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">list_of_columns</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">original_cols_number</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Abstracts the infos about a complete set of trajectories, represented as a numpy array of doubles <p>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).</p> (the time deltas) and a numpy matrix of ints (the changes of states).</p>
@ -824,30 +752,30 @@ The class member <code class="docutils literal notranslate"><span class="pre">_t
</dd> </dd>
</dl> </dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.trajectory.Trajectory.complete_trajectory"> <dt id="PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.complete_trajectory">
<em class="property">property </em><code class="sig-name descname">complete_trajectory</code><a class="headerlink" href="#PyCTBN.structure_graph.trajectory.Trajectory.complete_trajectory" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">complete_trajectory</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.complete_trajectory" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.trajectory.Trajectory.size"> <dt id="PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.size">
<code class="sig-name descname">size</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.structure_graph.trajectory.Trajectory.size" title="Permalink to this definition"></a></dt> <code class="sig-name descname">size</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.size" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.trajectory.Trajectory.times"> <dt id="PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.times">
<em class="property">property </em><code class="sig-name descname">times</code><a class="headerlink" href="#PyCTBN.structure_graph.trajectory.Trajectory.times" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">times</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.times" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.structure_graph.trajectory.Trajectory.trajectory"> <dt id="PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.trajectory">
<em class="property">property </em><code class="sig-name descname">trajectory</code><a class="headerlink" href="#PyCTBN.structure_graph.trajectory.Trajectory.trajectory" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">trajectory</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.trajectory" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.structure_graph"> <div class="section" id="module-PyCTBN.PyCTBN.structure_graph">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-PyCTBN.structure_graph" title="Permalink to this headline"></a></h2> <span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-PyCTBN.PyCTBN.structure_graph" title="Permalink to this headline"></a></h2>
</div> </div>
</div> </div>
@ -855,6 +783,15 @@ The class member <code class="docutils literal notranslate"><span class="pre">_t
</div> </div>
<footer> <footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="PyCTBN.PyCTBN.utility.html" class="btn btn-neutral float-right" title="PyCTBN.PyCTBN.utility package">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="PyCTBN.PyCTBN.optimizers.html" class="btn btn-neutral" title="PyCTBN.PyCTBN.optimizers package"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/> <hr/>

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PyCTBN.utility package &mdash; PyCTBN 2.0 documentation</title> <title>PyCTBN.PyCTBN.utility package &mdash; PyCTBN 2.0 documentation</title>
@ -27,6 +27,9 @@
href="genindex.html"/> href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/> <link rel="search" title="Search" href="search.html"/>
<link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/> <link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/>
<link rel="up" title="PyCTBN.PyCTBN package" href="PyCTBN.PyCTBN.html"/>
<link rel="next" title="Examples" href="examples.html"/>
<link rel="prev" title="PyCTBN.PyCTBN.structure_graph package" href="PyCTBN.PyCTBN.structure_graph.html"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" /> <meta http-equiv="cache-control" content="public" />
@ -59,12 +62,10 @@
<p class="caption"><span class="caption-text">Contents:</span></p> <p class="caption"><span class="caption-text">Contents:</span></p>
<ul> <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a><ul> <li class="toctree-l1 current"><a class="reference internal" href="modules.html">PyCTBN</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="examples.html#installation-usage">Installation/Usage</a></li> <li class="toctree-l2 current"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#implementing-your-own-data-importer">Implementing your own data importer</a></li> <li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#parameters-estimation-example">Parameters Estimation Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#structure-estimation-example">Structure Estimation Example</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -107,16 +108,16 @@
<div role="main" class=""> <div role="main" class="">
<div id="content" class="hfeed entry-container hentry"> <div id="content" class="hfeed entry-container hentry">
<div class="section" id="PyCTBN-utility-package"> <div class="section" id="pyctbn-pyctbn-utility-package">
<h1>PyCTBN.utility package<a class="headerlink" href="#PyCTBN-utility-package" title="Permalink to this headline"></a></h1> <h1>PyCTBN.PyCTBN.utility package<a class="headerlink" href="#pyctbn-pyctbn-utility-package" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules"> <div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2> <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div> </div>
<div class="section" id="module-PyCTBN.utility.abstract_importer"> <div class="section" id="module-PyCTBN.PyCTBN.utility.abstract_importer">
<span id="PyCTBN-utility-abstract-importer-module"></span><h2>PyCTBN.utility.abstract_importer module<a class="headerlink" href="#module-PyCTBN.utility.abstract_importer" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-utility-abstract-importer-module"></span><h2>PyCTBN.PyCTBN.utility.abstract_importer module<a class="headerlink" href="#module-PyCTBN.PyCTBN.utility.abstract_importer" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.utility.abstract_importer.AbstractImporter"> <dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.utility.abstract_importer.</code><code class="sig-name descname">AbstractImporter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">file_path</span><span class="p">:</span> <span class="n">str</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">trajectory_list</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>pandas.core.frame.DataFrame<span class="p">, </span>numpy.ndarray<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">variables</span><span class="p">:</span> <span class="n">pandas.core.frame.DataFrame</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">prior_net_structure</span><span class="p">:</span> <span class="n">pandas.core.frame.DataFrame</span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.utility.abstract_importer.AbstractImporter" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.utility.abstract_importer.</code><code class="sig-name descname">AbstractImporter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">file_path</span><span class="p">:</span> <span class="n">str</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">trajectory_list</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>pandas.core.frame.DataFrame<span class="p">, </span>numpy.ndarray<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">variables</span><span class="p">:</span> <span class="n">pandas.core.frame.DataFrame</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">prior_net_structure</span><span class="p">:</span> <span class="n">pandas.core.frame.DataFrame</span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">abc.ABC</span></code></p> <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">abc.ABC</span></code></p>
<p>Abstract class that exposes all the necessary methods to process the trajectories and the net structure.</p> <p>Abstract class that exposes all the necessary methods to process the trajectories and the net structure.</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -147,8 +148,8 @@ See the tutorial on how to construct a correct <code class="docutils literal not
<p>See :class:<code class="docutils literal notranslate"><span class="pre">JsonImporter</span></code> for an example implementation</p> <p>See :class:<code class="docutils literal notranslate"><span class="pre">JsonImporter</span></code> for an example implementation</p>
</div> </div>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.abstract_importer.AbstractImporter.build_list_of_samples_array"> <dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.build_list_of_samples_array">
<code class="sig-name descname">build_list_of_samples_array</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">concatenated_sample</span><span class="p">:</span> <span class="n">pandas.core.frame.DataFrame</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.utility.abstract_importer.AbstractImporter.build_list_of_samples_array" title="Permalink to this definition"></a></dt> <code class="sig-name descname">build_list_of_samples_array</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">concatenated_sample</span><span class="p">:</span> <span class="n">pandas.core.frame.DataFrame</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.build_list_of_samples_array" title="Permalink to this definition"></a></dt>
<dd><p>Builds a List containing the the delta times numpy array, and the complete transitions matrix</p> <dd><p>Builds a List containing the the delta times numpy array, and the complete transitions matrix</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -165,8 +166,8 @@ and converted</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.abstract_importer.AbstractImporter.build_sorter"> <dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.build_sorter">
<em class="property">abstract </em><code class="sig-name descname">build_sorter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">trajecory_header</span><span class="p">:</span> <span class="n">object</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.utility.abstract_importer.AbstractImporter.build_sorter" title="Permalink to this definition"></a></dt> <em class="property">abstract </em><code class="sig-name descname">build_sorter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">trajecory_header</span><span class="p">:</span> <span class="n">object</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.build_sorter" title="Permalink to this definition"></a></dt>
<dd><p>Initializes the <code class="docutils literal notranslate"><span class="pre">_sorter</span></code> class member from a trajectory dataframe, exctracting the header of the frame <dd><p>Initializes the <code class="docutils literal notranslate"><span class="pre">_sorter</span></code> 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.</p> and keeping ONLY the variables symbolic labels, cutting out the time label in the header.</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -183,14 +184,14 @@ and keeping ONLY the variables symbolic labels, cutting out the time label in th
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.abstract_importer.AbstractImporter.clear_concatenated_frame"> <dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.clear_concatenated_frame">
<code class="sig-name descname">clear_concatenated_frame</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.utility.abstract_importer.AbstractImporter.clear_concatenated_frame" title="Permalink to this definition"></a></dt> <code class="sig-name descname">clear_concatenated_frame</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.clear_concatenated_frame" title="Permalink to this definition"></a></dt>
<dd><p>Removes all values in the dataframe concatenated_samples.</p> <dd><p>Removes all values in the dataframe concatenated_samples.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.abstract_importer.AbstractImporter.compute_row_delta_in_all_samples_frames"> <dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.compute_row_delta_in_all_samples_frames">
<code class="sig-name descname">compute_row_delta_in_all_samples_frames</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">df_samples_list</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.utility.abstract_importer.AbstractImporter.compute_row_delta_in_all_samples_frames" title="Permalink to this definition"></a></dt> <code class="sig-name descname">compute_row_delta_in_all_samples_frames</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">df_samples_list</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.compute_row_delta_in_all_samples_frames" title="Permalink to this definition"></a></dt>
<dd><p>Calls the method <code class="docutils literal notranslate"><span class="pre">compute_row_delta_sigle_samples_frame</span></code> on every dataframe present in the list <dd><p>Calls the method <code class="docutils literal notranslate"><span class="pre">compute_row_delta_sigle_samples_frame</span></code> on every dataframe present in the list
<code class="docutils literal notranslate"><span class="pre">df_samples_list</span></code>. <code class="docutils literal notranslate"><span class="pre">df_samples_list</span></code>.
Concatenates the result in the dataframe <code class="docutils literal notranslate"><span class="pre">concatanated_samples</span></code></p> Concatenates the result in the dataframe <code class="docutils literal notranslate"><span class="pre">concatanated_samples</span></code></p>
@ -213,8 +214,8 @@ and merged trajectories</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.abstract_importer.AbstractImporter.compute_row_delta_sigle_samples_frame"> <dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.compute_row_delta_sigle_samples_frame">
<code class="sig-name descname">compute_row_delta_sigle_samples_frame</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_frame</span><span class="p">:</span> <span class="n">pandas.core.frame.DataFrame</span></em>, <em class="sig-param"><span class="n">columns_header</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">shifted_cols_header</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; pandas.core.frame.DataFrame<a class="headerlink" href="#PyCTBN.utility.abstract_importer.AbstractImporter.compute_row_delta_sigle_samples_frame" title="Permalink to this definition"></a></dt> <code class="sig-name descname">compute_row_delta_sigle_samples_frame</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_frame</span><span class="p">:</span> <span class="n">pandas.core.frame.DataFrame</span></em>, <em class="sig-param"><span class="n">columns_header</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">shifted_cols_header</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; pandas.core.frame.DataFrame<a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.compute_row_delta_sigle_samples_frame" title="Permalink to this definition"></a></dt>
<dd><p>Computes the difference between each value present in th time column. <dd><p>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.</p> Copies and shift by one position up all the values present in the remaining columns.</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -240,65 +241,65 @@ Header of sample_frame = [Time | Variable values]</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.abstract_importer.AbstractImporter.concatenated_samples"> <dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.concatenated_samples">
<em class="property">property </em><code class="sig-name descname">concatenated_samples</code><a class="headerlink" href="#PyCTBN.utility.abstract_importer.AbstractImporter.concatenated_samples" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">concatenated_samples</code><a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.concatenated_samples" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.abstract_importer.AbstractImporter.dataset_id"> <dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.dataset_id">
<em class="property">abstract </em><code class="sig-name descname">dataset_id</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; object<a class="headerlink" href="#PyCTBN.utility.abstract_importer.AbstractImporter.dataset_id" title="Permalink to this definition"></a></dt> <em class="property">abstract </em><code class="sig-name descname">dataset_id</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; object<a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.dataset_id" title="Permalink to this definition"></a></dt>
<dd><p>If the original dataset contains multiple dataset, this method returns a unique id to identify the current <dd><p>If the original dataset contains multiple dataset, this method returns a unique id to identify the current
dataset</p> dataset</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.abstract_importer.AbstractImporter.file_path"> <dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.file_path">
<em class="property">property </em><code class="sig-name descname">file_path</code><a class="headerlink" href="#PyCTBN.utility.abstract_importer.AbstractImporter.file_path" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">file_path</code><a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.file_path" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.abstract_importer.AbstractImporter.sorter"> <dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.sorter">
<em class="property">property </em><code class="sig-name descname">sorter</code><a class="headerlink" href="#PyCTBN.utility.abstract_importer.AbstractImporter.sorter" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">sorter</code><a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.sorter" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.abstract_importer.AbstractImporter.structure"> <dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.structure">
<em class="property">property </em><code class="sig-name descname">structure</code><a class="headerlink" href="#PyCTBN.utility.abstract_importer.AbstractImporter.structure" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">structure</code><a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.structure" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.abstract_importer.AbstractImporter.variables"> <dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.variables">
<em class="property">property </em><code class="sig-name descname">variables</code><a class="headerlink" href="#PyCTBN.utility.abstract_importer.AbstractImporter.variables" title="Permalink to this definition"></a></dt> <em class="property">property </em><code class="sig-name descname">variables</code><a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.variables" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.utility.cache"> <div class="section" id="module-PyCTBN.PyCTBN.utility.cache">
<span id="PyCTBN-utility-cache-module"></span><h2>PyCTBN.utility.cache module<a class="headerlink" href="#module-PyCTBN.utility.cache" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-utility-cache-module"></span><h2>PyCTBN.PyCTBN.utility.cache module<a class="headerlink" href="#module-PyCTBN.PyCTBN.utility.cache" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.utility.cache.Cache"> <dt id="PyCTBN.PyCTBN.utility.cache.Cache">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.utility.cache.</code><code class="sig-name descname">Cache</code><a class="headerlink" href="#PyCTBN.utility.cache.Cache" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.utility.cache.</code><code class="sig-name descname">Cache</code><a class="headerlink" href="#PyCTBN.PyCTBN.utility.cache.Cache" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>This class acts as a cache of <code class="docutils literal notranslate"><span class="pre">SetOfCims</span></code> objects for a node.</p> <p>This class acts as a cache of <code class="docutils literal notranslate"><span class="pre">SetOfCims</span></code> objects for a node.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">_list_of_sets_of_parents</dt> <dt class="field-odd">__list_of_sets_of_parents</dt>
<dd class="field-odd"><p>a list of <code class="docutils literal notranslate"><span class="pre">Sets</span></code> objects of the parents to which the cim in cache at SAME <dd class="field-odd"><p>a list of <code class="docutils literal notranslate"><span class="pre">Sets</span></code> objects of the parents to which the cim in cache at SAME
index is related</p> index is related</p>
</dd> </dd>
<dt class="field-even">_actual_cache</dt> <dt class="field-even">__actual_cache</dt>
<dd class="field-even"><p>a list of setOfCims objects</p> <dd class="field-even"><p>a list of setOfCims objects</p>
</dd> </dd>
</dl> </dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.cache.Cache.clear"> <dt id="PyCTBN.PyCTBN.utility.cache.Cache.clear">
<code class="sig-name descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.utility.cache.Cache.clear" title="Permalink to this definition"></a></dt> <code class="sig-name descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.utility.cache.Cache.clear" title="Permalink to this definition"></a></dt>
<dd><p>Clear the contents both of <code class="docutils literal notranslate"><span class="pre">_actual_cache</span></code> and <code class="docutils literal notranslate"><span class="pre">_list_of_sets_of_parents</span></code>.</p> <dd><p>Clear the contents both of <code class="docutils literal notranslate"><span class="pre">__actual_cache</span></code> and <code class="docutils literal notranslate"><span class="pre">__list_of_sets_of_parents</span></code>.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.cache.Cache.find"> <dt id="PyCTBN.PyCTBN.utility.cache.Cache.find">
<code class="sig-name descname">find</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">parents_comb</span><span class="p">:</span> <span class="n">Set</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.utility.cache.Cache.find" title="Permalink to this definition"></a></dt> <code class="sig-name descname">find</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">parents_comb</span><span class="p">:</span> <span class="n">Set</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.utility.cache.Cache.find" title="Permalink to this definition"></a></dt>
<dd><p>Tries to find in cache given the symbolic parents combination <code class="docutils literal notranslate"><span class="pre">parents_comb</span></code> the <code class="docutils literal notranslate"><span class="pre">SetOfCims</span></code> <dd><p>Tries to find in cache given the symbolic parents combination <code class="docutils literal notranslate"><span class="pre">parents_comb</span></code> the <code class="docutils literal notranslate"><span class="pre">SetOfCims</span></code>
related to that <code class="docutils literal notranslate"><span class="pre">parents_comb</span></code>.</p> related to that <code class="docutils literal notranslate"><span class="pre">parents_comb</span></code>.</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -306,25 +307,25 @@ related to that <code class="docutils literal notranslate"><span class="pre">par
<dd class="field-odd"><p><strong>parents_comb</strong> (<em>Set</em>) – the parents related to that <code class="docutils literal notranslate"><span class="pre">SetOfCims</span></code></p> <dd class="field-odd"><p><strong>parents_comb</strong> (<em>Set</em>) – the parents related to that <code class="docutils literal notranslate"><span class="pre">SetOfCims</span></code></p>
</dd> </dd>
<dt class="field-even">Returns</dt> <dt class="field-even">Returns</dt>
<dd class="field-even"><p>A <code class="docutils literal notranslate"><span class="pre">SetOfCims</span></code> object if the <code class="docutils literal notranslate"><span class="pre">parents_comb</span></code> index is found in <code class="docutils literal notranslate"><span class="pre">_list_of_sets_of_parents</span></code>. <dd class="field-even"><p>A <code class="docutils literal notranslate"><span class="pre">SetOfCims</span></code> object if the <code class="docutils literal notranslate"><span class="pre">parents_comb</span></code> index is found in <code class="docutils literal notranslate"><span class="pre">__list_of_sets_of_parents</span></code>.
None otherwise.</p> None otherwise.</p>
</dd> </dd>
<dt class="field-odd">Return type</dt> <dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.set_of_cims.SetOfCims" title="PyCTBN.structure_graph.set_of_cims.SetOfCims">SetOfCims</a></p> <dd class="field-odd"><p><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims" title="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims">SetOfCims</a></p>
</dd> </dd>
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.cache.Cache.put"> <dt id="PyCTBN.PyCTBN.utility.cache.Cache.put">
<code class="sig-name descname">put</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">parents_comb</span><span class="p">:</span> <span class="n">Set</span></em>, <em class="sig-param"><span class="n">socim</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.set_of_cims.SetOfCims" title="PyCTBN.structure_graph.set_of_cims.SetOfCims">PyCTBN.structure_graph.set_of_cims.SetOfCims</a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.utility.cache.Cache.put" title="Permalink to this definition"></a></dt> <code class="sig-name descname">put</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">parents_comb</span><span class="p">:</span> <span class="n">Set</span></em>, <em class="sig-param"><span class="n">socim</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims" title="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims">PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims</a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.utility.cache.Cache.put" title="Permalink to this definition"></a></dt>
<dd><p>Place in cache the <code class="docutils literal notranslate"><span class="pre">SetOfCims</span></code> object, and the related symbolic index <code class="docutils literal notranslate"><span class="pre">parents_comb</span></code> in <dd><p>Place in cache the <code class="docutils literal notranslate"><span class="pre">SetOfCims</span></code> object, and the related symbolic index <code class="docutils literal notranslate"><span class="pre">parents_comb</span></code> in
<code class="docutils literal notranslate"><span class="pre">_list_of_sets_of_parents</span></code>.</p> <code class="docutils literal notranslate"><span class="pre">__list_of_sets_of_parents</span></code>.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple"> <dd class="field-odd"><ul class="simple">
<li><p><strong>parents_comb</strong> (<em>Set</em>) – the symbolic set index</p></li> <li><p><strong>parents_comb</strong> (<em>Set</em>) – the symbolic set index</p></li>
<li><p><strong>socim</strong> (<a class="reference internal" href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.set_of_cims.SetOfCims" title="PyCTBN.structure_graph.set_of_cims.SetOfCims"><em>SetOfCims</em></a>) – the related SetOfCims object</p></li> <li><p><strong>socim</strong> (<a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims" title="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims"><em>SetOfCims</em></a>) – the related SetOfCims object</p></li>
</ul> </ul>
</dd> </dd>
</dl> </dl>
@ -333,25 +334,12 @@ None otherwise.</p>
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.utility.decorators"> <div class="section" id="module-PyCTBN.PyCTBN.utility.json_importer">
<span id="PyCTBN-utility-decorators-module"></span><h2>PyCTBN.utility.decorators module<a class="headerlink" href="#module-PyCTBN.utility.decorators" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-utility-json-importer-module"></span><h2>PyCTBN.PyCTBN.utility.json_importer module<a class="headerlink" href="#module-PyCTBN.PyCTBN.utility.json_importer" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="PyCTBN.utility.decorators.timing">
<code class="sig-prename descclassname">PyCTBN.utility.decorators.</code><code class="sig-name descname">timing</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">f</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.utility.decorators.timing" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py function">
<dt id="PyCTBN.utility.decorators.timing_write">
<code class="sig-prename descclassname">PyCTBN.utility.decorators.</code><code class="sig-name descname">timing_write</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">f</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.utility.decorators.timing_write" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-PyCTBN.utility.json_importer">
<span id="PyCTBN-utility-json-importer-module"></span><h2>PyCTBN.utility.json_importer module<a class="headerlink" href="#module-PyCTBN.utility.json_importer" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.utility.json_importer.JsonImporter"> <dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.utility.json_importer.</code><code class="sig-name descname">JsonImporter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">file_path</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">samples_label</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">structure_label</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">variables_label</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">time_key</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">variables_key</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.utility.json_importer.JsonImporter" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.utility.json_importer.</code><code class="sig-name descname">JsonImporter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">file_path</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">samples_label</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">structure_label</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">variables_label</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">time_key</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">variables_key</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#PyCTBN.utility.abstract_importer.AbstractImporter" title="PyCTBN.utility.abstract_importer.AbstractImporter"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.utility.abstract_importer.AbstractImporter</span></code></a></p> <dd><p>Bases: <a class="reference internal" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter" title="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter</span></code></a></p>
<p>Implements the abstracts methods of AbstractImporter and adds all the necessary methods to process and prepare <p>Implements the abstracts methods of AbstractImporter and adds all the necessary methods to process and prepare
the data in json extension.</p> the data in json extension.</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -376,27 +364,27 @@ the data in json extension.</p>
</dd> </dd>
</dl> </dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.json_importer.JsonImporter.build_sorter"> <dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.build_sorter">
<code class="sig-name descname">build_sorter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_frame</span><span class="p">:</span> <span class="n">pandas.core.frame.DataFrame</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.utility.json_importer.JsonImporter.build_sorter" title="Permalink to this definition"></a></dt> <code class="sig-name descname">build_sorter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_frame</span><span class="p">:</span> <span class="n">pandas.core.frame.DataFrame</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.build_sorter" title="Permalink to this definition"></a></dt>
<dd><p>Implements the abstract method build_sorter of the <code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractImporter</span></code> for this dataset.</p> <dd><p>Implements the abstract method build_sorter of the <code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractImporter</span></code> for this dataset.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.json_importer.JsonImporter.clear_data_frame_list"> <dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.clear_data_frame_list">
<code class="sig-name descname">clear_data_frame_list</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.utility.json_importer.JsonImporter.clear_data_frame_list" title="Permalink to this definition"></a></dt> <code class="sig-name descname">clear_data_frame_list</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.clear_data_frame_list" title="Permalink to this definition"></a></dt>
<dd><p>Removes all values present in the dataframes in the list <code class="docutils literal notranslate"><span class="pre">_df_samples_list</span></code>.</p> <dd><p>Removes all values present in the dataframes in the list <code class="docutils literal notranslate"><span class="pre">_df_samples_list</span></code>.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.json_importer.JsonImporter.dataset_id"> <dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.dataset_id">
<code class="sig-name descname">dataset_id</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; object<a class="headerlink" href="#PyCTBN.utility.json_importer.JsonImporter.dataset_id" title="Permalink to this definition"></a></dt> <code class="sig-name descname">dataset_id</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; object<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.dataset_id" title="Permalink to this definition"></a></dt>
<dd><p>If the original dataset contains multiple dataset, this method returns a unique id to identify the current <dd><p>If the original dataset contains multiple dataset, this method returns a unique id to identify the current
dataset</p> dataset</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.json_importer.JsonImporter.import_data"> <dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_data">
<code class="sig-name descname">import_data</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">indx</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.utility.json_importer.JsonImporter.import_data" title="Permalink to this definition"></a></dt> <code class="sig-name descname">import_data</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">indx</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_data" title="Permalink to this definition"></a></dt>
<dd><p>Implements the abstract method of <code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractImporter</span></code>.</p> <dd><p>Implements the abstract method of <code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractImporter</span></code>.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -406,8 +394,8 @@ dataset</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.json_importer.JsonImporter.import_sampled_cims"> <dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_sampled_cims">
<code class="sig-name descname">import_sampled_cims</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_data</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">indx</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">cims_key</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; Dict<a class="headerlink" href="#PyCTBN.utility.json_importer.JsonImporter.import_sampled_cims" title="Permalink to this definition"></a></dt> <code class="sig-name descname">import_sampled_cims</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_data</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">indx</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">cims_key</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; Dict<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_sampled_cims" title="Permalink to this definition"></a></dt>
<dd><p>Imports the synthetic CIMS in the dataset in a dictionary, using variables labels <dd><p>Imports the synthetic CIMS in the dataset in a dictionary, using variables labels
as keys for the set of CIMS of a particular node.</p> as keys for the set of CIMS of a particular node.</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -428,8 +416,8 @@ as keys for the set of CIMS of a particular node.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.json_importer.JsonImporter.import_structure"> <dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_structure">
<code class="sig-name descname">import_structure</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_data</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; pandas.core.frame.DataFrame<a class="headerlink" href="#PyCTBN.utility.json_importer.JsonImporter.import_structure" title="Permalink to this definition"></a></dt> <code class="sig-name descname">import_structure</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_data</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; pandas.core.frame.DataFrame<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_structure" title="Permalink to this definition"></a></dt>
<dd><p>Imports in a dataframe the data in the list raw_data at the key <code class="docutils literal notranslate"><span class="pre">_structure_label</span></code></p> <dd><p>Imports in a dataframe the data in the list raw_data at the key <code class="docutils literal notranslate"><span class="pre">_structure_label</span></code></p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -445,8 +433,8 @@ as keys for the set of CIMS of a particular node.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.json_importer.JsonImporter.import_trajectories"> <dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_trajectories">
<code class="sig-name descname">import_trajectories</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_data</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.utility.json_importer.JsonImporter.import_trajectories" title="Permalink to this definition"></a></dt> <code class="sig-name descname">import_trajectories</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_data</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_trajectories" title="Permalink to this definition"></a></dt>
<dd><p>Imports the trajectories from the list of dicts <code class="docutils literal notranslate"><span class="pre">raw_data</span></code>.</p> <dd><p>Imports the trajectories from the list of dicts <code class="docutils literal notranslate"><span class="pre">raw_data</span></code>.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -462,8 +450,8 @@ as keys for the set of CIMS of a particular node.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.json_importer.JsonImporter.import_variables"> <dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_variables">
<code class="sig-name descname">import_variables</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_data</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; pandas.core.frame.DataFrame<a class="headerlink" href="#PyCTBN.utility.json_importer.JsonImporter.import_variables" title="Permalink to this definition"></a></dt> <code class="sig-name descname">import_variables</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_data</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; pandas.core.frame.DataFrame<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_variables" title="Permalink to this definition"></a></dt>
<dd><p>Imports the data in <code class="docutils literal notranslate"><span class="pre">raw_data</span></code> at the key <code class="docutils literal notranslate"><span class="pre">_variables_label</span></code>.</p> <dd><p>Imports the data in <code class="docutils literal notranslate"><span class="pre">raw_data</span></code> at the key <code class="docutils literal notranslate"><span class="pre">_variables_label</span></code>.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -479,8 +467,8 @@ as keys for the set of CIMS of a particular node.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.json_importer.JsonImporter.normalize_trajectories"> <dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.normalize_trajectories">
<code class="sig-name descname">normalize_trajectories</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_data</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">indx</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">trajectories_key</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.utility.json_importer.JsonImporter.normalize_trajectories" title="Permalink to this definition"></a></dt> <code class="sig-name descname">normalize_trajectories</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_data</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">indx</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">trajectories_key</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.normalize_trajectories" title="Permalink to this definition"></a></dt>
<dd><p>Extracts the trajectories in <code class="docutils literal notranslate"><span class="pre">raw_data</span></code> at the index <code class="docutils literal notranslate"><span class="pre">index</span></code> at the key <code class="docutils literal notranslate"><span class="pre">trajectories</span> <span class="pre">key</span></code>.</p> <dd><p>Extracts the trajectories in <code class="docutils literal notranslate"><span class="pre">raw_data</span></code> at the index <code class="docutils literal notranslate"><span class="pre">index</span></code> at the key <code class="docutils literal notranslate"><span class="pre">trajectories</span> <span class="pre">key</span></code>.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -500,8 +488,8 @@ as keys for the set of CIMS of a particular node.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.json_importer.JsonImporter.one_level_normalizing"> <dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.one_level_normalizing">
<code class="sig-name descname">one_level_normalizing</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_data</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">indx</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">key</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; pandas.core.frame.DataFrame<a class="headerlink" href="#PyCTBN.utility.json_importer.JsonImporter.one_level_normalizing" title="Permalink to this definition"></a></dt> <code class="sig-name descname">one_level_normalizing</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_data</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">indx</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">key</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; pandas.core.frame.DataFrame<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.one_level_normalizing" title="Permalink to this definition"></a></dt>
<dd><p>Extracts the one-level nested data in the list <code class="docutils literal notranslate"><span class="pre">raw_data</span></code> at the index <code class="docutils literal notranslate"><span class="pre">indx</span></code> at the key <code class="docutils literal notranslate"><span class="pre">key</span></code>.</p> <dd><p>Extracts the one-level nested data in the list <code class="docutils literal notranslate"><span class="pre">raw_data</span></code> at the index <code class="docutils literal notranslate"><span class="pre">indx</span></code> at the key <code class="docutils literal notranslate"><span class="pre">key</span></code>.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
@ -521,8 +509,8 @@ as keys for the set of CIMS of a particular node.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.json_importer.JsonImporter.read_json_file"> <dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.read_json_file">
<code class="sig-name descname">read_json_file</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.utility.json_importer.JsonImporter.read_json_file" title="Permalink to this definition"></a></dt> <code class="sig-name descname">read_json_file</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.read_json_file" title="Permalink to this definition"></a></dt>
<dd><p>Reads the JSON file in the path self.filePath.</p> <dd><p>Reads the JSON file in the path self.filePath.</p>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Returns</dt> <dt class="field-odd">Returns</dt>
@ -537,12 +525,12 @@ as keys for the set of CIMS of a particular node.</p>
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.utility.sample_importer"> <div class="section" id="module-PyCTBN.PyCTBN.utility.sample_importer">
<span id="PyCTBN-utility-sample-importer-module"></span><h2>PyCTBN.utility.sample_importer module<a class="headerlink" href="#module-PyCTBN.utility.sample_importer" title="Permalink to this headline"></a></h2> <span id="pyctbn-pyctbn-utility-sample-importer-module"></span><h2>PyCTBN.PyCTBN.utility.sample_importer module<a class="headerlink" href="#module-PyCTBN.PyCTBN.utility.sample_importer" title="Permalink to this headline"></a></h2>
<dl class="py class"> <dl class="py class">
<dt id="PyCTBN.utility.sample_importer.SampleImporter"> <dt id="PyCTBN.PyCTBN.utility.sample_importer.SampleImporter">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.utility.sample_importer.</code><code class="sig-name descname">SampleImporter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">trajectory_list</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>pandas.core.frame.DataFrame<span class="p">, </span>numpy.ndarray<span class="p">, </span>List<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">variables</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>pandas.core.frame.DataFrame<span class="p">, </span>numpy.ndarray<span class="p">, </span>List<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">prior_net_structure</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>pandas.core.frame.DataFrame<span class="p">, </span>numpy.ndarray<span class="p">, </span>List<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.utility.sample_importer.SampleImporter" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.utility.sample_importer.</code><code class="sig-name descname">SampleImporter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">trajectory_list</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>pandas.core.frame.DataFrame<span class="p">, </span>numpy.ndarray<span class="p">, </span>List<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">variables</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>pandas.core.frame.DataFrame<span class="p">, </span>numpy.ndarray<span class="p">, </span>List<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">prior_net_structure</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>pandas.core.frame.DataFrame<span class="p">, </span>numpy.ndarray<span class="p">, </span>List<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.utility.sample_importer.SampleImporter" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#PyCTBN.utility.abstract_importer.AbstractImporter" title="PyCTBN.utility.abstract_importer.AbstractImporter"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.utility.abstract_importer.AbstractImporter</span></code></a></p> <dd><p>Bases: <a class="reference internal" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter" title="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter</span></code></a></p>
<p>Implements the abstracts methods of AbstractImporter and adds all the necessary methods to process and prepare <p>Implements the abstracts methods of AbstractImporter and adds all the necessary methods to process and prepare
the data loaded directly by using DataFrame</p> the data loaded directly by using DataFrame</p>
<dl class="field-list simple"> <dl class="field-list simple">
@ -561,28 +549,28 @@ the data loaded directly by using DataFrame</p>
</dd> </dd>
</dl> </dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.sample_importer.SampleImporter.build_sorter"> <dt id="PyCTBN.PyCTBN.utility.sample_importer.SampleImporter.build_sorter">
<code class="sig-name descname">build_sorter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_frame</span><span class="p">:</span> <span class="n">pandas.core.frame.DataFrame</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.utility.sample_importer.SampleImporter.build_sorter" title="Permalink to this definition"></a></dt> <code class="sig-name descname">build_sorter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_frame</span><span class="p">:</span> <span class="n">pandas.core.frame.DataFrame</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.utility.sample_importer.SampleImporter.build_sorter" title="Permalink to this definition"></a></dt>
<dd><p>Implements the abstract method build_sorter of the <code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractImporter</span></code> in order to get the ordered variables list.</p> <dd><p>Implements the abstract method build_sorter of the <code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractImporter</span></code> in order to get the ordered variables list.</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.sample_importer.SampleImporter.dataset_id"> <dt id="PyCTBN.PyCTBN.utility.sample_importer.SampleImporter.dataset_id">
<code class="sig-name descname">dataset_id</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; object<a class="headerlink" href="#PyCTBN.utility.sample_importer.SampleImporter.dataset_id" title="Permalink to this definition"></a></dt> <code class="sig-name descname">dataset_id</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; str<a class="headerlink" href="#PyCTBN.PyCTBN.utility.sample_importer.SampleImporter.dataset_id" title="Permalink to this definition"></a></dt>
<dd><p>If the original dataset contains multiple dataset, this method returns a unique id to identify the current <dd><p>If the original dataset contains multiple dataset, this method returns a unique id to identify the current
dataset</p> dataset</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="PyCTBN.utility.sample_importer.SampleImporter.import_data"> <dt id="PyCTBN.PyCTBN.utility.sample_importer.SampleImporter.import_data">
<code class="sig-name descname">import_data</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">header_column</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.utility.sample_importer.SampleImporter.import_data" title="Permalink to this definition"></a></dt> <code class="sig-name descname">import_data</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">header_column</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.utility.sample_importer.SampleImporter.import_data" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
</dd></dl> </dd></dl>
</div> </div>
<div class="section" id="module-PyCTBN.utility"> <div class="section" id="module-PyCTBN.PyCTBN.utility">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-PyCTBN.utility" title="Permalink to this headline"></a></h2> <span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-PyCTBN.PyCTBN.utility" title="Permalink to this headline"></a></h2>
</div> </div>
</div> </div>
@ -590,6 +578,15 @@ dataset</p>
</div> </div>
<footer> <footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="examples.html" class="btn btn-neutral float-right" title="Examples">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="PyCTBN.PyCTBN.structure_graph.html" class="btn btn-neutral" title="PyCTBN.PyCTBN.structure_graph package"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/> <hr/>

@ -0,0 +1,231 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xml:lang="" lang="" version="-//W3C//DTD XHTML 1.1//EN" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PyCTBN package &mdash; PyCTBN 2.0 documentation</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'/>
<link rel="stylesheet" href="_static/css/pdj.css" type="text/css" />
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" />
<meta name="robots" content="follow, all" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Add jQuery library -->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="index.html" class="fa fa-home"> PyCTBN </a>
<div role="search">
<form id ="rtd-search-form" class="wy-form"
action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="modules.html">PyCTBN</a><ul>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
</ul>
</li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" id="barra-mobile" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="#">Porão do Juca</a>
</nav>
<div class="wy-nav-content">
<div class="fundo-claro">
</div>
<div class="fundo-escuro">
</div>
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<!-- <ul class="wy-breadcrumbs"> -->
<!-- <li><a href="#">Docs</a> &raquo;</li> -->
<!-- <li>Features</li> -->
<!-- <li class="wy-breadcrumbs-aside"> -->
<!-- <a href="_sources/index.txt" rel="nofollow"> View page source</a> -->
<!-- </li> -->
<!-- </ul> -->
<!-- <hr/> -->
</div>
<div role="main" class="">
<div id="content" class="hfeed entry-container hentry">
<div class="section" id="pyctbn-package">
<h1>PyCTBN package<a class="headerlink" href="#pyctbn-package" title="Permalink to this headline"></a></h1>
<div class="section" id="subpackages">
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.html#subpackages">Subpackages</a><ul>
<li class="toctree-l3"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html">PyCTBN.PyCTBN.estimators package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.fam_score_calculator">PyCTBN.PyCTBN.estimators.fam_score_calculator module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.parameters_estimator">PyCTBN.PyCTBN.estimators.parameters_estimator module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator">PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_estimator">PyCTBN.PyCTBN.estimators.structure_estimator module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_score_based_estimator">PyCTBN.PyCTBN.estimators.structure_score_based_estimator module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators">Module contents</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html">PyCTBN.PyCTBN.optimizers package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.constraint_based_optimizer">PyCTBN.PyCTBN.optimizers.constraint_based_optimizer module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.hill_climbing_search">PyCTBN.PyCTBN.optimizers.hill_climbing_search module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.optimizer">PyCTBN.PyCTBN.optimizers.optimizer module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.tabu_search">PyCTBN.PyCTBN.optimizers.tabu_search module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers">Module contents</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html">PyCTBN.PyCTBN.structure_graph package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.network_graph">PyCTBN.PyCTBN.structure_graph.network_graph module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.sample_path">PyCTBN.PyCTBN.structure_graph.sample_path module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.set_of_cims">PyCTBN.PyCTBN.structure_graph.set_of_cims module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.structure">PyCTBN.PyCTBN.structure_graph.structure module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.trajectory">PyCTBN.PyCTBN.structure_graph.trajectory module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph">Module contents</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html">PyCTBN.PyCTBN.utility package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.abstract_importer">PyCTBN.PyCTBN.utility.abstract_importer module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.cache">PyCTBN.PyCTBN.utility.cache module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.json_importer">PyCTBN.PyCTBN.utility.json_importer module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.sample_importer">PyCTBN.PyCTBN.utility.sample_importer module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility">Module contents</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.html#module-PyCTBN.PyCTBN">Module contents</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-PyCTBN">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-PyCTBN" title="Permalink to this headline"></a></h2>
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2021, Bregoli Alessandro, Martini Filippo, Moretti Luca.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/jucacrispim/sphinx_pdj_theme">theme</a> provided by <a href="http://poraodojuca.net">Porão do Juca</a>.
</footer>
</div>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js">
</script>
<script type="text/javascript" src="_static/underscore.js">
</script>
<script type="text/javascript" src="_static/doctools.js">
</script>
<script type="text/javascript" src="_static/language_data.js">
</script>
<script type="text/javascript"
src="_static/js/theme.js"></script>
<script type="text/javascript"
src="_static/js/pdj.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>

@ -0,0 +1,53 @@
PyCTBN.PyCTBN.estimators package
================================
Submodules
----------
PyCTBN.PyCTBN.estimators.fam\_score\_calculator module
------------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.estimators.fam_score_calculator
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.estimators.parameters\_estimator module
-----------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.estimators.parameters_estimator
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.estimators.structure\_constraint\_based\_estimator module
-----------------------------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.estimators.structure\_estimator module
----------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.estimators.structure_estimator
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.estimators.structure\_score\_based\_estimator module
------------------------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.estimators.structure_score_based_estimator
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: PyCTBN.PyCTBN.estimators
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,45 @@
PyCTBN.PyCTBN.optimizers package
================================
Submodules
----------
PyCTBN.PyCTBN.optimizers.constraint\_based\_optimizer module
------------------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.optimizers.constraint_based_optimizer
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.optimizers.hill\_climbing\_search module
------------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.optimizers.hill_climbing_search
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.optimizers.optimizer module
-----------------------------------------
.. automodule:: PyCTBN.PyCTBN.optimizers.optimizer
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.optimizers.tabu\_search module
--------------------------------------------
.. automodule:: PyCTBN.PyCTBN.optimizers.tabu_search
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: PyCTBN.PyCTBN.optimizers
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,21 @@
PyCTBN.PyCTBN package
=====================
Subpackages
-----------
.. toctree::
:maxdepth: 4
PyCTBN.PyCTBN.estimators
PyCTBN.PyCTBN.optimizers
PyCTBN.PyCTBN.structure_graph
PyCTBN.PyCTBN.utility
Module contents
---------------
.. automodule:: PyCTBN.PyCTBN
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,61 @@
PyCTBN.PyCTBN.structure\_graph package
======================================
Submodules
----------
PyCTBN.PyCTBN.structure\_graph.conditional\_intensity\_matrix module
--------------------------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.structure\_graph.network\_graph module
----------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.structure_graph.network_graph
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.structure\_graph.sample\_path module
--------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.structure_graph.sample_path
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.structure\_graph.set\_of\_cims module
---------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.structure_graph.set_of_cims
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.structure\_graph.structure module
-----------------------------------------------
.. automodule:: PyCTBN.PyCTBN.structure_graph.structure
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.structure\_graph.trajectory module
------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.structure_graph.trajectory
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: PyCTBN.PyCTBN.structure_graph
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,45 @@
PyCTBN.PyCTBN.utility package
=============================
Submodules
----------
PyCTBN.PyCTBN.utility.abstract\_importer module
-----------------------------------------------
.. automodule:: PyCTBN.PyCTBN.utility.abstract_importer
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.utility.cache module
----------------------------------
.. automodule:: PyCTBN.PyCTBN.utility.cache
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.utility.json\_importer module
-------------------------------------------
.. automodule:: PyCTBN.PyCTBN.utility.json_importer
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.utility.sample\_importer module
---------------------------------------------
.. automodule:: PyCTBN.PyCTBN.utility.sample_importer
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: PyCTBN.PyCTBN.utility
:members:
:undoc-members:
:show-inheritance:

@ -1,5 +1,5 @@
PyCTBN package PyCTBN package
=============== ==============
Subpackages Subpackages
----------- -----------
@ -7,10 +7,10 @@ Subpackages
.. toctree:: .. toctree::
:maxdepth: 4 :maxdepth: 4
PyCTBN.estimators PyCTBN.PyCTBN
PyCTBN.optimizers
PyCTBN.structure_graph Submodules
PyCTBN.utility ----------
Module contents Module contents
--------------- ---------------

@ -1,5 +1,5 @@
.. PyCTBN documentation master file, created by .. PyCTBN documentation master file, created by
sphinx-quickstart on Wed Feb 24 18:06:35 2021. sphinx-quickstart on Wed Mar 3 14:50:44 2021.
You can adapt this file completely to your liking, but it should at least You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive. contain the root `toctree` directive.
@ -7,10 +7,11 @@ Welcome to PyCTBN's documentation!
================================== ==================================
.. toctree:: .. toctree::
:maxdepth: 3 :maxdepth: 4
:caption: Contents: :caption: Contents:
examples modules
Indices and tables Indices and tables

@ -1,7 +1,8 @@
PyCTBN PyCTBN
======= ======
.. toctree:: .. toctree::
:maxdepth: 4 :maxdepth: 4
PyCTBN PyCTBN.PyCTBN
examples

Before

Width:  |  Height:  |  Size: 286 B

After

Width:  |  Height:  |  Size: 286 B

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -2046,7 +2046,7 @@ Expr = Sizzle.selectors = {
"PSEUDO": function( pseudo, argument ) { "PSEUDO": function( pseudo, argument ) {
// pseudo-class names are case-insensitive // pseudo-class names are case-insensitive
// http://www.w3.org/TR/selectors/#pseudo-PyCTBN // http://www.w3.org/TR/selectors/#pseudo-classes
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
// Remember that setFilters inherits from pseudos // Remember that setFilters inherits from pseudos
var args, var args,
@ -8255,7 +8255,7 @@ function getClass( elem ) {
return elem.getAttribute && elem.getAttribute( "class" ) || ""; return elem.getAttribute && elem.getAttribute( "class" ) || "";
} }
function PyCTBNToArray( value ) { function classesToArray( value ) {
if ( Array.isArray( value ) ) { if ( Array.isArray( value ) ) {
return value; return value;
} }
@ -8267,7 +8267,7 @@ function PyCTBNToArray( value ) {
jQuery.fn.extend( { jQuery.fn.extend( {
addClass: function( value ) { addClass: function( value ) {
var PyCTBN, elem, cur, curValue, clazz, j, finalValue, var classes, elem, cur, curValue, clazz, j, finalValue,
i = 0; i = 0;
if ( isFunction( value ) ) { if ( isFunction( value ) ) {
@ -8276,16 +8276,16 @@ jQuery.fn.extend( {
} ); } );
} }
PyCTBN = PyCTBNToArray( value ); classes = classesToArray( value );
if ( PyCTBN.length ) { if ( classes.length ) {
while ( ( elem = this[ i++ ] ) ) { while ( ( elem = this[ i++ ] ) ) {
curValue = getClass( elem ); curValue = getClass( elem );
cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
if ( cur ) { if ( cur ) {
j = 0; j = 0;
while ( ( clazz = PyCTBN[ j++ ] ) ) { while ( ( clazz = classes[ j++ ] ) ) {
if ( cur.indexOf( " " + clazz + " " ) < 0 ) { if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
cur += clazz + " "; cur += clazz + " ";
} }
@ -8304,7 +8304,7 @@ jQuery.fn.extend( {
}, },
removeClass: function( value ) { removeClass: function( value ) {
var PyCTBN, elem, cur, curValue, clazz, j, finalValue, var classes, elem, cur, curValue, clazz, j, finalValue,
i = 0; i = 0;
if ( isFunction( value ) ) { if ( isFunction( value ) ) {
@ -8317,9 +8317,9 @@ jQuery.fn.extend( {
return this.attr( "class", "" ); return this.attr( "class", "" );
} }
PyCTBN = PyCTBNToArray( value ); classes = classesToArray( value );
if ( PyCTBN.length ) { if ( classes.length ) {
while ( ( elem = this[ i++ ] ) ) { while ( ( elem = this[ i++ ] ) ) {
curValue = getClass( elem ); curValue = getClass( elem );
@ -8328,7 +8328,7 @@ jQuery.fn.extend( {
if ( cur ) { if ( cur ) {
j = 0; j = 0;
while ( ( clazz = PyCTBN[ j++ ] ) ) { while ( ( clazz = classes[ j++ ] ) ) {
// Remove *all* instances // Remove *all* instances
while ( cur.indexOf( " " + clazz + " " ) > -1 ) { while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
@ -8373,7 +8373,7 @@ jQuery.fn.extend( {
// Toggle individual class names // Toggle individual class names
i = 0; i = 0;
self = jQuery( this ); self = jQuery( this );
classNames = PyCTBNToArray( value ); classNames = classesToArray( value );
while ( ( className = classNames[ i++ ] ) ) { while ( ( className = classNames[ i++ ] ) ) {

Before

Width:  |  Height:  |  Size: 90 B

After

Width:  |  Height:  |  Size: 90 B

Before

Width:  |  Height:  |  Size: 90 B

After

Width:  |  Height:  |  Size: 90 B

@ -27,7 +27,8 @@
href="genindex.html"/> href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/> <link rel="search" title="Search" href="search.html"/>
<link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/> <link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/>
<link rel="prev" title="Welcome to PyCTBN’s documentation!" href="index.html"/> <link rel="up" title="PyCTBN" href="modules.html"/>
<link rel="prev" title="PyCTBN.PyCTBN.utility package" href="PyCTBN.PyCTBN.utility.html"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" /> <meta http-equiv="cache-control" content="public" />
@ -61,11 +62,9 @@
<p class="caption"><span class="caption-text">Contents:</span></p> <p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current"> <ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Examples</a><ul> <li class="toctree-l1 current"><a class="reference internal" href="modules.html">PyCTBN</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="#installation-usage">Installation/Usage</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a></li>
<li class="toctree-l2"><a class="reference internal" href="#implementing-your-own-data-importer">Implementing your own data importer</a></li> <li class="toctree-l2 current"><a class="current reference internal" href="#">Examples</a></li>
<li class="toctree-l2"><a class="reference internal" href="#parameters-estimation-example">Parameters Estimation Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="#structure-estimation-example">Structure Estimation Example</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -235,7 +234,7 @@
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="index.html" class="btn btn-neutral" title="Welcome to PyCTBN’s documentation!"><span class="fa fa-arrow-circle-left"></span> Previous</a> <a href="PyCTBN.PyCTBN.utility.html" class="btn btn-neutral" title="PyCTBN.PyCTBN.utility package"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div> </div>

@ -0,0 +1,873 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xml:lang="" lang="" version="-//W3C//DTD XHTML 1.1//EN" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Index &mdash; PyCTBN 2.0 documentation</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'/>
<link rel="stylesheet" href="_static/css/pdj.css" type="text/css" />
<link rel="index" title="Index"
href="#"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" />
<meta name="robots" content="follow, all" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Add jQuery library -->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="index.html" class="fa fa-home"> PyCTBN </a>
<div role="search">
<form id ="rtd-search-form" class="wy-form"
action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="modules.html">PyCTBN</a><ul>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
</ul>
</li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" id="barra-mobile" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="#">Porão do Juca</a>
</nav>
<div class="wy-nav-content">
<div class="fundo-claro">
</div>
<div class="fundo-escuro">
</div>
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<!-- <ul class="wy-breadcrumbs"> -->
<!-- <li><a href="#">Docs</a> &raquo;</li> -->
<!-- <li>Features</li> -->
<!-- <li class="wy-breadcrumbs-aside"> -->
<!-- <a href="_sources/index.txt" rel="nofollow"> View page source</a> -->
<!-- </li> -->
<!-- </ul> -->
<!-- <hr/> -->
</div>
<div role="main" class="">
<div id="content" class="hfeed entry-container hentry">
<h1 id="index">Index</h1>
<div class="genindex-jumpbox">
<a href="#A"><strong>A</strong></a>
| <a href="#B"><strong>B</strong></a>
| <a href="#C"><strong>C</strong></a>
| <a href="#D"><strong>D</strong></a>
| <a href="#E"><strong>E</strong></a>
| <a href="#F"><strong>F</strong></a>
| <a href="#G"><strong>G</strong></a>
| <a href="#H"><strong>H</strong></a>
| <a href="#I"><strong>I</strong></a>
| <a href="#J"><strong>J</strong></a>
| <a href="#M"><strong>M</strong></a>
| <a href="#N"><strong>N</strong></a>
| <a href="#O"><strong>O</strong></a>
| <a href="#P"><strong>P</strong></a>
| <a href="#R"><strong>R</strong></a>
| <a href="#S"><strong>S</strong></a>
| <a href="#T"><strong>T</strong></a>
| <a href="#V"><strong>V</strong></a>
</div>
<h2 id="A">A</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter">AbstractImporter (class in PyCTBN.PyCTBN.utility.abstract_importer)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.actual_cims">actual_cims() (PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims property)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.structure.Structure.add_edge">add_edge() (PyCTBN.PyCTBN.structure_graph.structure.Structure method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.add_edges">add_edges() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.add_nodes">add_nodes() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.adjacency_matrix">adjacency_matrix() (PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator method)</a>
</li>
</ul></td>
</tr></table>
<h2 id="B">B</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.build_cims">build_cims() (PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.build_complete_graph">build_complete_graph() (PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator static method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.build_list_of_samples_array">build_list_of_samples_array() (PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_p_comb_structure_for_a_node">build_p_comb_structure_for_a_node() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph static method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.build_removable_edges_matrix">build_removable_edges_matrix() (PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.build_sorter">build_sorter() (PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter method)</a>
<ul>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.build_sorter">(PyCTBN.PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.sample_importer.SampleImporter.build_sorter">(PyCTBN.PyCTBN.utility.sample_importer.SampleImporter method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.build_structure">build_structure() (PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_time_columns_filtering_for_a_node">build_time_columns_filtering_for_a_node() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph static method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_time_scalar_indexing_structure_for_a_node">build_time_scalar_indexing_structure_for_a_node() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph static method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.build_times_and_transitions_structures">build_times_and_transitions_structures() (PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.build_trajectories">build_trajectories() (PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_transition_filtering_for_a_node">build_transition_filtering_for_a_node() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph static method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_transition_scalar_indexing_structure_for_a_node">build_transition_scalar_indexing_structure_for_a_node() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph static method)</a>
</li>
</ul></td>
</tr></table>
<h2 id="C">C</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.cache.Cache">Cache (class in PyCTBN.PyCTBN.utility.cache)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.cim">cim() (PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix property)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.structure.Structure.clean_structure_edges">clean_structure_edges() (PyCTBN.PyCTBN.structure_graph.structure.Structure method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.cache.Cache.clear">clear() (PyCTBN.PyCTBN.utility.cache.Cache method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.clear_concatenated_frame">clear_concatenated_frame() (PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.clear_data_frame_list">clear_data_frame_list() (PyCTBN.PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.clear_indexing_filtering_structures">clear_indexing_filtering_structures() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.clear_memory">clear_memory() (PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.complete_test">complete_test() (PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.complete_trajectory">complete_trajectory() (PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory property)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.compute_cim_coefficients">compute_cim_coefficients() (PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_parameters_for_node">compute_parameters_for_node() (PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.compute_row_delta_in_all_samples_frames">compute_row_delta_in_all_samples_frames() (PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.compute_row_delta_sigle_samples_frame">compute_row_delta_sigle_samples_frame() (PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_state_res_time_for_node">compute_state_res_time_for_node() (PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator static method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_state_transitions_for_a_node">compute_state_transitions_for_a_node() (PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator static method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.compute_thumb_value">compute_thumb_value() (PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.concatenated_samples">concatenated_samples() (PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter property)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">ConditionalIntensityMatrix (class in PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix)</a>
</li>
<li><a href="PyCTBN.PyCTBN.optimizers.html#PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer">ConstraintBasedOptimizer (class in PyCTBN.PyCTBN.optimizers.constraint_based_optimizer)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.structure.Structure.contains_edge">contains_edge() (PyCTBN.PyCTBN.structure_graph.structure.Structure method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.ctpc_algorithm">ctpc_algorithm() (PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator method)</a>
</li>
</ul></td>
</tr></table>
<h2 id="D">D</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.dataset_id">dataset_id() (PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter method)</a>
<ul>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.dataset_id">(PyCTBN.PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.sample_importer.SampleImporter.dataset_id">(PyCTBN.PyCTBN.utility.sample_importer.SampleImporter method)</a>
</li>
</ul></li>
</ul></td>
</tr></table>
<h2 id="E">E</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.edges">edges() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph property)</a>
<ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.structure.Structure.edges">(PyCTBN.PyCTBN.structure_graph.structure.Structure property)</a>
</li>
</ul></li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.estimate_parents">estimate_parents() (PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.estimate_structure">estimate_structure() (PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator method)</a>
<ul>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.estimate_structure">(PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.estimate_structure">(PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator method)</a>
</li>
</ul></li>
</ul></td>
</tr></table>
<h2 id="F">F</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator">FamScoreCalculator (class in PyCTBN.PyCTBN.estimators.fam_score_calculator)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.fast_init">fast_init() (PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator method)</a>
<ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.fast_init">(PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.file_path">file_path() (PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter property)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.filter_cims_with_mask">filter_cims_with_mask() (PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.cache.Cache.find">find() (PyCTBN.PyCTBN.utility.cache.Cache method)</a>
</li>
</ul></td>
</tr></table>
<h2 id="G">G</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.generate_possible_sub_sets_of_size">generate_possible_sub_sets_of_size() (PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator static method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.get_cims_number">get_cims_number() (PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.get_fam_score">get_fam_score() (PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.structure.Structure.get_node_id">get_node_id() (PyCTBN.PyCTBN.structure_graph.structure.Structure method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_node_indx">get_node_indx() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
<ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.structure.Structure.get_node_indx">(PyCTBN.PyCTBN.structure_graph.structure.Structure method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_ordered_by_indx_set_of_parents">get_ordered_by_indx_set_of_parents() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_parents_by_id">get_parents_by_id() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_positional_node_indx">get_positional_node_indx() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
<ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.structure.Structure.get_positional_node_indx">(PyCTBN.PyCTBN.structure_graph.structure.Structure method)</a>
</li>
</ul></li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.get_score_from_graph">get_score_from_graph() (PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_states_number">get_states_number() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
<ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.structure.Structure.get_states_number">(PyCTBN.PyCTBN.structure_graph.structure.Structure method)</a>
</li>
</ul></li>
</ul></td>
</tr></table>
<h2 id="H">H</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.has_edge">has_edge() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.has_prior_net_structure">has_prior_net_structure() (PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath property)</a>
</li>
<li><a href="PyCTBN.PyCTBN.optimizers.html#PyCTBN.PyCTBN.optimizers.hill_climbing_search.HillClimbing">HillClimbing (class in PyCTBN.PyCTBN.optimizers.hill_climbing_search)</a>
</li>
</ul></td>
</tr></table>
<h2 id="I">I</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_data">import_data() (PyCTBN.PyCTBN.utility.json_importer.JsonImporter method)</a>
<ul>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.sample_importer.SampleImporter.import_data">(PyCTBN.PyCTBN.utility.sample_importer.SampleImporter method)</a>
</li>
</ul></li>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_sampled_cims">import_sampled_cims() (PyCTBN.PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_structure">import_structure() (PyCTBN.PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_trajectories">import_trajectories() (PyCTBN.PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_variables">import_variables() (PyCTBN.PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.independence_test">independence_test() (PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator method)</a>
</li>
</ul></td>
</tr></table>
<h2 id="J">J</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.json_importer.JsonImporter">JsonImporter (class in PyCTBN.PyCTBN.utility.json_importer)</a>
</li>
</ul></td>
</tr></table>
<h2 id="M">M</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.marginal_likelihood_q">marginal_likelihood_q() (PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.marginal_likelihood_theta">marginal_likelihood_theta() (PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator method)</a>
</li>
<li>
module
<ul>
<li><a href="PyCTBN.html#module-PyCTBN">PyCTBN</a>
</li>
<li><a href="PyCTBN.PyCTBN.html#module-PyCTBN.PyCTBN">PyCTBN.PyCTBN</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators">PyCTBN.PyCTBN.estimators</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.fam_score_calculator">PyCTBN.PyCTBN.estimators.fam_score_calculator</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.parameters_estimator">PyCTBN.PyCTBN.estimators.parameters_estimator</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator">PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_estimator">PyCTBN.PyCTBN.estimators.structure_estimator</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_score_based_estimator">PyCTBN.PyCTBN.estimators.structure_score_based_estimator</a>
</li>
<li><a href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers">PyCTBN.PyCTBN.optimizers</a>
</li>
<li><a href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.constraint_based_optimizer">PyCTBN.PyCTBN.optimizers.constraint_based_optimizer</a>
</li>
<li><a href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.hill_climbing_search">PyCTBN.PyCTBN.optimizers.hill_climbing_search</a>
</li>
<li><a href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.optimizer">PyCTBN.PyCTBN.optimizers.optimizer</a>
</li>
<li><a href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.tabu_search">PyCTBN.PyCTBN.optimizers.tabu_search</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph">PyCTBN.PyCTBN.structure_graph</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.network_graph">PyCTBN.PyCTBN.structure_graph.network_graph</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.sample_path">PyCTBN.PyCTBN.structure_graph.sample_path</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.set_of_cims">PyCTBN.PyCTBN.structure_graph.set_of_cims</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.structure">PyCTBN.PyCTBN.structure_graph.structure</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.trajectory">PyCTBN.PyCTBN.structure_graph.trajectory</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility">PyCTBN.PyCTBN.utility</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.abstract_importer">PyCTBN.PyCTBN.utility.abstract_importer</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.cache">PyCTBN.PyCTBN.utility.cache</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.json_importer">PyCTBN.PyCTBN.utility.json_importer</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.sample_importer">PyCTBN.PyCTBN.utility.sample_importer</a>
</li>
</ul></li>
</ul></td>
</tr></table>
<h2 id="N">N</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph">NetworkGraph (class in PyCTBN.PyCTBN.structure_graph.network_graph)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.nodes">nodes() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph property)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.nodes_indexes">nodes_indexes() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph property)</a>
<ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.structure.Structure.nodes_indexes">(PyCTBN.PyCTBN.structure_graph.structure.Structure property)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.structure.Structure.nodes_labels">nodes_labels() (PyCTBN.PyCTBN.structure_graph.structure.Structure property)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.nodes_values">nodes_values() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph property)</a>
<ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.structure.Structure.nodes_values">(PyCTBN.PyCTBN.structure_graph.structure.Structure property)</a>
</li>
</ul></li>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.normalize_trajectories">normalize_trajectories() (PyCTBN.PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
</ul></td>
</tr></table>
<h2 id="O">O</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.one_iteration_of_CTPC_algorithm">one_iteration_of_CTPC_algorithm() (PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.one_level_normalizing">one_level_normalizing() (PyCTBN.PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.optimizers.html#PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer.optimize_structure">optimize_structure() (PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer method)</a>
<ul>
<li><a href="PyCTBN.PyCTBN.optimizers.html#PyCTBN.PyCTBN.optimizers.hill_climbing_search.HillClimbing.optimize_structure">(PyCTBN.PyCTBN.optimizers.hill_climbing_search.HillClimbing method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.optimizers.html#PyCTBN.PyCTBN.optimizers.optimizer.Optimizer.optimize_structure">(PyCTBN.PyCTBN.optimizers.optimizer.Optimizer method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.optimizers.html#PyCTBN.PyCTBN.optimizers.tabu_search.TabuSearch.optimize_structure">(PyCTBN.PyCTBN.optimizers.tabu_search.TabuSearch method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.optimizers.html#PyCTBN.PyCTBN.optimizers.optimizer.Optimizer">Optimizer (class in PyCTBN.PyCTBN.optimizers.optimizer)</a>
</li>
</ul></td>
</tr></table>
<h2 id="P">P</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.p_combs">p_combs() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph property)</a>
<ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.p_combs">(PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims property)</a>
</li>
</ul></li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator">ParametersEstimator (class in PyCTBN.PyCTBN.estimators.parameters_estimator)</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.cache.Cache.put">put() (PyCTBN.PyCTBN.utility.cache.Cache method)</a>
</li>
<li>
PyCTBN
<ul>
<li><a href="PyCTBN.html#module-PyCTBN">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN
<ul>
<li><a href="PyCTBN.PyCTBN.html#module-PyCTBN.PyCTBN">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.estimators
<ul>
<li><a href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.estimators.fam_score_calculator
<ul>
<li><a href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.fam_score_calculator">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.estimators.parameters_estimator
<ul>
<li><a href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.parameters_estimator">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator
<ul>
<li><a href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.estimators.structure_estimator
<ul>
<li><a href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_estimator">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.estimators.structure_score_based_estimator
<ul>
<li><a href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_score_based_estimator">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.optimizers
<ul>
<li><a href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.optimizers.constraint_based_optimizer
<ul>
<li><a href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.constraint_based_optimizer">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.optimizers.hill_climbing_search
<ul>
<li><a href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.hill_climbing_search">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.optimizers.optimizer
<ul>
<li><a href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.optimizer">module</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li>
PyCTBN.PyCTBN.optimizers.tabu_search
<ul>
<li><a href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.tabu_search">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.structure_graph
<ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix
<ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.structure_graph.network_graph
<ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.network_graph">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.structure_graph.sample_path
<ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.sample_path">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.structure_graph.set_of_cims
<ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.set_of_cims">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.structure_graph.structure
<ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.structure">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.structure_graph.trajectory
<ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.trajectory">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.utility
<ul>
<li><a href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.utility.abstract_importer
<ul>
<li><a href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.abstract_importer">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.utility.cache
<ul>
<li><a href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.cache">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.utility.json_importer
<ul>
<li><a href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.json_importer">module</a>
</li>
</ul></li>
<li>
PyCTBN.PyCTBN.utility.sample_importer
<ul>
<li><a href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.sample_importer">module</a>
</li>
</ul></li>
</ul></td>
</tr></table>
<h2 id="R">R</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.read_json_file">read_json_file() (PyCTBN.PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.structure.Structure.remove_edge">remove_edge() (PyCTBN.PyCTBN.structure_graph.structure.Structure method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.remove_edges">remove_edges() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.remove_node">remove_node() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
<ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.structure.Structure.remove_node">(PyCTBN.PyCTBN.structure_graph.structure.Structure method)</a>
</li>
</ul></li>
</ul></td>
</tr></table>
<h2 id="S">S</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.sample_importer.SampleImporter">SampleImporter (class in PyCTBN.PyCTBN.utility.sample_importer)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath">SamplePath (class in PyCTBN.PyCTBN.structure_graph.sample_path)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.save_plot_estimated_structure_graph">save_plot_estimated_structure_graph() (PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.save_results">save_results() (PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims">SetOfCims (class in PyCTBN.PyCTBN.structure_graph.set_of_cims)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_cim_xu_marginal_likelihood_q">single_cim_xu_marginal_likelihood_q() (PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_cim_xu_marginal_likelihood_theta">single_cim_xu_marginal_likelihood_theta() (PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_internal_cim_xxu_marginal_likelihood_theta">single_internal_cim_xxu_marginal_likelihood_theta() (PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.size">size() (PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.sorter">sorter() (PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter property)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.spurious_edges">spurious_edges() (PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.state_residence_times">state_residence_times() (PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix property)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.state_transition_matrix">state_transition_matrix() (PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix property)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.structure.Structure">Structure (class in PyCTBN.PyCTBN.structure_graph.structure)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.structure">structure() (PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath property)</a>
<ul>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.structure">(PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter property)</a>
</li>
</ul></li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator">StructureConstraintBasedEstimator (class in PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator">StructureEstimator (class in PyCTBN.PyCTBN.estimators.structure_estimator)</a>
</li>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator">StructureScoreBasedEstimator (class in PyCTBN.PyCTBN.estimators.structure_score_based_estimator)</a>
</li>
</ul></td>
</tr></table>
<h2 id="T">T</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.optimizers.html#PyCTBN.PyCTBN.optimizers.tabu_search.TabuSearch">TabuSearch (class in PyCTBN.PyCTBN.optimizers.tabu_search)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.time_filtering">time_filtering() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph property)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.time_scalar_indexing_strucure">time_scalar_indexing_strucure() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph property)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.times">times() (PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory property)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.total_variables_count">total_variables_count() (PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath property)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.structure.Structure.total_variables_number">total_variables_number() (PyCTBN.PyCTBN.structure_graph.structure.Structure property)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.trajectories">trajectories() (PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath property)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory">Trajectory (class in PyCTBN.PyCTBN.structure_graph.trajectory)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.trajectory">trajectory() (PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory property)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.transition_filtering">transition_filtering() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph property)</a>
</li>
<li><a href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.transition_scalar_indexing_structure">transition_scalar_indexing_structure() (PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph property)</a>
</li>
</ul></td>
</tr></table>
<h2 id="V">V</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.variable_cim_xu_marginal_likelihood_q">variable_cim_xu_marginal_likelihood_q() (PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.variable_cim_xu_marginal_likelihood_theta">variable_cim_xu_marginal_likelihood_theta() (PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator method)</a>
</li>
<li><a href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.variables">variables() (PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter property)</a>
</li>
</ul></td>
</tr></table>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2021, Bregoli Alessandro, Martini Filippo, Moretti Luca.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/jucacrispim/sphinx_pdj_theme">theme</a> provided by <a href="http://poraodojuca.net">Porão do Juca</a>.
</footer>
</div>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js">
</script>
<script type="text/javascript" src="_static/underscore.js">
</script>
<script type="text/javascript" src="_static/doctools.js">
</script>
<script type="text/javascript" src="_static/language_data.js">
</script>
<script type="text/javascript"
src="_static/js/theme.js"></script>
<script type="text/javascript"
src="_static/js/pdj.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>

@ -27,7 +27,7 @@
href="genindex.html"/> href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/> <link rel="search" title="Search" href="search.html"/>
<link rel="top" title="PyCTBN 2.0 documentation" href="#"/> <link rel="top" title="PyCTBN 2.0 documentation" href="#"/>
<link rel="next" title="Examples" href="examples.html"/> <link rel="next" title="PyCTBN" href="modules.html"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" /> <meta http-equiv="cache-control" content="public" />
@ -61,11 +61,9 @@
<p class="caption"><span class="caption-text">Contents:</span></p> <p class="caption"><span class="caption-text">Contents:</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a><ul> <li class="toctree-l1"><a class="reference internal" href="modules.html">PyCTBN</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples.html#installation-usage">Installation/Usage</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#implementing-your-own-data-importer">Implementing your own data importer</a></li> <li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#parameters-estimation-example">Parameters Estimation Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#structure-estimation-example">Structure Estimation Example</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -113,11 +111,25 @@
<div class="toctree-wrapper compound"> <div class="toctree-wrapper compound">
<p class="caption"><span class="caption-text">Contents:</span></p> <p class="caption"><span class="caption-text">Contents:</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a><ul> <li class="toctree-l1"><a class="reference internal" href="modules.html">PyCTBN</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples.html#installation-usage">Installation/Usage</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples.html#implementing-your-own-data-importer">Implementing your own data importer</a></li> <li class="toctree-l3"><a class="reference internal" href="PyCTBN.PyCTBN.html#subpackages">Subpackages</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples.html#parameters-estimation-example">Parameters Estimation Example</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html">PyCTBN.PyCTBN.estimators package</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#structure-estimation-example">Structure Estimation Example</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html">PyCTBN.PyCTBN.optimizers package</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html">PyCTBN.PyCTBN.structure_graph package</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html">PyCTBN.PyCTBN.utility package</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="PyCTBN.PyCTBN.html#module-PyCTBN.PyCTBN">Module contents</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a><ul>
<li class="toctree-l3"><a class="reference internal" href="examples.html#installation-usage">Installation/Usage</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#implementing-your-own-data-importer">Implementing your own data importer</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#parameters-estimation-example">Parameters Estimation Example</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples.html#structure-estimation-example">Structure Estimation Example</a></li>
</ul>
</li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -138,7 +150,7 @@
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="examples.html" class="btn btn-neutral float-right" title="Examples">Next <span class="fa fa-arrow-circle-right"></span></a> <a href="modules.html" class="btn btn-neutral float-right" title="PyCTBN">Next <span class="fa fa-arrow-circle-right"></span></a>
</div> </div>

@ -27,6 +27,8 @@
href="genindex.html"/> href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/> <link rel="search" title="Search" href="search.html"/>
<link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/> <link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/>
<link rel="next" title="PyCTBN.PyCTBN package" href="PyCTBN.PyCTBN.html"/>
<link rel="prev" title="Welcome to PyCTBN’s documentation!" href="index.html"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" /> <meta http-equiv="cache-control" content="public" />
@ -59,12 +61,10 @@
<p class="caption"><span class="caption-text">Contents:</span></p> <p class="caption"><span class="caption-text">Contents:</span></p>
<ul> <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a><ul> <li class="toctree-l1 current"><a class="current reference internal" href="#">PyCTBN</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples.html#installation-usage">Installation/Usage</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#implementing-your-own-data-importer">Implementing your own data importer</a></li> <li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#parameters-estimation-example">Parameters Estimation Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#structure-estimation-example">Structure Estimation Example</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -107,57 +107,61 @@
<div role="main" class=""> <div role="main" class="">
<div id="content" class="hfeed entry-container hentry"> <div id="content" class="hfeed entry-container hentry">
<div class="section" id="PyCTBN"> <div class="section" id="pyctbn">
<h1>PyCTBN<a class="headerlink" href="#PyCTBN" title="Permalink to this headline"></a></h1> <h1>PyCTBN<a class="headerlink" href="#pyctbn" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound"> <div class="toctree-wrapper compound">
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="PyCTBN.html">PyCTBN package</a><ul> <li class="toctree-l1"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.html#subpackages">Subpackages</a><ul> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.html#subpackages">Subpackages</a><ul>
<li class="toctree-l3"><a class="reference internal" href="PyCTBN.estimators.html">PyCTBN.estimators package</a><ul> <li class="toctree-l3"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html">PyCTBN.PyCTBN.estimators package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.estimators.html#submodules">Submodules</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.estimators.html#module-PyCTBN.estimators.fam_score_calculator">PyCTBN.estimators.fam_score_calculator module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.fam_score_calculator">PyCTBN.PyCTBN.estimators.fam_score_calculator module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.estimators.html#module-PyCTBN.estimators.parameters_estimator">PyCTBN.estimators.parameters_estimator module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.parameters_estimator">PyCTBN.PyCTBN.estimators.parameters_estimator module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.estimators.html#module-PyCTBN.estimators.structure_constraint_based_estimator">PyCTBN.estimators.structure_constraint_based_estimator module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator">PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.estimators.html#module-PyCTBN.estimators.structure_estimator">PyCTBN.estimators.structure_estimator module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_estimator">PyCTBN.PyCTBN.estimators.structure_estimator module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.estimators.html#module-PyCTBN.estimators.structure_score_based_estimator">PyCTBN.estimators.structure_score_based_estimator module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_score_based_estimator">PyCTBN.PyCTBN.estimators.structure_score_based_estimator module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.estimators.html#module-PyCTBN.estimators">Module contents</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators">Module contents</a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l3"><a class="reference internal" href="PyCTBN.optimizers.html">PyCTBN.optimizers package</a><ul> <li class="toctree-l3"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html">PyCTBN.PyCTBN.optimizers package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.optimizers.html#submodules">Submodules</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.constraint_based_optimizer">PyCTBN.optimizers.constraint_based_optimizer module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.constraint_based_optimizer">PyCTBN.PyCTBN.optimizers.constraint_based_optimizer module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.hill_climbing_search">PyCTBN.optimizers.hill_climbing_search module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.hill_climbing_search">PyCTBN.PyCTBN.optimizers.hill_climbing_search module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.optimizer">PyCTBN.optimizers.optimizer module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.optimizer">PyCTBN.PyCTBN.optimizers.optimizer module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.tabu_search">PyCTBN.optimizers.tabu_search module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.tabu_search">PyCTBN.PyCTBN.optimizers.tabu_search module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.optimizers.html#module-PyCTBN.optimizers">Module contents</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers">Module contents</a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l3"><a class="reference internal" href="PyCTBN.structure_graph.html">PyCTBN.structure_graph package</a><ul> <li class="toctree-l3"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html">PyCTBN.PyCTBN.structure_graph package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.structure_graph.html#submodules">Submodules</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.abstract_sample_path">PyCTBN.structure_graph.abstract_sample_path module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.conditional_intensity_matrix">PyCTBN.structure_graph.conditional_intensity_matrix module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.network_graph">PyCTBN.PyCTBN.structure_graph.network_graph module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.network_graph">PyCTBN.structure_graph.network_graph module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.sample_path">PyCTBN.PyCTBN.structure_graph.sample_path module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.sample_path">PyCTBN.structure_graph.sample_path module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.set_of_cims">PyCTBN.PyCTBN.structure_graph.set_of_cims module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.set_of_cims">PyCTBN.structure_graph.set_of_cims module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.structure">PyCTBN.PyCTBN.structure_graph.structure module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.sets_of_cims_container">PyCTBN.structure_graph.sets_of_cims_container module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.trajectory">PyCTBN.PyCTBN.structure_graph.trajectory module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.structure">PyCTBN.structure_graph.structure module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph">Module contents</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.trajectory">PyCTBN.structure_graph.trajectory module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph">Module contents</a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l3"><a class="reference internal" href="PyCTBN.utility.html">PyCTBN.utility package</a><ul> <li class="toctree-l3"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html">PyCTBN.PyCTBN.utility package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.utility.html#submodules">Submodules</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.utility.html#module-PyCTBN.utility.abstract_importer">PyCTBN.utility.abstract_importer module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.abstract_importer">PyCTBN.PyCTBN.utility.abstract_importer module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.utility.html#module-PyCTBN.utility.cache">PyCTBN.utility.cache module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.cache">PyCTBN.PyCTBN.utility.cache module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.utility.html#module-PyCTBN.utility.decorators">PyCTBN.utility.decorators module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.json_importer">PyCTBN.PyCTBN.utility.json_importer module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.utility.html#module-PyCTBN.utility.json_importer">PyCTBN.utility.json_importer module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.sample_importer">PyCTBN.PyCTBN.utility.sample_importer module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.utility.html#module-PyCTBN.utility.sample_importer">PyCTBN.utility.sample_importer module</a></li> <li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility">Module contents</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.utility.html#module-PyCTBN.utility">Module contents</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
</li> </li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.html#module-PyCTBN">Module contents</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.html#module-PyCTBN.PyCTBN">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples.html#installation-usage">Installation/Usage</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#implementing-your-own-data-importer">Implementing your own data importer</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#parameters-estimation-example">Parameters Estimation Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#structure-estimation-example">Structure Estimation Example</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -168,6 +172,15 @@
</div> </div>
<footer> <footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="PyCTBN.PyCTBN.html" class="btn btn-neutral float-right" title="PyCTBN.PyCTBN package">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="index.html" class="btn btn-neutral" title="Welcome to PyCTBN’s documentation!"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/> <hr/>

Binary file not shown.

@ -63,11 +63,9 @@
<p class="caption"><span class="caption-text">Contents:</span></p> <p class="caption"><span class="caption-text">Contents:</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a><ul> <li class="toctree-l1"><a class="reference internal" href="modules.html">PyCTBN</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples.html#installation-usage">Installation/Usage</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#implementing-your-own-data-importer">Implementing your own data importer</a></li> <li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#parameters-estimation-example">Parameters Estimation Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#structure-estimation-example">Structure Estimation Example</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -114,13 +112,13 @@
<h1>Python Module Index</h1> <h1>Python Module Index</h1>
<div class="modindex-jumpbox"> <div class="modindex-jumpbox">
<a href="#cap-c"><strong>c</strong></a> <a href="#cap-p"><strong>p</strong></a>
</div> </div>
<table class="indextable modindextable"> <table class="indextable modindextable">
<tr class="pcap"><td></td><td>&#160;</td><td></td></tr> <tr class="pcap"><td></td><td>&#160;</td><td></td></tr>
<tr class="cap" id="cap-c"><td></td><td> <tr class="cap" id="cap-p"><td></td><td>
<strong>c</strong></td><td></td></tr> <strong>p</strong></td><td></td></tr>
<tr> <tr>
<td><img src="_static/minus.png" class="toggler" <td><img src="_static/minus.png" class="toggler"
id="toggle-1" style="display: none" alt="-" /></td> id="toggle-1" style="display: none" alt="-" /></td>
@ -130,132 +128,122 @@
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.estimators.html#module-PyCTBN.estimators"><code class="xref">PyCTBN.estimators</code></a></td><td> <a href="PyCTBN.PyCTBN.html#module-PyCTBN.PyCTBN"><code class="xref">PyCTBN.PyCTBN</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.estimators.html#module-PyCTBN.estimators.fam_score_calculator"><code class="xref">PyCTBN.estimators.fam_score_calculator</code></a></td><td> <a href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators"><code class="xref">PyCTBN.PyCTBN.estimators</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.estimators.html#module-PyCTBN.estimators.parameters_estimator"><code class="xref">PyCTBN.estimators.parameters_estimator</code></a></td><td> <a href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.fam_score_calculator"><code class="xref">PyCTBN.PyCTBN.estimators.fam_score_calculator</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.estimators.html#module-PyCTBN.estimators.structure_constraint_based_estimator"><code class="xref">PyCTBN.estimators.structure_constraint_based_estimator</code></a></td><td> <a href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.parameters_estimator"><code class="xref">PyCTBN.PyCTBN.estimators.parameters_estimator</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.estimators.html#module-PyCTBN.estimators.structure_estimator"><code class="xref">PyCTBN.estimators.structure_estimator</code></a></td><td> <a href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator"><code class="xref">PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.estimators.html#module-PyCTBN.estimators.structure_score_based_estimator"><code class="xref">PyCTBN.estimators.structure_score_based_estimator</code></a></td><td> <a href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_estimator"><code class="xref">PyCTBN.PyCTBN.estimators.structure_estimator</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.optimizers.html#module-PyCTBN.optimizers"><code class="xref">PyCTBN.optimizers</code></a></td><td> <a href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_score_based_estimator"><code class="xref">PyCTBN.PyCTBN.estimators.structure_score_based_estimator</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.constraint_based_optimizer"><code class="xref">PyCTBN.optimizers.constraint_based_optimizer</code></a></td><td> <a href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers"><code class="xref">PyCTBN.PyCTBN.optimizers</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.hill_climbing_search"><code class="xref">PyCTBN.optimizers.hill_climbing_search</code></a></td><td> <a href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.constraint_based_optimizer"><code class="xref">PyCTBN.PyCTBN.optimizers.constraint_based_optimizer</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.optimizer"><code class="xref">PyCTBN.optimizers.optimizer</code></a></td><td> <a href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.hill_climbing_search"><code class="xref">PyCTBN.PyCTBN.optimizers.hill_climbing_search</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.tabu_search"><code class="xref">PyCTBN.optimizers.tabu_search</code></a></td><td> <a href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.optimizer"><code class="xref">PyCTBN.PyCTBN.optimizers.optimizer</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph"><code class="xref">PyCTBN.structure_graph</code></a></td><td> <a href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.tabu_search"><code class="xref">PyCTBN.PyCTBN.optimizers.tabu_search</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.abstract_sample_path"><code class="xref">PyCTBN.structure_graph.abstract_sample_path</code></a></td><td> <a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph"><code class="xref">PyCTBN.PyCTBN.structure_graph</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.conditional_intensity_matrix"><code class="xref">PyCTBN.structure_graph.conditional_intensity_matrix</code></a></td><td> <a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix"><code class="xref">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.network_graph"><code class="xref">PyCTBN.structure_graph.network_graph</code></a></td><td> <a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.network_graph"><code class="xref">PyCTBN.PyCTBN.structure_graph.network_graph</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.sample_path"><code class="xref">PyCTBN.structure_graph.sample_path</code></a></td><td> <a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.sample_path"><code class="xref">PyCTBN.PyCTBN.structure_graph.sample_path</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.set_of_cims"><code class="xref">PyCTBN.structure_graph.set_of_cims</code></a></td><td> <a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.set_of_cims"><code class="xref">PyCTBN.PyCTBN.structure_graph.set_of_cims</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.sets_of_cims_container"><code class="xref">PyCTBN.structure_graph.sets_of_cims_container</code></a></td><td> <a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.structure"><code class="xref">PyCTBN.PyCTBN.structure_graph.structure</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.structure"><code class="xref">PyCTBN.structure_graph.structure</code></a></td><td> <a href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.trajectory"><code class="xref">PyCTBN.PyCTBN.structure_graph.trajectory</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.trajectory"><code class="xref">PyCTBN.structure_graph.trajectory</code></a></td><td> <a href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility"><code class="xref">PyCTBN.PyCTBN.utility</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.utility.html#module-PyCTBN.utility"><code class="xref">PyCTBN.utility</code></a></td><td> <a href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.abstract_importer"><code class="xref">PyCTBN.PyCTBN.utility.abstract_importer</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.utility.html#module-PyCTBN.utility.abstract_importer"><code class="xref">PyCTBN.utility.abstract_importer</code></a></td><td> <a href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.cache"><code class="xref">PyCTBN.PyCTBN.utility.cache</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.utility.html#module-PyCTBN.utility.cache"><code class="xref">PyCTBN.utility.cache</code></a></td><td> <a href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.json_importer"><code class="xref">PyCTBN.PyCTBN.utility.json_importer</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="PyCTBN.utility.html#module-PyCTBN.utility.decorators"><code class="xref">PyCTBN.utility.decorators</code></a></td><td> <a href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.sample_importer"><code class="xref">PyCTBN.PyCTBN.utility.sample_importer</code></a></td><td>
<em></em></td></tr>
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;
<a href="PyCTBN.utility.html#module-PyCTBN.utility.json_importer"><code class="xref">PyCTBN.utility.json_importer</code></a></td><td>
<em></em></td></tr>
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;
<a href="PyCTBN.utility.html#module-PyCTBN.utility.sample_importer"><code class="xref">PyCTBN.utility.sample_importer</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
</table> </table>

@ -60,11 +60,9 @@
<p class="caption"><span class="caption-text">Contents:</span></p> <p class="caption"><span class="caption-text">Contents:</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a><ul> <li class="toctree-l1"><a class="reference internal" href="modules.html">PyCTBN</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples.html#installation-usage">Installation/Usage</a></li> <li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#implementing-your-own-data-importer">Implementing your own data importer</a></li> <li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#parameters-estimation-example">Parameters Estimation Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#structure-estimation-example">Structure Estimation Example</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>

File diff suppressed because one or more lines are too long

@ -16,13 +16,13 @@
import os import os
import sys import sys
sys.path.insert(0, os.path.abspath('../PyCTBN/')) #sys.path.insert(0, os.path.abspath('../PyCTBN'))
#sys.path.insert(0, os.path.abspath('../PyCTBN/PyCTBN')) #sys.path.insert(0, os.path.abspath('../PyCTBN/PyCTBN'))
sys.path.insert(0, os.path.abspath('../PyCTBN/PyCTBN')) sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../PyCTBN/PyCTBN/estimators')) #sys.path.insert(0, os.path.abspath('../PyCTBN/PyCTBN/estimators'))
sys.path.insert(0, os.path.abspath('../PyCTBN/PyCTBN/optimizers')) #sys.path.insert(0, os.path.abspath('../PyCTBN/PyCTBN/optimizers'))
sys.path.insert(0, os.path.abspath('../PyCTBN/PyCTBN/structure_graph')) #sys.path.insert(0, os.path.abspath('../PyCTBN/PyCTBN/structure_graph'))
sys.path.insert(0, os.path.abspath('../PyCTBN/PyCTBN/utility')) #sys.path.insert(0, os.path.abspath('../PyCTBN/PyCTBN/utility'))
print(sys.path) print(sys.path)

@ -1,5 +1,5 @@
.. PyCTBN documentation master file, created by .. PyCTBN documentation master file, created by
sphinx-quickstart on Wed Feb 24 18:06:35 2021. sphinx-quickstart on Wed Mar 3 14:50:44 2021.
You can adapt this file completely to your liking, but it should at least You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive. contain the root `toctree` directive.
@ -7,10 +7,11 @@ Welcome to PyCTBN's documentation!
================================== ==================================
.. toctree:: .. toctree::
:maxdepth: 3 :maxdepth: 4
:caption: Contents: :caption: Contents:
examples modules
Indices and tables Indices and tables

@ -1,7 +1,8 @@
PyCTBN PyCTBN
======= ======
.. toctree:: .. toctree::
:maxdepth: 4 :maxdepth: 4
PyCTBN PyCTBN.PyCTBN
examples

@ -0,0 +1,825 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xml:lang="" lang="" version="-//W3C//DTD XHTML 1.1//EN" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PyCTBN.PyCTBN.estimators package &mdash; PyCTBN 2.0 documentation</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'/>
<link rel="stylesheet" href="_static/css/pdj.css" type="text/css" />
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/>
<link rel="up" title="PyCTBN.PyCTBN package" href="PyCTBN.PyCTBN.html"/>
<link rel="next" title="PyCTBN.PyCTBN.optimizers package" href="PyCTBN.PyCTBN.optimizers.html"/>
<link rel="prev" title="PyCTBN.PyCTBN package" href="PyCTBN.PyCTBN.html"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" />
<meta name="robots" content="follow, all" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Add jQuery library -->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="index.html" class="fa fa-home"> PyCTBN </a>
<div role="search">
<form id ="rtd-search-form" class="wy-form"
action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">PyCTBN</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
</ul>
</li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" id="barra-mobile" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="#">Porão do Juca</a>
</nav>
<div class="wy-nav-content">
<div class="fundo-claro">
</div>
<div class="fundo-escuro">
</div>
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<!-- <ul class="wy-breadcrumbs"> -->
<!-- <li><a href="#">Docs</a> &raquo;</li> -->
<!-- <li>Features</li> -->
<!-- <li class="wy-breadcrumbs-aside"> -->
<!-- <a href="_sources/index.txt" rel="nofollow"> View page source</a> -->
<!-- </li> -->
<!-- </ul> -->
<!-- <hr/> -->
</div>
<div role="main" class="">
<div id="content" class="hfeed entry-container hentry">
<div class="section" id="pyctbn-pyctbn-estimators-package">
<h1>PyCTBN.PyCTBN.estimators package<a class="headerlink" href="#pyctbn-pyctbn-estimators-package" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.estimators.fam_score_calculator">
<span id="pyctbn-pyctbn-estimators-fam-score-calculator-module"></span><h2>PyCTBN.PyCTBN.estimators.fam_score_calculator module<a class="headerlink" href="#module-PyCTBN.PyCTBN.estimators.fam_score_calculator" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.estimators.fam_score_calculator.</code><code class="sig-name descname">FamScoreCalculator</code><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Has the task of calculating the FamScore of a node by using a Bayesian score function</p>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.get_fam_score">
<code class="sig-name descname">get_fam_score</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cims</span><span class="p">:</span> <span class="n">numpy.array</span></em>, <em class="sig-param"><span class="n">tau_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">0.1</span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">1</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.get_fam_score" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the FamScore value of the node</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>cims</strong> (<em>np.array</em>) – np.array with all the node’s cims</p></li>
<li><p><strong>tau_xu</strong> (<em>float</em><em>, </em><em>optional</em>) – hyperparameter over the CTBN’s q parameters, default to 0.1</p></li>
<li><p><strong>alpha_xu</strong> (<em>float</em><em>, </em><em>optional</em>) – hyperparameter over the CTBN’s q parameters, default to 1</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the FamScore value of the node</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.marginal_likelihood_q">
<code class="sig-name descname">marginal_likelihood_q</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cims</span><span class="p">:</span> <span class="n">numpy.array</span></em>, <em class="sig-param"><span class="n">tau_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">0.1</span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">1</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.marginal_likelihood_q" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the value of the marginal likelihood over q of the node identified by the label node_id</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>cims</strong> (<em>np.array</em>) – np.array with all the node’s cims</p></li>
<li><p><strong>tau_xu</strong> (<em>float</em>) – hyperparameter over the CTBN’s q parameters</p></li>
<li><p><strong>alpha_xu</strong> (<em>float</em>) – hyperparameter over the CTBN’s q parameters</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the value of the marginal likelihood over q</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.marginal_likelihood_theta">
<code class="sig-name descname">marginal_likelihood_theta</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cims</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</a></span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">alpha_xxu</span><span class="p">:</span> <span class="n">float</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.marginal_likelihood_theta" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the FamScore value of the node identified by the label node_id</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>cims</strong> (<em>np.array</em>) – np.array with all the node’s cims</p></li>
<li><p><strong>alpha_xu</strong> (<em>float</em>) – hyperparameter over the CTBN’s q parameters, default to 0.1</p></li>
<li><p><strong>alpha_xxu</strong> (<em>float</em>) – distribuited hyperparameter over the CTBN’s theta parameters</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the value of the marginal likelihood over theta</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_cim_xu_marginal_likelihood_q">
<code class="sig-name descname">single_cim_xu_marginal_likelihood_q</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">M_xu_suff_stats</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">T_xu_suff_stats</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">tau_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">0.1</span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">1</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_cim_xu_marginal_likelihood_q" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the marginal likelihood on q of the node when assumes a specif value
and a specif parents’s assignment</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>M_xu_suff_stats</strong> – value of the suffucient statistic M[x|u]</p></li>
<li><p><strong>T_xu_suff_stats</strong> (<em>float</em>) – value of the suffucient statistic T[x|u]</p></li>
<li><p><strong>cim</strong> (<em>class:'ConditionalIntensityMatrix'</em>) – A conditional_intensity_matrix object with the sufficient statistics</p></li>
<li><p><strong>tau_xu</strong> (<em>float</em>) – hyperparameter over the CTBN’s q parameters</p></li>
<li><p><strong>alpha_xu</strong> (<em>float</em>) – hyperparameter over the CTBN’s q parameters</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the value of the marginal likelihood of the node when assumes a specif value</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_cim_xu_marginal_likelihood_theta">
<code class="sig-name descname">single_cim_xu_marginal_likelihood_theta</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">index</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">cim</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</a></span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">alpha_xxu</span><span class="p">:</span> <span class="n">float</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_cim_xu_marginal_likelihood_theta" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the marginal likelihood on q of the node when assumes a specif value
and a specif parents’s assignment</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>cim</strong> (<em>class:'ConditionalIntensityMatrix'</em>) – A conditional_intensity_matrix object with the sufficient statistics</p></li>
<li><p><strong>alpha_xu</strong> (<em>float</em>) – hyperparameter over the CTBN’s q parameters</p></li>
<li><p><strong>alpha_xxu</strong> (<em>float</em>) – distribuited hyperparameter over the CTBN’s theta parameters</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the value of the marginal likelihood over theta when the node assumes a specif value</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_internal_cim_xxu_marginal_likelihood_theta">
<code class="sig-name descname">single_internal_cim_xxu_marginal_likelihood_theta</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">M_xxu_suff_stats</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">alpha_xxu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">1</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_internal_cim_xxu_marginal_likelihood_theta" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the second part of the marginal likelihood over theta formula</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>M_xxu_suff_stats</strong> (<em>float</em>) – value of the suffucient statistic M[xx’<a href="#id1"><span class="problematic" id="id2">|</span></a>u]</p></li>
<li><p><strong>alpha_xxu</strong> (<em>float</em>) – distribuited hyperparameter over the CTBN’s theta parameters</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the value of the marginal likelihood over theta when the node assumes a specif value</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.variable_cim_xu_marginal_likelihood_q">
<code class="sig-name descname">variable_cim_xu_marginal_likelihood_q</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cim</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</a></span></em>, <em class="sig-param"><span class="n">tau_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">0.1</span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">1</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.variable_cim_xu_marginal_likelihood_q" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the value of the marginal likelihood over q given a cim</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>cim</strong> (<em>class:'ConditionalIntensityMatrix'</em>) – A conditional_intensity_matrix object with the sufficient statistics</p></li>
<li><p><strong>tau_xu</strong> (<em>float</em>) – hyperparameter over the CTBN’s q parameters</p></li>
<li><p><strong>alpha_xu</strong> (<em>float</em>) – hyperparameter over the CTBN’s q parameters</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the value of the marginal likelihood over q</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.variable_cim_xu_marginal_likelihood_theta">
<code class="sig-name descname">variable_cim_xu_marginal_likelihood_theta</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cim</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</a></span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">alpha_xxu</span><span class="p">:</span> <span class="n">float</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.variable_cim_xu_marginal_likelihood_theta" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the value of the marginal likelihood over theta given a cim</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>cim</strong> (<em>class:'ConditionalIntensityMatrix'</em>) – A conditional_intensity_matrix object with the sufficient statistics</p></li>
<li><p><strong>alpha_xu</strong> (<em>float</em>) – hyperparameter over the CTBN’s q parameters, default to 0.1</p></li>
<li><p><strong>alpha_xxu</strong> (<em>float</em>) – distribuited hyperparameter over the CTBN’s theta parameters</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the value of the marginal likelihood over theta</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.estimators.parameters_estimator">
<span id="pyctbn-pyctbn-estimators-parameters-estimator-module"></span><h2>PyCTBN.PyCTBN.estimators.parameters_estimator module<a class="headerlink" href="#module-PyCTBN.PyCTBN.estimators.parameters_estimator" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.estimators.parameters_estimator.</code><code class="sig-name descname">ParametersEstimator</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">trajectories</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory" title="PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory">PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory</a></span></em>, <em class="sig-param"><span class="n">net_graph</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph" title="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph">PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph</a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Has the task of computing the cims of particular node given the trajectories and the net structure
in the graph <code class="docutils literal notranslate"><span class="pre">_net_graph</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>trajectories</strong> (<a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory" title="PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory"><em>Trajectory</em></a>) – the trajectories</p></li>
<li><p><strong>net_graph</strong> (<a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph" title="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph"><em>NetworkGraph</em></a>) – the net structure</p></li>
</ul>
</dd>
<dt class="field-even">_single_set_of_cims</dt>
<dd class="field-even"><p>the set of cims object that will hold the cims of the node</p>
</dd>
</dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_parameters_for_node">
<code class="sig-name descname">compute_parameters_for_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; <a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims" title="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims">PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims</a><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_parameters_for_node" title="Permalink to this definition"></a></dt>
<dd><p>Compute the CIMS of the node identified by the label <code class="docutils literal notranslate"><span class="pre">node_id</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>node_id</strong> (<em>string</em>) – the node label</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A SetOfCims object filled with the computed CIMS</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims" title="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims">SetOfCims</a></p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_state_res_time_for_node">
<em class="property">static </em><code class="sig-name descname">compute_state_res_time_for_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">times</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">trajectory</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">cols_filter</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">scalar_indexes_struct</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">T</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_state_res_time_for_node" title="Permalink to this definition"></a></dt>
<dd><p>Compute the state residence times for a node and fill the matrix <code class="docutils literal notranslate"><span class="pre">T</span></code> with the results</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>node_indx</strong> (<em>int</em>) – the index of the node</p></li>
<li><p><strong>times</strong> (<em>numpy.array</em>) – the times deltas vector</p></li>
<li><p><strong>trajectory</strong> (<em>numpy.ndArray</em>) – the trajectory</p></li>
<li><p><strong>cols_filter</strong> (<em>numpy.array</em>) – the columns filtering structure</p></li>
<li><p><strong>scalar_indexes_struct</strong> (<em>numpy.array</em>) – the indexing structure</p></li>
<li><p><strong>T</strong> (<em>numpy.ndArray</em>) – the state residence times vectors</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_state_transitions_for_a_node">
<em class="property">static </em><code class="sig-name descname">compute_state_transitions_for_a_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_indx</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">trajectory</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">cols_filter</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">scalar_indexing</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">M</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_state_transitions_for_a_node" title="Permalink to this definition"></a></dt>
<dd><p>Compute the state residence times for a node and fill the matrices <code class="docutils literal notranslate"><span class="pre">M</span></code> with the results.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>node_indx</strong> (<em>int</em>) – the index of the node</p></li>
<li><p><strong>trajectory</strong> (<em>numpy.ndArray</em>) – the trajectory</p></li>
<li><p><strong>cols_filter</strong> (<em>numpy.array</em>) – the columns filtering structure</p></li>
<li><p><strong>scalar_indexing</strong> (<em>numpy.array</em>) – the indexing structure</p></li>
<li><p><strong>M</strong> (<em>numpy.ndArray</em>) – the state transitions matrices</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.fast_init">
<code class="sig-name descname">fast_init</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.fast_init" title="Permalink to this definition"></a></dt>
<dd><p>Initializes all the necessary structures for the parameters estimation for the node <code class="docutils literal notranslate"><span class="pre">node_id</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>node_id</strong> (<em>string</em>) – the node label</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator">
<span id="pyctbn-pyctbn-estimators-structure-constraint-based-estimator-module"></span><h2>PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator module<a class="headerlink" href="#module-PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.</code><code class="sig-name descname">StructureConstraintBasedEstimator</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_path</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath" title="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath">PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath</a></span></em>, <em class="sig-param"><span class="n">exp_test_alfa</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">chi_test_alfa</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">known_edges</span><span class="p">:</span> <span class="n">List</span> <span class="o">=</span> <span class="default_value">[]</span></em>, <em class="sig-param"><span class="n">thumb_threshold</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">25</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator" title="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator</span></code></a></p>
<p>Has the task of estimating the network structure given the trajectories in samplepath by using a constraint-based approach.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sample_path</strong> (<a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath" title="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath"><em>SamplePath</em></a>) – the _sample_path object containing the trajectories and the real structure</p></li>
<li><p><strong>exp_test_alfa</strong> (<em>float</em>) – the significance level for the exponential Hp test</p></li>
<li><p><strong>chi_test_alfa</strong> (<em>float</em>) – the significance level for the chi Hp test</p></li>
</ul>
</dd>
<dt class="field-even">_nodes</dt>
<dd class="field-even"><p>the nodes labels</p>
</dd>
<dt class="field-odd">_nodes_vals</dt>
<dd class="field-odd"><p>the nodes cardinalities</p>
</dd>
<dt class="field-even">_nodes_indxs</dt>
<dd class="field-even"><p>the nodes indexes</p>
</dd>
<dt class="field-odd">_complete_graph</dt>
<dd class="field-odd"><p>the complete directed graph built using the nodes labels in <code class="docutils literal notranslate"><span class="pre">_nodes</span></code></p>
</dd>
<dt class="field-even">_cache</dt>
<dd class="field-even"><p>the Cache object</p>
</dd>
</dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.complete_test">
<code class="sig-name descname">complete_test</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">test_parent</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">test_child</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">parent_set</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">child_states_numb</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">tot_vars_count</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">parent_indx</span></em>, <em class="sig-param"><span class="n">child_indx</span></em><span class="sig-paren">)</span> &#x2192; bool<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.complete_test" title="Permalink to this definition"></a></dt>
<dd><p>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.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>test_parent</strong> (<em>string</em>) – the node label of the test parent</p></li>
<li><p><strong>test_child</strong> (<em>string</em>) – the node label of the child</p></li>
<li><p><strong>parent_set</strong> (<em>List</em>) – the common parent set</p></li>
<li><p><strong>child_states_numb</strong> (<em>int</em>) – the cardinality of the <code class="docutils literal notranslate"><span class="pre">test_child</span></code></p></li>
<li><p><strong>tot_vars_count</strong> (<em>int</em>) – the total number of variables in the net</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>True iff test_child and test_parent are independent given the sep_set parent_set. False otherwise</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>bool</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.compute_thumb_value">
<code class="sig-name descname">compute_thumb_value</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">parent_val</span></em>, <em class="sig-param"><span class="n">child_val</span></em>, <em class="sig-param"><span class="n">parent_set_vals</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.compute_thumb_value" title="Permalink to this definition"></a></dt>
<dd><p>Compute the value to test against the thumb_threshold.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>parent_val</strong> (<em>int</em>) – test parent’s variable cardinality</p></li>
<li><p><strong>child_val</strong> (<em>int</em>) – test child’s variable cardinality</p></li>
<li><p><strong>parent_set_vals</strong> (<em>List</em>) – the cardinalities of the nodes in the current sep-set</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the thumb value for the current independence test</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>int</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.ctpc_algorithm">
<code class="sig-name descname">ctpc_algorithm</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">disable_multiprocessing</span><span class="p">:</span> <span class="n">bool</span> <span class="o">=</span> <span class="default_value">False</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.ctpc_algorithm" title="Permalink to this definition"></a></dt>
<dd><p>Compute the CTPC algorithm over the entire net.</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.estimate_structure">
<code class="sig-name descname">estimate_structure</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">disable_multiprocessing</span><span class="p">:</span> <span class="n">bool</span> <span class="o">=</span> <span class="default_value">False</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.estimate_structure" title="Permalink to this definition"></a></dt>
<dd><p>Abstract method to estimate the structure</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>List of estimated edges</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>Typing.List</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.independence_test">
<code class="sig-name descname">independence_test</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">child_states_numb</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">cim1</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</a></span></em>, <em class="sig-param"><span class="n">cim2</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</a></span></em>, <em class="sig-param"><span class="n">thumb_value</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">parent_indx</span></em>, <em class="sig-param"><span class="n">child_indx</span></em><span class="sig-paren">)</span> &#x2192; bool<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.independence_test" title="Permalink to this definition"></a></dt>
<dd><p>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.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>child_states_numb</strong> (<em>int</em>) – the cardinality of the test child</p></li>
<li><p><strong>cim1</strong> (<a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix"><em>ConditionalIntensityMatrix</em></a>) – a cim belonging to the graph without test parent</p></li>
<li><p><strong>cim2</strong> (<a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix"><em>ConditionalIntensityMatrix</em></a>) – a cim belonging to the graph with test parent</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>True iff both tests do NOT reject the null hypothesis of independence. False otherwise.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>bool</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.one_iteration_of_CTPC_algorithm">
<code class="sig-name descname">one_iteration_of_CTPC_algorithm</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">var_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">tot_vars_count</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.one_iteration_of_CTPC_algorithm" title="Permalink to this definition"></a></dt>
<dd><p>Performs an iteration of the CTPC algorithm using the node <code class="docutils literal notranslate"><span class="pre">var_id</span></code> as <code class="docutils literal notranslate"><span class="pre">test_child</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>var_id</strong> (<em>string</em>) – the node label of the test child</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.estimators.structure_estimator">
<span id="pyctbn-pyctbn-estimators-structure-estimator-module"></span><h2>PyCTBN.PyCTBN.estimators.structure_estimator module<a class="headerlink" href="#module-PyCTBN.PyCTBN.estimators.structure_estimator" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.estimators.structure_estimator.</code><code class="sig-name descname">StructureEstimator</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_path</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath" title="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath">PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath</a></span></em>, <em class="sig-param"><span class="n">known_edges</span><span class="p">:</span> <span class="n">List</span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Has the task of estimating the network structure given the trajectories in <code class="docutils literal notranslate"><span class="pre">samplepath</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>sample_path</strong> (<a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath" title="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath"><em>SamplePath</em></a>) – the _sample_path object containing the trajectories and the real structure</p>
</dd>
<dt class="field-even">_nodes</dt>
<dd class="field-even"><p>the nodes labels</p>
</dd>
<dt class="field-odd">_nodes_vals</dt>
<dd class="field-odd"><p>the nodes cardinalities</p>
</dd>
<dt class="field-even">_nodes_indxs</dt>
<dd class="field-even"><p>the nodes indexes</p>
</dd>
<dt class="field-odd">_complete_graph</dt>
<dd class="field-odd"><p>the complete directed graph built using the nodes labels in <code class="docutils literal notranslate"><span class="pre">_nodes</span></code></p>
</dd>
</dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.adjacency_matrix">
<code class="sig-name descname">adjacency_matrix</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.adjacency_matrix" title="Permalink to this definition"></a></dt>
<dd><p>Converts the estimated structure <code class="docutils literal notranslate"><span class="pre">_complete_graph</span></code> to a boolean adjacency matrix representation.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>The adjacency matrix of the graph <code class="docutils literal notranslate"><span class="pre">_complete_graph</span></code></p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>numpy.ndArray</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.build_complete_graph">
<em class="property">static </em><code class="sig-name descname">build_complete_graph</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_ids</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; networkx.classes.digraph.DiGraph<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.build_complete_graph" title="Permalink to this definition"></a></dt>
<dd><p>Builds a complete directed graph (no self loops) given the nodes labels in the list <code class="docutils literal notranslate"><span class="pre">node_ids</span></code>:</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>node_ids</strong> (<em>List</em>) – the list of nodes labels</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a complete Digraph Object</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>networkx.DiGraph</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.build_removable_edges_matrix">
<code class="sig-name descname">build_removable_edges_matrix</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">known_edges</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.build_removable_edges_matrix" title="Permalink to this definition"></a></dt>
<dd><p>Builds a boolean matrix who shows if a edge could be removed or not, based on prior knowledge given:</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>known_edges</strong> (<em>List</em>) – the list of nodes labels</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a boolean matrix</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>np.ndarray</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.estimate_structure">
<em class="property">abstract </em><code class="sig-name descname">estimate_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.estimate_structure" title="Permalink to this definition"></a></dt>
<dd><p>Abstract method to estimate the structure</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>List of estimated edges</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>Typing.List</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.generate_possible_sub_sets_of_size">
<em class="property">static </em><code class="sig-name descname">generate_possible_sub_sets_of_size</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">u</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">size</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">parent_label</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.generate_possible_sub_sets_of_size" title="Permalink to this definition"></a></dt>
<dd><p>Creates a list containing all possible subsets of the list <code class="docutils literal notranslate"><span class="pre">u</span></code> of size <code class="docutils literal notranslate"><span class="pre">size</span></code>,
that do not contains a the node identified by <code class="docutils literal notranslate"><span class="pre">parent_label</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>u</strong> (<em>List</em>) – the list of nodes</p></li>
<li><p><strong>size</strong> (<em>int</em>) – the size of the subsets</p></li>
<li><p><strong>parent_label</strong> (<em>string</em>) – the node to exclude in the subsets generation</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>an Iterator Object containing a list of lists</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Iterator</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.save_plot_estimated_structure_graph">
<code class="sig-name descname">save_plot_estimated_structure_graph</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">file_path</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.save_plot_estimated_structure_graph" title="Permalink to this definition"></a></dt>
<dd><p>Plot the estimated structure in a graphical model style, use .png extension.
Spurious edges are colored in red if a prior structure is present.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>file_path</strong> – path to save the file to</p>
</dd>
<dt class="field-even">Type</dt>
<dd class="field-even"><p>string</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.save_results">
<code class="sig-name descname">save_results</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.save_results" title="Permalink to this definition"></a></dt>
<dd><p>Save the estimated Structure to a .json file in the path where the data are loaded from.
The file is named as the input dataset but the <cite>results_</cite> word is appended to the results file.</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.spurious_edges">
<code class="sig-name descname">spurious_edges</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.spurious_edges" title="Permalink to this definition"></a></dt>
<dd><dl class="simple">
<dt>Return the spurious edges present in the estimated structure, if a prior net structure is present in</dt><dd><p><code class="docutils literal notranslate"><span class="pre">_sample_path.structure</span></code>.</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>A list containing the spurious edges</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>List</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.estimators.structure_score_based_estimator">
<span id="pyctbn-pyctbn-estimators-structure-score-based-estimator-module"></span><h2>PyCTBN.PyCTBN.estimators.structure_score_based_estimator module<a class="headerlink" href="#module-PyCTBN.PyCTBN.estimators.structure_score_based_estimator" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.estimators.structure_score_based_estimator.</code><code class="sig-name descname">StructureScoreBasedEstimator</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_path</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath" title="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath">PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath</a></span></em>, <em class="sig-param"><span class="n">tau_xu</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">0.1</span></em>, <em class="sig-param"><span class="n">alpha_xu</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">1</span></em>, <em class="sig-param"><span class="n">known_edges</span><span class="p">:</span> <span class="n">List</span> <span class="o">=</span> <span class="default_value">[]</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator" title="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator</span></code></a></p>
<p>Has the task of estimating the network structure given the trajectories in samplepath by
using a score based approach.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sample_path</strong> (<a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath" title="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath"><em>SamplePath</em></a>) – the _sample_path object containing the trajectories and the real structure</p></li>
<li><p><strong>tau_xu</strong> (<em>float</em><em>, </em><em>optional</em>) – hyperparameter over the CTBN’s q parameters, default to 0.1</p></li>
<li><p><strong>alpha_xu</strong> (<em>float</em><em>, </em><em>optional</em>) – hyperparameter over the CTBN’s q parameters, default to 1</p></li>
<li><p><strong>known_edges</strong> (<em>List</em><em>, </em><em>optional</em>) – List of known edges, default to []</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.estimate_parents">
<code class="sig-name descname">estimate_parents</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">max_parents</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">iterations_number</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">40</span></em>, <em class="sig-param"><span class="n">patience</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">10</span></em>, <em class="sig-param"><span class="n">tabu_length</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tabu_rules_duration</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">5</span></em>, <em class="sig-param"><span class="n">optimizer</span><span class="p">:</span> <span class="n">str</span> <span class="o">=</span> <span class="default_value">'hill'</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.estimate_parents" title="Permalink to this definition"></a></dt>
<dd><p>Use the FamScore of a node in order to find the best parent nodes</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>node_id</strong> (<em>string</em>) – current node’s id</p></li>
<li><p><strong>max_parents</strong> (<em>int</em><em>, </em><em>optional</em>) – maximum number of parents for each variable. If None, disabled, default to None</p></li>
<li><p><strong>iterations_number</strong> (<em>int</em><em>, </em><em>optional</em>) – maximum number of optimization algorithm’s iteration, default to 40</p></li>
<li><p><strong>patience</strong> (<em>int</em><em>, </em><em>optional</em>) – number of iteration without any improvement before to stop the search.If None, disabled, default to None</p></li>
<li><p><strong>tabu_length</strong> (<em>int</em><em>, </em><em>optional</em>) – maximum lenght of the data structures used in the optimization process, default to None</p></li>
<li><p><strong>tabu_rules_duration</strong> (<em>int</em><em>, </em><em>optional</em>) – number of iterations in which each rule keeps its value, default to None</p></li>
<li><p><strong>optimizer</strong> (<em>string</em><em>, </em><em>optional</em>) – name of the optimizer algorithm. Possible values: ‘hill’ (Hill climbing),’tabu’ (tabu search), defualt to ‘tabu’</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A list of the best edges for the currente node</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>List</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.estimate_structure">
<code class="sig-name descname">estimate_structure</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">max_parents</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">iterations_number</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">40</span></em>, <em class="sig-param"><span class="n">patience</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tabu_length</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tabu_rules_duration</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">optimizer</span><span class="p">:</span> <span class="n">str</span> <span class="o">=</span> <span class="default_value">'tabu'</span></em>, <em class="sig-param"><span class="n">disable_multiprocessing</span><span class="p">:</span> <span class="n">bool</span> <span class="o">=</span> <span class="default_value">False</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.estimate_structure" title="Permalink to this definition"></a></dt>
<dd><p>Compute the score-based algorithm to find the optimal structure</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>max_parents</strong> (<em>int</em><em>, </em><em>optional</em>) – maximum number of parents for each variable. If None, disabled, default to None</p></li>
<li><p><strong>iterations_number</strong> (<em>int</em><em>, </em><em>optional</em>) – maximum number of optimization algorithm’s iteration, default to 40</p></li>
<li><p><strong>patience</strong> (<em>int</em><em>, </em><em>optional</em>) – number of iteration without any improvement before to stop the search.If None, disabled, default to None</p></li>
<li><p><strong>tabu_length</strong> (<em>int</em><em>, </em><em>optional</em>) – maximum lenght of the data structures used in the optimization process, default to None</p></li>
<li><p><strong>tabu_rules_duration</strong> (<em>int</em><em>, </em><em>optional</em>) – number of iterations in which each rule keeps its value, default to None</p></li>
<li><p><strong>optimizer</strong> (<em>string</em><em>, </em><em>optional</em>) – name of the optimizer algorithm. Possible values: ‘hill’ (Hill climbing),’tabu’ (tabu search), defualt to ‘tabu’</p></li>
<li><p><strong>disable_multiprocessing</strong> (<em>Boolean</em><em>, </em><em>optional</em>) – true if you desire to disable the multiprocessing operations, default to False</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.get_score_from_graph">
<code class="sig-name descname">get_score_from_graph</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">graph</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph" title="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph">PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph</a></span></em>, <em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.get_score_from_graph" title="Permalink to this definition"></a></dt>
<dd><p>Get the FamScore of a node</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>node_id</strong> (<em>string</em>) – current node’s id</p></li>
<li><p><strong>graph</strong> (<em>class:'NetworkGraph'</em>) – current graph to be computed</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The FamSCore for this graph structure</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.estimators">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-PyCTBN.PyCTBN.estimators" title="Permalink to this headline"></a></h2>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="PyCTBN.PyCTBN.optimizers.html" class="btn btn-neutral float-right" title="PyCTBN.PyCTBN.optimizers package">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="PyCTBN.PyCTBN.html" class="btn btn-neutral" title="PyCTBN.PyCTBN package"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2021, Bregoli Alessandro, Martini Filippo, Moretti Luca.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/jucacrispim/sphinx_pdj_theme">theme</a> provided by <a href="http://poraodojuca.net">Porão do Juca</a>.
</footer>
</div>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js">
</script>
<script type="text/javascript" src="_static/underscore.js">
</script>
<script type="text/javascript" src="_static/doctools.js">
</script>
<script type="text/javascript" src="_static/language_data.js">
</script>
<script type="text/javascript"
src="_static/js/theme.js"></script>
<script type="text/javascript"
src="_static/js/pdj.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>

@ -0,0 +1,233 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xml:lang="" lang="" version="-//W3C//DTD XHTML 1.1//EN" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PyCTBN.PyCTBN package &mdash; PyCTBN 2.0 documentation</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'/>
<link rel="stylesheet" href="_static/css/pdj.css" type="text/css" />
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/>
<link rel="up" title="PyCTBN" href="modules.html"/>
<link rel="next" title="PyCTBN.PyCTBN.estimators package" href="PyCTBN.PyCTBN.estimators.html"/>
<link rel="prev" title="PyCTBN" href="modules.html"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" />
<meta name="robots" content="follow, all" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Add jQuery library -->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="index.html" class="fa fa-home"> PyCTBN </a>
<div role="search">
<form id ="rtd-search-form" class="wy-form"
action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">PyCTBN</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">PyCTBN.PyCTBN package</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
</ul>
</li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" id="barra-mobile" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="#">Porão do Juca</a>
</nav>
<div class="wy-nav-content">
<div class="fundo-claro">
</div>
<div class="fundo-escuro">
</div>
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<!-- <ul class="wy-breadcrumbs"> -->
<!-- <li><a href="#">Docs</a> &raquo;</li> -->
<!-- <li>Features</li> -->
<!-- <li class="wy-breadcrumbs-aside"> -->
<!-- <a href="_sources/index.txt" rel="nofollow"> View page source</a> -->
<!-- </li> -->
<!-- </ul> -->
<!-- <hr/> -->
</div>
<div role="main" class="">
<div id="content" class="hfeed entry-container hentry">
<div class="section" id="pyctbn-pyctbn-package">
<h1>PyCTBN.PyCTBN package<a class="headerlink" href="#pyctbn-pyctbn-package" title="Permalink to this headline"></a></h1>
<div class="section" id="subpackages">
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html">PyCTBN.PyCTBN.estimators package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.fam_score_calculator">PyCTBN.PyCTBN.estimators.fam_score_calculator module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.parameters_estimator">PyCTBN.PyCTBN.estimators.parameters_estimator module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator">PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_estimator">PyCTBN.PyCTBN.estimators.structure_estimator module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_score_based_estimator">PyCTBN.PyCTBN.estimators.structure_score_based_estimator module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html">PyCTBN.PyCTBN.optimizers package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.constraint_based_optimizer">PyCTBN.PyCTBN.optimizers.constraint_based_optimizer module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.hill_climbing_search">PyCTBN.PyCTBN.optimizers.hill_climbing_search module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.optimizer">PyCTBN.PyCTBN.optimizers.optimizer module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.tabu_search">PyCTBN.PyCTBN.optimizers.tabu_search module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html">PyCTBN.PyCTBN.structure_graph package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.network_graph">PyCTBN.PyCTBN.structure_graph.network_graph module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.sample_path">PyCTBN.PyCTBN.structure_graph.sample_path module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.set_of_cims">PyCTBN.PyCTBN.structure_graph.set_of_cims module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.structure">PyCTBN.PyCTBN.structure_graph.structure module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.trajectory">PyCTBN.PyCTBN.structure_graph.trajectory module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html">PyCTBN.PyCTBN.utility package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.abstract_importer">PyCTBN.PyCTBN.utility.abstract_importer module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.cache">PyCTBN.PyCTBN.utility.cache module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.json_importer">PyCTBN.PyCTBN.utility.json_importer module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.sample_importer">PyCTBN.PyCTBN.utility.sample_importer module</a></li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility">Module contents</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="section" id="module-PyCTBN.PyCTBN">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-PyCTBN.PyCTBN" title="Permalink to this headline"></a></h2>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="PyCTBN.PyCTBN.estimators.html" class="btn btn-neutral float-right" title="PyCTBN.PyCTBN.estimators package">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="modules.html" class="btn btn-neutral" title="PyCTBN"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2021, Bregoli Alessandro, Martini Filippo, Moretti Luca.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/jucacrispim/sphinx_pdj_theme">theme</a> provided by <a href="http://poraodojuca.net">Porão do Juca</a>.
</footer>
</div>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js">
</script>
<script type="text/javascript" src="_static/underscore.js">
</script>
<script type="text/javascript" src="_static/doctools.js">
</script>
<script type="text/javascript" src="_static/language_data.js">
</script>
<script type="text/javascript"
src="_static/js/theme.js"></script>
<script type="text/javascript"
src="_static/js/pdj.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>

@ -0,0 +1,327 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xml:lang="" lang="" version="-//W3C//DTD XHTML 1.1//EN" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PyCTBN.PyCTBN.optimizers package &mdash; PyCTBN 2.0 documentation</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'/>
<link rel="stylesheet" href="_static/css/pdj.css" type="text/css" />
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/>
<link rel="up" title="PyCTBN.PyCTBN package" href="PyCTBN.PyCTBN.html"/>
<link rel="next" title="PyCTBN.PyCTBN.structure_graph package" href="PyCTBN.PyCTBN.structure_graph.html"/>
<link rel="prev" title="PyCTBN.PyCTBN.estimators package" href="PyCTBN.PyCTBN.estimators.html"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" />
<meta name="robots" content="follow, all" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Add jQuery library -->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="index.html" class="fa fa-home"> PyCTBN </a>
<div role="search">
<form id ="rtd-search-form" class="wy-form"
action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">PyCTBN</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
</ul>
</li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" id="barra-mobile" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="#">Porão do Juca</a>
</nav>
<div class="wy-nav-content">
<div class="fundo-claro">
</div>
<div class="fundo-escuro">
</div>
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<!-- <ul class="wy-breadcrumbs"> -->
<!-- <li><a href="#">Docs</a> &raquo;</li> -->
<!-- <li>Features</li> -->
<!-- <li class="wy-breadcrumbs-aside"> -->
<!-- <a href="_sources/index.txt" rel="nofollow"> View page source</a> -->
<!-- </li> -->
<!-- </ul> -->
<!-- <hr/> -->
</div>
<div role="main" class="">
<div id="content" class="hfeed entry-container hentry">
<div class="section" id="pyctbn-pyctbn-optimizers-package">
<h1>PyCTBN.PyCTBN.optimizers package<a class="headerlink" href="#pyctbn-pyctbn-optimizers-package" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.optimizers.constraint_based_optimizer">
<span id="pyctbn-pyctbn-optimizers-constraint-based-optimizer-module"></span><h2>PyCTBN.PyCTBN.optimizers.constraint_based_optimizer module<a class="headerlink" href="#module-PyCTBN.PyCTBN.optimizers.constraint_based_optimizer" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.</code><code class="sig-name descname">ConstraintBasedOptimizer</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">structure_estimator</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator" title="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator">PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator</a></span></em>, <em class="sig-param"><span class="n">tot_vars_count</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#PyCTBN.PyCTBN.optimizers.optimizer.Optimizer" title="PyCTBN.PyCTBN.optimizers.optimizer.Optimizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.PyCTBN.optimizers.optimizer.Optimizer</span></code></a></p>
<p>Optimizer class that implement a CTPC Algorithm</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>node_id</strong> (<em>string</em>) – current node’s id</p></li>
<li><p><strong>structure_estimator</strong> (<em>class:'StructureEstimator'</em>) – a structure estimator object with the information about the net</p></li>
<li><p><strong>tot_vars_count</strong> (<em>int</em>) – number of variables in the dataset</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer.optimize_structure">
<code class="sig-name descname">optimize_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer.optimize_structure" title="Permalink to this definition"></a></dt>
<dd><p>Compute Optimization process for a structure_estimator by using a CTPC Algorithm</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the estimated structure for the node</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>List</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.optimizers.hill_climbing_search">
<span id="pyctbn-pyctbn-optimizers-hill-climbing-search-module"></span><h2>PyCTBN.PyCTBN.optimizers.hill_climbing_search module<a class="headerlink" href="#module-PyCTBN.PyCTBN.optimizers.hill_climbing_search" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.optimizers.hill_climbing_search.HillClimbing">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.optimizers.hill_climbing_search.</code><code class="sig-name descname">HillClimbing</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">structure_estimator</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator" title="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator">PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator</a></span></em>, <em class="sig-param"><span class="n">max_parents</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">iterations_number</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">40</span></em>, <em class="sig-param"><span class="n">patience</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.optimizers.hill_climbing_search.HillClimbing" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#PyCTBN.PyCTBN.optimizers.optimizer.Optimizer" title="PyCTBN.PyCTBN.optimizers.optimizer.Optimizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.PyCTBN.optimizers.optimizer.Optimizer</span></code></a></p>
<p>Optimizer class that implement Hill Climbing Search</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>node_id</strong> (<em>string</em>) – current node’s id</p></li>
<li><p><strong>structure_estimator</strong> (<em>class:'StructureEstimator'</em>) – a structure estimator object with the information about the net</p></li>
<li><p><strong>max_parents</strong> (<em>int</em><em>, </em><em>optional</em>) – maximum number of parents for each variable. If None, disabled, default to None</p></li>
<li><p><strong>iterations_number</strong> (<em>int</em><em>, </em><em>optional</em>) – maximum number of optimization algorithm’s iteration, default to 40</p></li>
<li><p><strong>patience</strong> (<em>int</em><em>, </em><em>optional</em>) – number of iteration without any improvement before to stop the search.If None, disabled, default to None</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.optimizers.hill_climbing_search.HillClimbing.optimize_structure">
<code class="sig-name descname">optimize_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.optimizers.hill_climbing_search.HillClimbing.optimize_structure" title="Permalink to this definition"></a></dt>
<dd><p>Compute Optimization process for a structure_estimator by using a Hill Climbing Algorithm</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the estimated structure for the node</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>List</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.optimizers.optimizer">
<span id="pyctbn-pyctbn-optimizers-optimizer-module"></span><h2>PyCTBN.PyCTBN.optimizers.optimizer module<a class="headerlink" href="#module-PyCTBN.PyCTBN.optimizers.optimizer" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.optimizers.optimizer.Optimizer">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.optimizers.optimizer.</code><code class="sig-name descname">Optimizer</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">structure_estimator</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator" title="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator">PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator</a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.optimizers.optimizer.Optimizer" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">abc.ABC</span></code></p>
<p>Interface class for all the optimizer’s child PyCTBN</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>node_id</strong> (<em>string</em>) – the node label</p></li>
<li><p><strong>structure_estimator</strong> (<em>class:'StructureEstimator'</em>) – A structureEstimator Object to predict the structure</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.optimizers.optimizer.Optimizer.optimize_structure">
<em class="property">abstract </em><code class="sig-name descname">optimize_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.optimizers.optimizer.Optimizer.optimize_structure" title="Permalink to this definition"></a></dt>
<dd><p>Compute Optimization process for a structure_estimator</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the estimated structure for the node</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>List</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.optimizers.tabu_search">
<span id="pyctbn-pyctbn-optimizers-tabu-search-module"></span><h2>PyCTBN.PyCTBN.optimizers.tabu_search module<a class="headerlink" href="#module-PyCTBN.PyCTBN.optimizers.tabu_search" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.optimizers.tabu_search.TabuSearch">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.optimizers.tabu_search.</code><code class="sig-name descname">TabuSearch</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">structure_estimator</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator" title="PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator">PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator</a></span></em>, <em class="sig-param"><span class="n">max_parents</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">iterations_number</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">40</span></em>, <em class="sig-param"><span class="n">patience</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tabu_length</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tabu_rules_duration</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.optimizers.tabu_search.TabuSearch" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#PyCTBN.PyCTBN.optimizers.optimizer.Optimizer" title="PyCTBN.PyCTBN.optimizers.optimizer.Optimizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.PyCTBN.optimizers.optimizer.Optimizer</span></code></a></p>
<p>Optimizer class that implement Tabu Search</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>node_id</strong> (<em>string</em>) – current node’s id</p></li>
<li><p><strong>structure_estimator</strong> (<em>class:'StructureEstimator'</em>) – a structure estimator object with the information about the net</p></li>
<li><p><strong>max_parents</strong> (<em>int</em><em>, </em><em>optional</em>) – maximum number of parents for each variable. If None, disabled, default to None</p></li>
<li><p><strong>iterations_number</strong> (<em>int</em><em>, </em><em>optional</em>) – maximum number of optimization algorithm’s iteration, default to 40</p></li>
<li><p><strong>patience</strong> (<em>int</em><em>, </em><em>optional</em>) – number of iteration without any improvement before to stop the search.If None, disabled, default to None</p></li>
<li><p><strong>tabu_length</strong> (<em>int</em><em>, </em><em>optional</em>) – maximum lenght of the data structures used in the optimization process, default to None</p></li>
<li><p><strong>tabu_rules_duration</strong> (<em>int</em><em>, </em><em>optional</em>) – number of iterations in which each rule keeps its value, default to None</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.optimizers.tabu_search.TabuSearch.optimize_structure">
<code class="sig-name descname">optimize_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.optimizers.tabu_search.TabuSearch.optimize_structure" title="Permalink to this definition"></a></dt>
<dd><p>Compute Optimization process for a structure_estimator by using a Hill Climbing Algorithm</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the estimated structure for the node</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>List</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.optimizers">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-PyCTBN.PyCTBN.optimizers" title="Permalink to this headline"></a></h2>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="PyCTBN.PyCTBN.structure_graph.html" class="btn btn-neutral float-right" title="PyCTBN.PyCTBN.structure_graph package">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="PyCTBN.PyCTBN.estimators.html" class="btn btn-neutral" title="PyCTBN.PyCTBN.estimators package"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2021, Bregoli Alessandro, Martini Filippo, Moretti Luca.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/jucacrispim/sphinx_pdj_theme">theme</a> provided by <a href="http://poraodojuca.net">Porão do Juca</a>.
</footer>
</div>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js">
</script>
<script type="text/javascript" src="_static/underscore.js">
</script>
<script type="text/javascript" src="_static/doctools.js">
</script>
<script type="text/javascript" src="_static/language_data.js">
</script>
<script type="text/javascript"
src="_static/js/theme.js"></script>
<script type="text/javascript"
src="_static/js/pdj.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>

@ -0,0 +1,851 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xml:lang="" lang="" version="-//W3C//DTD XHTML 1.1//EN" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PyCTBN.PyCTBN.structure_graph package &mdash; PyCTBN 2.0 documentation</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'/>
<link rel="stylesheet" href="_static/css/pdj.css" type="text/css" />
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/>
<link rel="up" title="PyCTBN.PyCTBN package" href="PyCTBN.PyCTBN.html"/>
<link rel="next" title="PyCTBN.PyCTBN.utility package" href="PyCTBN.PyCTBN.utility.html"/>
<link rel="prev" title="PyCTBN.PyCTBN.optimizers package" href="PyCTBN.PyCTBN.optimizers.html"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" />
<meta name="robots" content="follow, all" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Add jQuery library -->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="index.html" class="fa fa-home"> PyCTBN </a>
<div role="search">
<form id ="rtd-search-form" class="wy-form"
action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">PyCTBN</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
</ul>
</li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" id="barra-mobile" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="#">Porão do Juca</a>
</nav>
<div class="wy-nav-content">
<div class="fundo-claro">
</div>
<div class="fundo-escuro">
</div>
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<!-- <ul class="wy-breadcrumbs"> -->
<!-- <li><a href="#">Docs</a> &raquo;</li> -->
<!-- <li>Features</li> -->
<!-- <li class="wy-breadcrumbs-aside"> -->
<!-- <a href="_sources/index.txt" rel="nofollow"> View page source</a> -->
<!-- </li> -->
<!-- </ul> -->
<!-- <hr/> -->
</div>
<div role="main" class="">
<div id="content" class="hfeed entry-container hentry">
<div class="section" id="pyctbn-pyctbn-structure-graph-package">
<h1>PyCTBN.PyCTBN.structure_graph package<a class="headerlink" href="#pyctbn-pyctbn-structure-graph-package" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix">
<span id="pyctbn-pyctbn-structure-graph-conditional-intensity-matrix-module"></span><h2>PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix module<a class="headerlink" href="#module-PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.</code><code class="sig-name descname">ConditionalIntensityMatrix</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">state_residence_times</span><span class="p">:</span> <span class="n">numpy.array</span></em>, <em class="sig-param"><span class="n">state_transition_matrix</span><span class="p">:</span> <span class="n">numpy.array</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Abstracts the Conditional Intesity matrix of a node as aggregation of the state residence times vector
and state transition matrix and the actual CIM matrix.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>state_residence_times</strong> (<em>numpy.array</em>) – state residence times vector</p></li>
<li><p><strong>state_transition_matrix</strong> (<em>numpy.ndArray</em>) – the transitions count matrix</p></li>
</ul>
</dd>
<dt class="field-even">_cim</dt>
<dd class="field-even"><p>the actual cim of the node</p>
</dd>
</dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.cim">
<em class="property">property </em><code class="sig-name descname">cim</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.cim" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.compute_cim_coefficients">
<code class="sig-name descname">compute_cim_coefficients</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.compute_cim_coefficients" title="Permalink to this definition"></a></dt>
<dd><p>Compute the coefficients of the matrix _cim by using the following equality q_xx’ = M[x, x’] / T[x].
The class member <code class="docutils literal notranslate"><span class="pre">_cim</span></code> will contain the computed cim</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.state_residence_times">
<em class="property">property </em><code class="sig-name descname">state_residence_times</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.state_residence_times" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.state_transition_matrix">
<em class="property">property </em><code class="sig-name descname">state_transition_matrix</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.state_transition_matrix" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.structure_graph.network_graph">
<span id="pyctbn-pyctbn-structure-graph-network-graph-module"></span><h2>PyCTBN.PyCTBN.structure_graph.network_graph module<a class="headerlink" href="#module-PyCTBN.PyCTBN.structure_graph.network_graph" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.structure_graph.network_graph.</code><code class="sig-name descname">NetworkGraph</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">graph_struct</span><span class="p">:</span> <span class="n"><a class="reference internal" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure" title="PyCTBN.PyCTBN.structure_graph.structure.Structure">PyCTBN.PyCTBN.structure_graph.structure.Structure</a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>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</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>graph_struct</strong> (<a class="reference internal" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure" title="PyCTBN.PyCTBN.structure_graph.structure.Structure"><em>Structure</em></a>) – the <code class="docutils literal notranslate"><span class="pre">Structure</span></code> object from which infos about the net will be extracted</p>
</dd>
<dt class="field-even">_graph</dt>
<dd class="field-even"><p>directed graph</p>
</dd>
<dt class="field-odd">_aggregated_info_about_nodes_parents</dt>
<dd class="field-odd"><p>a structure that contains all the necessary infos
about every parents of the node of which all the indexing and filtering structures will be constructed.</p>
</dd>
<dt class="field-even">_time_scalar_indexing_structure</dt>
<dd class="field-even"><p>the indexing structure for state res time estimation</p>
</dd>
<dt class="field-odd">_transition_scalar_indexing_structure</dt>
<dd class="field-odd"><p>the indexing structure for transition computation</p>
</dd>
<dt class="field-even">_time_filtering</dt>
<dd class="field-even"><p>the columns filtering structure used in the computation of the state res times</p>
</dd>
<dt class="field-odd">_transition_filtering</dt>
<dd class="field-odd"><p>the columns filtering structure used in the computation of the transition
from one state to another</p>
</dd>
<dt class="field-even">_p_combs_structure</dt>
<dd class="field-even"><p>all the possible parents states combination for the node of interest</p>
</dd>
</dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.add_edges">
<code class="sig-name descname">add_edges</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">list_of_edges</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.add_edges" title="Permalink to this definition"></a></dt>
<dd><p>Add the edges to the <code class="docutils literal notranslate"><span class="pre">_graph</span></code> contained in the list <code class="docutils literal notranslate"><span class="pre">list_of_edges</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>list_of_edges</strong> (<em>List</em>) – the list containing of tuples containing the edges</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.add_nodes">
<code class="sig-name descname">add_nodes</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">list_of_nodes</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.add_nodes" title="Permalink to this definition"></a></dt>
<dd><p>Adds the nodes to the <code class="docutils literal notranslate"><span class="pre">_graph</span></code> contained in the list of nodes <code class="docutils literal notranslate"><span class="pre">list_of_nodes</span></code>.
Sets all the properties that identify a nodes (index, positional index, cardinality)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>list_of_nodes</strong> (<em>List</em>) – the nodes to add to <code class="docutils literal notranslate"><span class="pre">_graph</span></code></p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_p_comb_structure_for_a_node">
<em class="property">static </em><code class="sig-name descname">build_p_comb_structure_for_a_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">parents_values</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_p_comb_structure_for_a_node" title="Permalink to this definition"></a></dt>
<dd><p>Builds the combinatorial structure that contains the combinations of all the values contained in
<code class="docutils literal notranslate"><span class="pre">parents_values</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>parents_values</strong> (<em>List</em>) – the cardinalities of the nodes</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A numpy matrix containing a grid of the combinations</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>numpy.ndArray</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_time_columns_filtering_for_a_node">
<em class="property">static </em><code class="sig-name descname">build_time_columns_filtering_for_a_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_indx</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">p_indxs</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_time_columns_filtering_for_a_node" title="Permalink to this definition"></a></dt>
<dd><p>Builds the necessary structure to filter the desired columns indicated by <code class="docutils literal notranslate"><span class="pre">node_indx</span></code> and <code class="docutils literal notranslate"><span class="pre">p_indxs</span></code>
in the dataset.
This structute will be used in the computation of the state res times.
:param node_indx: the index of the node
:type node_indx: int
:param p_indxs: the indexes of the node’s parents
:type p_indxs: List
:return: The filtering structure for times estimation
:rtype: numpy.ndArray</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_time_scalar_indexing_structure_for_a_node">
<em class="property">static </em><code class="sig-name descname">build_time_scalar_indexing_structure_for_a_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_states</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">parents_vals</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_time_scalar_indexing_structure_for_a_node" title="Permalink to this definition"></a></dt>
<dd><p>Builds an indexing structure for the computation of state residence times values.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>node_states</strong> (<em>int</em>) – the node cardinality</p></li>
<li><p><strong>parents_vals</strong> (<em>List</em>) – the caridinalites of the node’s parents</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The time indexing structure</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>numpy.ndArray</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_transition_filtering_for_a_node">
<em class="property">static </em><code class="sig-name descname">build_transition_filtering_for_a_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_indx</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">p_indxs</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">nodes_number</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_transition_filtering_for_a_node" title="Permalink to this definition"></a></dt>
<dd><p>Builds the necessary structure to filter the desired columns indicated by <code class="docutils literal notranslate"><span class="pre">node_indx</span></code> and <code class="docutils literal notranslate"><span class="pre">p_indxs</span></code>
in the dataset.
This structure will be used in the computation of the state transitions values.
:param node_indx: the index of the node
:type node_indx: int
:param p_indxs: the indexes of the node’s parents
:type p_indxs: List
:param nodes_number: the total number of nodes in the dataset
:type nodes_number: int
:return: The filtering structure for transitions estimation
:rtype: numpy.ndArray</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_transition_scalar_indexing_structure_for_a_node">
<em class="property">static </em><code class="sig-name descname">build_transition_scalar_indexing_structure_for_a_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_states_number</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">parents_vals</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.build_transition_scalar_indexing_structure_for_a_node" title="Permalink to this definition"></a></dt>
<dd><p>Builds an indexing structure for the computation of state transitions values.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>node_states_number</strong> (<em>int</em>) – the node cardinality</p></li>
<li><p><strong>parents_vals</strong> (<em>List</em>) – the caridinalites of the node’s parents</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The transition indexing structure</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>numpy.ndArray</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.clear_indexing_filtering_structures">
<code class="sig-name descname">clear_indexing_filtering_structures</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.clear_indexing_filtering_structures" title="Permalink to this definition"></a></dt>
<dd><p>Initialize all the filtering/indexing structures.</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.edges">
<em class="property">property </em><code class="sig-name descname">edges</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.edges" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.fast_init">
<code class="sig-name descname">fast_init</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.fast_init" title="Permalink to this definition"></a></dt>
<dd><p>Initializes all the necessary structures for parameters estimation of the node identified by the label
node_id</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>node_id</strong> (<em>string</em>) – the label of the node</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_node_indx">
<code class="sig-name descname">get_node_indx</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_node_indx" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_ordered_by_indx_set_of_parents">
<code class="sig-name descname">get_ordered_by_indx_set_of_parents</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; Tuple<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_ordered_by_indx_set_of_parents" title="Permalink to this definition"></a></dt>
<dd><p>Builds the aggregated structure that holds all the infos relative to the parent set of the node, namely
(parents_labels, parents_indexes, parents_cardinalities).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>node</strong> (<em>string</em>) – the label of the node</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a tuple containing all the parent set infos</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Tuple</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_parents_by_id">
<code class="sig-name descname">get_parents_by_id</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_parents_by_id" title="Permalink to this definition"></a></dt>
<dd><p>Returns a list of labels of the parents of the node <code class="docutils literal notranslate"><span class="pre">node_id</span></code></p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>node_id</strong> (<em>string</em>) – the node label</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a List of labels of the parents</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>List</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_positional_node_indx">
<code class="sig-name descname">get_positional_node_indx</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_positional_node_indx" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_states_number">
<code class="sig-name descname">get_states_number</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.get_states_number" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.has_edge">
<code class="sig-name descname">has_edge</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">edge</span><span class="p">:</span> <span class="n">tuple</span></em><span class="sig-paren">)</span> &#x2192; bool<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.has_edge" title="Permalink to this definition"></a></dt>
<dd><p>Check if the graph contains a specific edge</p>
<dl class="simple">
<dt>Parameters:</dt><dd><p>edge: a tuple that rappresents the edge</p>
</dd>
<dt>Returns:</dt><dd><p>bool</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.nodes">
<em class="property">property </em><code class="sig-name descname">nodes</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.nodes" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.nodes_indexes">
<em class="property">property </em><code class="sig-name descname">nodes_indexes</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.nodes_indexes" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.nodes_values">
<em class="property">property </em><code class="sig-name descname">nodes_values</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.nodes_values" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.p_combs">
<em class="property">property </em><code class="sig-name descname">p_combs</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.p_combs" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.remove_edges">
<code class="sig-name descname">remove_edges</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">list_of_edges</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.remove_edges" title="Permalink to this definition"></a></dt>
<dd><p>Remove the edges to the graph contained in the list list_of_edges.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>list_of_edges</strong> (<em>List</em>) – The edges to remove from the graph</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.remove_node">
<code class="sig-name descname">remove_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.remove_node" title="Permalink to this definition"></a></dt>
<dd><p>Remove the node <code class="docutils literal notranslate"><span class="pre">node_id</span></code> from all the class members.
Initialize all the filtering/indexing structures.</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.time_filtering">
<em class="property">property </em><code class="sig-name descname">time_filtering</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.time_filtering" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.time_scalar_indexing_strucure">
<em class="property">property </em><code class="sig-name descname">time_scalar_indexing_strucure</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.time_scalar_indexing_strucure" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.transition_filtering">
<em class="property">property </em><code class="sig-name descname">transition_filtering</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.transition_filtering" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.transition_scalar_indexing_structure">
<em class="property">property </em><code class="sig-name descname">transition_scalar_indexing_structure</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph.transition_scalar_indexing_structure" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.structure_graph.sample_path">
<span id="pyctbn-pyctbn-structure-graph-sample-path-module"></span><h2>PyCTBN.PyCTBN.structure_graph.sample_path module<a class="headerlink" href="#module-PyCTBN.PyCTBN.structure_graph.sample_path" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.structure_graph.sample_path.</code><code class="sig-name descname">SamplePath</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">importer</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter" title="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter">PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter</a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Aggregates all the informations about the trajectories, the real structure of the sampled net and variables
cardinalites. Has the task of creating the objects <code class="docutils literal notranslate"><span class="pre">Trajectory</span></code> and <code class="docutils literal notranslate"><span class="pre">Structure</span></code> that will
contain the mentioned data.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>importer</strong> (<a class="reference internal" href="PyCTBN.PyCTBN.utility.html#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter" title="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter"><em>AbstractImporter</em></a>) – the Importer object which contains the imported and processed data</p>
</dd>
<dt class="field-even">_trajectories</dt>
<dd class="field-even"><p>the <code class="docutils literal notranslate"><span class="pre">Trajectory</span></code> object that will contain all the concatenated trajectories</p>
</dd>
<dt class="field-odd">_structure</dt>
<dd class="field-odd"><p>the <code class="docutils literal notranslate"><span class="pre">Structure</span></code> Object that will contain all the structural infos about the net</p>
</dd>
<dt class="field-even">_total_variables_count</dt>
<dd class="field-even"><p>the number of variables in the net</p>
</dd>
</dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.build_structure">
<code class="sig-name descname">build_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.build_structure" title="Permalink to this definition"></a></dt>
<dd><p>Builds the <code class="docutils literal notranslate"><span class="pre">Structure</span></code> object that aggregates all the infos about the net.</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.build_trajectories">
<code class="sig-name descname">build_trajectories</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.build_trajectories" title="Permalink to this definition"></a></dt>
<dd><p>Builds the Trajectory object that will contain all the trajectories.
Clears all the unused dataframes in <code class="docutils literal notranslate"><span class="pre">_importer</span></code> Object</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.clear_memory">
<code class="sig-name descname">clear_memory</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.clear_memory" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.has_prior_net_structure">
<em class="property">property </em><code class="sig-name descname">has_prior_net_structure</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.has_prior_net_structure" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.structure">
<em class="property">property </em><code class="sig-name descname">structure</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.structure" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.total_variables_count">
<em class="property">property </em><code class="sig-name descname">total_variables_count</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.total_variables_count" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.trajectories">
<em class="property">property </em><code class="sig-name descname">trajectories</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath.trajectories" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.structure_graph.set_of_cims">
<span id="pyctbn-pyctbn-structure-graph-set-of-cims-module"></span><h2>PyCTBN.PyCTBN.structure_graph.set_of_cims module<a class="headerlink" href="#module-PyCTBN.PyCTBN.structure_graph.set_of_cims" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.structure_graph.set_of_cims.</code><code class="sig-name descname">SetOfCims</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">parents_states_number</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">node_states_number</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">p_combs</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Aggregates all the CIMS of the node identified by the label _node_id.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>node_id</strong> – the node label</p></li>
<li><p><strong>parents_states_number</strong> (<em>List</em>) – the cardinalities of the parents</p></li>
<li><p><strong>node_states_number</strong> (<em>int</em>) – the caridinality of the node</p></li>
<li><p><strong>p_combs</strong> (<em>numpy.ndArray</em>) – the p_comb structure bound to this node</p></li>
</ul>
</dd>
<dt class="field-even">_state_residence_time</dt>
<dd class="field-even"><p>matrix containing all the state residence time vectors for the node</p>
</dd>
<dt class="field-odd">_transition_matrices</dt>
<dd class="field-odd"><p>matrix containing all the transition matrices for the node</p>
</dd>
<dt class="field-even">_actual_cims</dt>
<dd class="field-even"><p>the cims of the node</p>
</dd>
</dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.actual_cims">
<em class="property">property </em><code class="sig-name descname">actual_cims</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.actual_cims" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.build_cims">
<code class="sig-name descname">build_cims</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">state_res_times</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">transition_matrices</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.build_cims" title="Permalink to this definition"></a></dt>
<dd><p>Build the <code class="docutils literal notranslate"><span class="pre">ConditionalIntensityMatrix</span></code> objects given the state residence times and transitions matrices.
Compute the cim coefficients.The class member <code class="docutils literal notranslate"><span class="pre">_actual_cims</span></code> will contain the computed cims.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>state_res_times</strong> (<em>numpy.ndArray</em>) – the state residence times matrix</p></li>
<li><p><strong>transition_matrices</strong> (<em>numpy.ndArray</em>) – the transition matrices</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.build_times_and_transitions_structures">
<code class="sig-name descname">build_times_and_transitions_structures</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.build_times_and_transitions_structures" title="Permalink to this definition"></a></dt>
<dd><p>Initializes at the correct dimensions the state residence times matrix and the state transition matrices.</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.filter_cims_with_mask">
<code class="sig-name descname">filter_cims_with_mask</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mask_arr</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">comb</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; numpy.ndarray<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.filter_cims_with_mask" title="Permalink to this definition"></a></dt>
<dd><p>Filter the cims contained in the array <code class="docutils literal notranslate"><span class="pre">_actual_cims</span></code> given the boolean mask <code class="docutils literal notranslate"><span class="pre">mask_arr</span></code> and the index
<code class="docutils literal notranslate"><span class="pre">comb</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>mask_arr</strong> (<em>numpy.array</em>) – the boolean mask that indicates which parent to consider</p></li>
<li><p><strong>comb</strong> (<em>numpy.array</em>) – the state/s of the filtered parents</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Array of <code class="docutils literal notranslate"><span class="pre">ConditionalIntensityMatrix</span></code> objects</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>numpy.array</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.get_cims_number">
<code class="sig-name descname">get_cims_number</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.get_cims_number" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.p_combs">
<em class="property">property </em><code class="sig-name descname">p_combs</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims.p_combs" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.structure_graph.structure">
<span id="pyctbn-pyctbn-structure-graph-structure-module"></span><h2>PyCTBN.PyCTBN.structure_graph.structure module<a class="headerlink" href="#module-PyCTBN.PyCTBN.structure_graph.structure" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.structure_graph.structure.</code><code class="sig-name descname">Structure</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">nodes_labels_list</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">nodes_indexes_arr</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">nodes_vals_arr</span><span class="p">:</span> <span class="n">numpy.ndarray</span></em>, <em class="sig-param"><span class="n">edges_list</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">total_variables_number</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Contains all the infos about the network structure(nodes labels, nodes caridinalites, edges, indexes)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>nodes_labels_list</strong> (<em>List</em>) – the symbolic names of the variables</p></li>
<li><p><strong>nodes_indexes_arr</strong> (<em>numpy.ndArray</em>) – the indexes of the nodes</p></li>
<li><p><strong>nodes_vals_arr</strong> (<em>numpy.ndArray</em>) – the cardinalites of the nodes</p></li>
<li><p><strong>edges_list</strong> (<em>List</em>) – the edges of the network</p></li>
<li><p><strong>total_variables_number</strong> (<em>int</em>) – the total number of variables in the dataset</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.add_edge">
<code class="sig-name descname">add_edge</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">edge</span><span class="p">:</span> <span class="n">tuple</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.add_edge" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.clean_structure_edges">
<code class="sig-name descname">clean_structure_edges</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.clean_structure_edges" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.contains_edge">
<code class="sig-name descname">contains_edge</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">edge</span><span class="p">:</span> <span class="n">tuple</span></em><span class="sig-paren">)</span> &#x2192; bool<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.contains_edge" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.edges">
<em class="property">property </em><code class="sig-name descname">edges</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.edges" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.get_node_id">
<code class="sig-name descname">get_node_id</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_indx</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; str<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.get_node_id" title="Permalink to this definition"></a></dt>
<dd><p>Given the <code class="docutils literal notranslate"><span class="pre">node_index</span></code> returns the node label.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>node_indx</strong> (<em>int</em>) – the node index</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the node label</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>string</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.get_node_indx">
<code class="sig-name descname">get_node_indx</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.get_node_indx" title="Permalink to this definition"></a></dt>
<dd><p>Given the <code class="docutils literal notranslate"><span class="pre">node_index</span></code> returns the node label.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>node_id</strong> (<em>string</em>) – the node label</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the node index</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>int</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.get_positional_node_indx">
<code class="sig-name descname">get_positional_node_indx</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.get_positional_node_indx" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.get_states_number">
<code class="sig-name descname">get_states_number</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.get_states_number" title="Permalink to this definition"></a></dt>
<dd><p>Given the node label <code class="docutils literal notranslate"><span class="pre">node</span></code> returns the cardinality of the node.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>node</strong> (<em>string</em>) – the node label</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the node cardinality</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>int</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.nodes_indexes">
<em class="property">property </em><code class="sig-name descname">nodes_indexes</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.nodes_indexes" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.nodes_labels">
<em class="property">property </em><code class="sig-name descname">nodes_labels</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.nodes_labels" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.nodes_values">
<em class="property">property </em><code class="sig-name descname">nodes_values</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.nodes_values" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.remove_edge">
<code class="sig-name descname">remove_edge</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">edge</span><span class="p">:</span> <span class="n">tuple</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.remove_edge" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.remove_node">
<code class="sig-name descname">remove_node</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">node_id</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.remove_node" title="Permalink to this definition"></a></dt>
<dd><p>Remove the node <code class="docutils literal notranslate"><span class="pre">node_id</span></code> from all the class members.
The class member <code class="docutils literal notranslate"><span class="pre">_total_variables_number</span></code> since it refers to the total number of variables in the dataset.</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.structure.Structure.total_variables_number">
<em class="property">property </em><code class="sig-name descname">total_variables_number</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.structure.Structure.total_variables_number" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.structure_graph.trajectory">
<span id="pyctbn-pyctbn-structure-graph-trajectory-module"></span><h2>PyCTBN.PyCTBN.structure_graph.trajectory module<a class="headerlink" href="#module-PyCTBN.PyCTBN.structure_graph.trajectory" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.structure_graph.trajectory.</code><code class="sig-name descname">Trajectory</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">list_of_columns</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">original_cols_number</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>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).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>list_of_columns</strong> (<em>List</em>) – the list containing the times array and values matrix</p></li>
<li><p><strong>original_cols_number</strong> (<em>int</em>) – total number of cols in the data</p></li>
</ul>
</dd>
<dt class="field-even">_actual_trajectory</dt>
<dd class="field-even"><p>the trajectory containing also the duplicated/shifted values</p>
</dd>
<dt class="field-odd">_times</dt>
<dd class="field-odd"><p>the array containing the time deltas</p>
</dd>
</dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.complete_trajectory">
<em class="property">property </em><code class="sig-name descname">complete_trajectory</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.complete_trajectory" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.size">
<code class="sig-name descname">size</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.size" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.times">
<em class="property">property </em><code class="sig-name descname">times</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.times" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.trajectory">
<em class="property">property </em><code class="sig-name descname">trajectory</code><a class="headerlink" href="#PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory.trajectory" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.structure_graph">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-PyCTBN.PyCTBN.structure_graph" title="Permalink to this headline"></a></h2>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="PyCTBN.PyCTBN.utility.html" class="btn btn-neutral float-right" title="PyCTBN.PyCTBN.utility package">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="PyCTBN.PyCTBN.optimizers.html" class="btn btn-neutral" title="PyCTBN.PyCTBN.optimizers package"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2021, Bregoli Alessandro, Martini Filippo, Moretti Luca.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/jucacrispim/sphinx_pdj_theme">theme</a> provided by <a href="http://poraodojuca.net">Porão do Juca</a>.
</footer>
</div>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js">
</script>
<script type="text/javascript" src="_static/underscore.js">
</script>
<script type="text/javascript" src="_static/doctools.js">
</script>
<script type="text/javascript" src="_static/language_data.js">
</script>
<script type="text/javascript"
src="_static/js/theme.js"></script>
<script type="text/javascript"
src="_static/js/pdj.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>

@ -0,0 +1,646 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xml:lang="" lang="" version="-//W3C//DTD XHTML 1.1//EN" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PyCTBN.PyCTBN.utility package &mdash; PyCTBN 2.0 documentation</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'/>
<link rel="stylesheet" href="_static/css/pdj.css" type="text/css" />
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/>
<link rel="up" title="PyCTBN.PyCTBN package" href="PyCTBN.PyCTBN.html"/>
<link rel="next" title="Examples" href="examples.html"/>
<link rel="prev" title="PyCTBN.PyCTBN.structure_graph package" href="PyCTBN.PyCTBN.structure_graph.html"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" />
<meta name="robots" content="follow, all" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Add jQuery library -->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="index.html" class="fa fa-home"> PyCTBN </a>
<div role="search">
<form id ="rtd-search-form" class="wy-form"
action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">PyCTBN</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
</ul>
</li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" id="barra-mobile" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="#">Porão do Juca</a>
</nav>
<div class="wy-nav-content">
<div class="fundo-claro">
</div>
<div class="fundo-escuro">
</div>
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<!-- <ul class="wy-breadcrumbs"> -->
<!-- <li><a href="#">Docs</a> &raquo;</li> -->
<!-- <li>Features</li> -->
<!-- <li class="wy-breadcrumbs-aside"> -->
<!-- <a href="_sources/index.txt" rel="nofollow"> View page source</a> -->
<!-- </li> -->
<!-- </ul> -->
<!-- <hr/> -->
</div>
<div role="main" class="">
<div id="content" class="hfeed entry-container hentry">
<div class="section" id="pyctbn-pyctbn-utility-package">
<h1>PyCTBN.PyCTBN.utility package<a class="headerlink" href="#pyctbn-pyctbn-utility-package" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.utility.abstract_importer">
<span id="pyctbn-pyctbn-utility-abstract-importer-module"></span><h2>PyCTBN.PyCTBN.utility.abstract_importer module<a class="headerlink" href="#module-PyCTBN.PyCTBN.utility.abstract_importer" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.utility.abstract_importer.</code><code class="sig-name descname">AbstractImporter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">file_path</span><span class="p">:</span> <span class="n">str</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">trajectory_list</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>pandas.core.frame.DataFrame<span class="p">, </span>numpy.ndarray<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">variables</span><span class="p">:</span> <span class="n">pandas.core.frame.DataFrame</span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">prior_net_structure</span><span class="p">:</span> <span class="n">pandas.core.frame.DataFrame</span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">abc.ABC</span></code></p>
<p>Abstract class that exposes all the necessary methods to process the trajectories and the net structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>file_path</strong> (<em>str</em>) – the file path, or dataset name if you import already processed data</p></li>
<li><p><strong>trajectory_list</strong> (<em>typing.Union</em><em>[</em><em>pandas.DataFrame</em><em>, </em><em>numpy.ndarray</em><em>]</em>) – Dataframe or numpy array containing the concatenation of all the processed trajectories</p></li>
<li><p><strong>variables</strong> (<em>pandas.DataFrame</em>) – Dataframe containing the nodes labels and cardinalities</p></li>
</ul>
</dd>
<dt class="field-even">Prior_net_structure</dt>
<dd class="field-even"><p>Dataframe containing the structure of the network (edges)</p>
</dd>
<dt class="field-odd">_sorter</dt>
<dd class="field-odd"><p>A list containing the variables labels in the SAME order as the columns in <code class="docutils literal notranslate"><span class="pre">concatenated_samples</span></code></p>
</dd>
</dl>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>The parameters <code class="docutils literal notranslate"><span class="pre">variables</span></code> and <code class="docutils literal notranslate"><span class="pre">prior_net_structure</span></code> HAVE to be properly constructed
as Pandas Dataframes with the following structure:
Header of _df_structure = [From_Node | To_Node]
Header of _df_variables = [Variable_Label | Variable_Cardinality]
See the tutorial on how to construct a correct <code class="docutils literal notranslate"><span class="pre">concatenated_samples</span></code> Dataframe/ndarray.</p>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>See :class:<code class="docutils literal notranslate"><span class="pre">JsonImporter</span></code> for an example implementation</p>
</div>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.build_list_of_samples_array">
<code class="sig-name descname">build_list_of_samples_array</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">concatenated_sample</span><span class="p">:</span> <span class="n">pandas.core.frame.DataFrame</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.build_list_of_samples_array" title="Permalink to this definition"></a></dt>
<dd><p>Builds a List containing the the delta times numpy array, and the complete transitions matrix</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>concatenated_sample</strong> (<em>pandas.Dataframe</em>) – the dataframe/array from which the time, and transitions matrix have to be extracted
and converted</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the resulting list of numpy arrays</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>List</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.build_sorter">
<em class="property">abstract </em><code class="sig-name descname">build_sorter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">trajecory_header</span><span class="p">:</span> <span class="n">object</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.build_sorter" title="Permalink to this definition"></a></dt>
<dd><p>Initializes the <code class="docutils literal notranslate"><span class="pre">_sorter</span></code> 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.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>trajecory_header</strong> (<em>object</em>) – an object that will be used to define the header</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A list containing the processed header.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>List</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.clear_concatenated_frame">
<code class="sig-name descname">clear_concatenated_frame</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.clear_concatenated_frame" title="Permalink to this definition"></a></dt>
<dd><p>Removes all values in the dataframe concatenated_samples.</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.compute_row_delta_in_all_samples_frames">
<code class="sig-name descname">compute_row_delta_in_all_samples_frames</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">df_samples_list</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.compute_row_delta_in_all_samples_frames" title="Permalink to this definition"></a></dt>
<dd><p>Calls the method <code class="docutils literal notranslate"><span class="pre">compute_row_delta_sigle_samples_frame</span></code> on every dataframe present in the list
<code class="docutils literal notranslate"><span class="pre">df_samples_list</span></code>.
Concatenates the result in the dataframe <code class="docutils literal notranslate"><span class="pre">concatanated_samples</span></code></p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>df_samples_list</strong> (<em>List</em>) – the datframe’s list to be processed and concatenated</p>
</dd>
</dl>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>The Dataframe sample_frame has to follow the column structure of this header:
Header of sample_frame = [Time | Variable values]
The class member self._sorter HAS to be properly INITIALIZED (See class members definition doc)</p>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>After the call of this method the class member <code class="docutils literal notranslate"><span class="pre">concatanated_samples</span></code> will contain all processed
and merged trajectories</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.compute_row_delta_sigle_samples_frame">
<code class="sig-name descname">compute_row_delta_sigle_samples_frame</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_frame</span><span class="p">:</span> <span class="n">pandas.core.frame.DataFrame</span></em>, <em class="sig-param"><span class="n">columns_header</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">shifted_cols_header</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; pandas.core.frame.DataFrame<a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.compute_row_delta_sigle_samples_frame" title="Permalink to this definition"></a></dt>
<dd><p>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.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sample_frame</strong> (<em>pandas.Dataframe</em>) – the traj to be processed</p></li>
<li><p><strong>columns_header</strong> (<em>List</em>) – the original header of sample_frame</p></li>
<li><p><strong>shifted_cols_header</strong> (<em>List</em>) – a copy of columns_header with changed names of the contents</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The processed dataframe</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>pandas.Dataframe</p>
</dd>
</dl>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>the Dataframe <code class="docutils literal notranslate"><span class="pre">sample_frame</span></code> has to follow the column structure of this header:
Header of sample_frame = [Time | Variable values]</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.concatenated_samples">
<em class="property">property </em><code class="sig-name descname">concatenated_samples</code><a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.concatenated_samples" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.dataset_id">
<em class="property">abstract </em><code class="sig-name descname">dataset_id</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; object<a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.dataset_id" title="Permalink to this definition"></a></dt>
<dd><p>If the original dataset contains multiple dataset, this method returns a unique id to identify the current
dataset</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.file_path">
<em class="property">property </em><code class="sig-name descname">file_path</code><a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.file_path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.sorter">
<em class="property">property </em><code class="sig-name descname">sorter</code><a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.sorter" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.structure">
<em class="property">property </em><code class="sig-name descname">structure</code><a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.structure" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.variables">
<em class="property">property </em><code class="sig-name descname">variables</code><a class="headerlink" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter.variables" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.utility.cache">
<span id="pyctbn-pyctbn-utility-cache-module"></span><h2>PyCTBN.PyCTBN.utility.cache module<a class="headerlink" href="#module-PyCTBN.PyCTBN.utility.cache" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.utility.cache.Cache">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.utility.cache.</code><code class="sig-name descname">Cache</code><a class="headerlink" href="#PyCTBN.PyCTBN.utility.cache.Cache" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>This class acts as a cache of <code class="docutils literal notranslate"><span class="pre">SetOfCims</span></code> objects for a node.</p>
<dl class="field-list simple">
<dt class="field-odd">__list_of_sets_of_parents</dt>
<dd class="field-odd"><p>a list of <code class="docutils literal notranslate"><span class="pre">Sets</span></code> objects of the parents to which the cim in cache at SAME
index is related</p>
</dd>
<dt class="field-even">__actual_cache</dt>
<dd class="field-even"><p>a list of setOfCims objects</p>
</dd>
</dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.cache.Cache.clear">
<code class="sig-name descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.utility.cache.Cache.clear" title="Permalink to this definition"></a></dt>
<dd><p>Clear the contents both of <code class="docutils literal notranslate"><span class="pre">__actual_cache</span></code> and <code class="docutils literal notranslate"><span class="pre">__list_of_sets_of_parents</span></code>.</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.cache.Cache.find">
<code class="sig-name descname">find</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">parents_comb</span><span class="p">:</span> <span class="n">Set</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.utility.cache.Cache.find" title="Permalink to this definition"></a></dt>
<dd><p>Tries to find in cache given the symbolic parents combination <code class="docutils literal notranslate"><span class="pre">parents_comb</span></code> the <code class="docutils literal notranslate"><span class="pre">SetOfCims</span></code>
related to that <code class="docutils literal notranslate"><span class="pre">parents_comb</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>parents_comb</strong> (<em>Set</em>) – the parents related to that <code class="docutils literal notranslate"><span class="pre">SetOfCims</span></code></p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A <code class="docutils literal notranslate"><span class="pre">SetOfCims</span></code> object if the <code class="docutils literal notranslate"><span class="pre">parents_comb</span></code> index is found in <code class="docutils literal notranslate"><span class="pre">__list_of_sets_of_parents</span></code>.
None otherwise.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims" title="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims">SetOfCims</a></p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.cache.Cache.put">
<code class="sig-name descname">put</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">parents_comb</span><span class="p">:</span> <span class="n">Set</span></em>, <em class="sig-param"><span class="n">socim</span><span class="p">:</span> <span class="n"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims" title="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims">PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims</a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.utility.cache.Cache.put" title="Permalink to this definition"></a></dt>
<dd><p>Place in cache the <code class="docutils literal notranslate"><span class="pre">SetOfCims</span></code> object, and the related symbolic index <code class="docutils literal notranslate"><span class="pre">parents_comb</span></code> in
<code class="docutils literal notranslate"><span class="pre">__list_of_sets_of_parents</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>parents_comb</strong> (<em>Set</em>) – the symbolic set index</p></li>
<li><p><strong>socim</strong> (<a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims" title="PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims"><em>SetOfCims</em></a>) – the related SetOfCims object</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.utility.json_importer">
<span id="pyctbn-pyctbn-utility-json-importer-module"></span><h2>PyCTBN.PyCTBN.utility.json_importer module<a class="headerlink" href="#module-PyCTBN.PyCTBN.utility.json_importer" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.utility.json_importer.</code><code class="sig-name descname">JsonImporter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">file_path</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">samples_label</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">structure_label</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">variables_label</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">time_key</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">variables_key</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter" title="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter</span></code></a></p>
<p>Implements the abstracts methods of AbstractImporter and adds all the necessary methods to process and prepare
the data in json extension.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>file_path</strong> (<em>string</em>) – the path of the file that contains tha data to be imported</p></li>
<li><p><strong>samples_label</strong> (<em>string</em>) – the reference key for the samples in the trajectories</p></li>
<li><p><strong>structure_label</strong> (<em>string</em>) – the reference key for the structure of the network data</p></li>
<li><p><strong>variables_label</strong> (<em>string</em>) – the reference key for the cardinalites of the nodes data</p></li>
<li><p><strong>time_key</strong> (<em>string</em>) – the key used to identify the timestamps in each trajectory</p></li>
<li><p><strong>variables_key</strong> (<em>string</em>) – the key used to identify the names of the variables in the net</p></li>
</ul>
</dd>
<dt class="field-even">_array_indx</dt>
<dd class="field-even"><p>the index of the outer JsonArray to extract the data from</p>
</dd>
<dt class="field-odd">_df_samples_list</dt>
<dd class="field-odd"><p>a Dataframe list in which every dataframe contains a trajectory</p>
</dd>
<dt class="field-even">_raw_data</dt>
<dd class="field-even"><p>The raw contents of the json file to import</p>
</dd>
</dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.build_sorter">
<code class="sig-name descname">build_sorter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_frame</span><span class="p">:</span> <span class="n">pandas.core.frame.DataFrame</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.build_sorter" title="Permalink to this definition"></a></dt>
<dd><p>Implements the abstract method build_sorter of the <code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractImporter</span></code> for this dataset.</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.clear_data_frame_list">
<code class="sig-name descname">clear_data_frame_list</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.clear_data_frame_list" title="Permalink to this definition"></a></dt>
<dd><p>Removes all values present in the dataframes in the list <code class="docutils literal notranslate"><span class="pre">_df_samples_list</span></code>.</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.dataset_id">
<code class="sig-name descname">dataset_id</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; object<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.dataset_id" title="Permalink to this definition"></a></dt>
<dd><p>If the original dataset contains multiple dataset, this method returns a unique id to identify the current
dataset</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_data">
<code class="sig-name descname">import_data</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">indx</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_data" title="Permalink to this definition"></a></dt>
<dd><p>Implements the abstract method of <code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractImporter</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>indx</strong> (<em>int</em>) – the index of the outer JsonArray to extract the data from</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_sampled_cims">
<code class="sig-name descname">import_sampled_cims</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_data</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">indx</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">cims_key</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; Dict<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_sampled_cims" title="Permalink to this definition"></a></dt>
<dd><p>Imports the synthetic CIMS in the dataset in a dictionary, using variables labels
as keys for the set of CIMS of a particular node.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>raw_data</strong> (<em>List</em>) – List of Dicts</p></li>
<li><p><strong>indx</strong> (<em>int</em>) – The index of the array from which the data have to be extracted</p></li>
<li><p><strong>cims_key</strong> (<em>string</em>) – the key where the json object cims are placed</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a dictionary containing the sampled CIMS for all the variables in the net</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Dictionary</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_structure">
<code class="sig-name descname">import_structure</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_data</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; pandas.core.frame.DataFrame<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_structure" title="Permalink to this definition"></a></dt>
<dd><p>Imports in a dataframe the data in the list raw_data at the key <code class="docutils literal notranslate"><span class="pre">_structure_label</span></code></p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>raw_data</strong> (<em>List</em>) – List of Dicts</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Dataframe containg the starting node a ending node of every arc of the network</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>pandas.Dataframe</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_trajectories">
<code class="sig-name descname">import_trajectories</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_data</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_trajectories" title="Permalink to this definition"></a></dt>
<dd><p>Imports the trajectories from the list of dicts <code class="docutils literal notranslate"><span class="pre">raw_data</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>raw_data</strong> (<em>List</em>) – List of Dicts</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>List of dataframes containing all the trajectories</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>List</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_variables">
<code class="sig-name descname">import_variables</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_data</span><span class="p">:</span> <span class="n">List</span></em><span class="sig-paren">)</span> &#x2192; pandas.core.frame.DataFrame<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.import_variables" title="Permalink to this definition"></a></dt>
<dd><p>Imports the data in <code class="docutils literal notranslate"><span class="pre">raw_data</span></code> at the key <code class="docutils literal notranslate"><span class="pre">_variables_label</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>raw_data</strong> (<em>List</em>) – List of Dicts</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Datframe containg the variables simbolic labels and their cardinalities</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>pandas.Dataframe</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.normalize_trajectories">
<code class="sig-name descname">normalize_trajectories</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_data</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">indx</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">trajectories_key</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.normalize_trajectories" title="Permalink to this definition"></a></dt>
<dd><p>Extracts the trajectories in <code class="docutils literal notranslate"><span class="pre">raw_data</span></code> at the index <code class="docutils literal notranslate"><span class="pre">index</span></code> at the key <code class="docutils literal notranslate"><span class="pre">trajectories</span> <span class="pre">key</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>raw_data</strong> (<em>List</em>) – List of Dicts</p></li>
<li><p><strong>indx</strong> (<em>int</em>) – The index of the array from which the data have to be extracted</p></li>
<li><p><strong>trajectories_key</strong> (<em>string</em>) – the key of the trajectories objects</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A list of daframes containg the trajectories</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>List</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.one_level_normalizing">
<code class="sig-name descname">one_level_normalizing</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_data</span><span class="p">:</span> <span class="n">List</span></em>, <em class="sig-param"><span class="n">indx</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">key</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; pandas.core.frame.DataFrame<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.one_level_normalizing" title="Permalink to this definition"></a></dt>
<dd><p>Extracts the one-level nested data in the list <code class="docutils literal notranslate"><span class="pre">raw_data</span></code> at the index <code class="docutils literal notranslate"><span class="pre">indx</span></code> at the key <code class="docutils literal notranslate"><span class="pre">key</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>raw_data</strong> (<em>List</em>) – List of Dicts</p></li>
<li><p><strong>indx</strong> (<em>int</em>) – The index of the array from which the data have to be extracted</p></li>
<li><p><strong>key</strong> (<em>string</em>) – the key for the Dicts from which exctract data</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A normalized dataframe</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>pandas.Datframe</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.json_importer.JsonImporter.read_json_file">
<code class="sig-name descname">read_json_file</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.utility.json_importer.JsonImporter.read_json_file" title="Permalink to this definition"></a></dt>
<dd><p>Reads the JSON file in the path self.filePath.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>The contents of the json file</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>List</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.utility.sample_importer">
<span id="pyctbn-pyctbn-utility-sample-importer-module"></span><h2>PyCTBN.PyCTBN.utility.sample_importer module<a class="headerlink" href="#module-PyCTBN.PyCTBN.utility.sample_importer" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="PyCTBN.PyCTBN.utility.sample_importer.SampleImporter">
<em class="property">class </em><code class="sig-prename descclassname">PyCTBN.PyCTBN.utility.sample_importer.</code><code class="sig-name descname">SampleImporter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">trajectory_list</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>pandas.core.frame.DataFrame<span class="p">, </span>numpy.ndarray<span class="p">, </span>List<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">variables</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>pandas.core.frame.DataFrame<span class="p">, </span>numpy.ndarray<span class="p">, </span>List<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">prior_net_structure</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>pandas.core.frame.DataFrame<span class="p">, </span>numpy.ndarray<span class="p">, </span>List<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.utility.sample_importer.SampleImporter" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter" title="PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyCTBN.PyCTBN.utility.abstract_importer.AbstractImporter</span></code></a></p>
<p>Implements the abstracts methods of AbstractImporter and adds all the necessary methods to process and prepare
the data loaded directly by using DataFrame</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>trajectory_list</strong> (<em>typing.Union</em><em>[</em><em>pd.DataFrame</em><em>, </em><em>np.ndarray</em><em>, </em><em>typing.List</em><em>]</em>) – the data that describes the trajectories</p></li>
<li><p><strong>variables</strong> (<em>typing.Union</em><em>[</em><em>pd.DataFrame</em><em>, </em><em>np.ndarray</em><em>, </em><em>typing.List</em><em>]</em>) – the data that describes the variables with name and cardinality</p></li>
<li><p><strong>prior_net_structure</strong> (<em>typing.Union</em><em>[</em><em>pd.DataFrame</em><em>, </em><em>np.ndarray</em><em>, </em><em>typing.List</em><em>]</em>) – the data of the real structure, if it exists</p></li>
</ul>
</dd>
<dt class="field-even">_df_samples_list</dt>
<dd class="field-even"><p>a Dataframe list in which every dataframe contains a trajectory</p>
</dd>
<dt class="field-odd">_raw_data</dt>
<dd class="field-odd"><p>The raw contents of the json file to import</p>
</dd>
</dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.sample_importer.SampleImporter.build_sorter">
<code class="sig-name descname">build_sorter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_frame</span><span class="p">:</span> <span class="n">pandas.core.frame.DataFrame</span></em><span class="sig-paren">)</span> &#x2192; List<a class="headerlink" href="#PyCTBN.PyCTBN.utility.sample_importer.SampleImporter.build_sorter" title="Permalink to this definition"></a></dt>
<dd><p>Implements the abstract method build_sorter of the <code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractImporter</span></code> in order to get the ordered variables list.</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.sample_importer.SampleImporter.dataset_id">
<code class="sig-name descname">dataset_id</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; str<a class="headerlink" href="#PyCTBN.PyCTBN.utility.sample_importer.SampleImporter.dataset_id" title="Permalink to this definition"></a></dt>
<dd><p>If the original dataset contains multiple dataset, this method returns a unique id to identify the current
dataset</p>
</dd></dl>
<dl class="py method">
<dt id="PyCTBN.PyCTBN.utility.sample_importer.SampleImporter.import_data">
<code class="sig-name descname">import_data</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">header_column</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#PyCTBN.PyCTBN.utility.sample_importer.SampleImporter.import_data" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-PyCTBN.PyCTBN.utility">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-PyCTBN.PyCTBN.utility" title="Permalink to this headline"></a></h2>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="examples.html" class="btn btn-neutral float-right" title="Examples">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="PyCTBN.PyCTBN.structure_graph.html" class="btn btn-neutral" title="PyCTBN.PyCTBN.structure_graph package"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2021, Bregoli Alessandro, Martini Filippo, Moretti Luca.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/jucacrispim/sphinx_pdj_theme">theme</a> provided by <a href="http://poraodojuca.net">Porão do Juca</a>.
</footer>
</div>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js">
</script>
<script type="text/javascript" src="_static/underscore.js">
</script>
<script type="text/javascript" src="_static/doctools.js">
</script>
<script type="text/javascript" src="_static/language_data.js">
</script>
<script type="text/javascript"
src="_static/js/theme.js"></script>
<script type="text/javascript"
src="_static/js/pdj.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>

@ -0,0 +1,231 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xml:lang="" lang="" version="-//W3C//DTD XHTML 1.1//EN" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PyCTBN package &mdash; PyCTBN 2.0 documentation</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'/>
<link rel="stylesheet" href="_static/css/pdj.css" type="text/css" />
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" />
<meta name="robots" content="follow, all" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Add jQuery library -->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="index.html" class="fa fa-home"> PyCTBN </a>
<div role="search">
<form id ="rtd-search-form" class="wy-form"
action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="modules.html">PyCTBN</a><ul>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
</ul>
</li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" id="barra-mobile" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="#">Porão do Juca</a>
</nav>
<div class="wy-nav-content">
<div class="fundo-claro">
</div>
<div class="fundo-escuro">
</div>
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<!-- <ul class="wy-breadcrumbs"> -->
<!-- <li><a href="#">Docs</a> &raquo;</li> -->
<!-- <li>Features</li> -->
<!-- <li class="wy-breadcrumbs-aside"> -->
<!-- <a href="_sources/index.txt" rel="nofollow"> View page source</a> -->
<!-- </li> -->
<!-- </ul> -->
<!-- <hr/> -->
</div>
<div role="main" class="">
<div id="content" class="hfeed entry-container hentry">
<div class="section" id="pyctbn-package">
<h1>PyCTBN package<a class="headerlink" href="#pyctbn-package" title="Permalink to this headline"></a></h1>
<div class="section" id="subpackages">
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="PyCTBN.PyCTBN.html">PyCTBN.PyCTBN package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.html#subpackages">Subpackages</a><ul>
<li class="toctree-l3"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html">PyCTBN.PyCTBN.estimators package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.fam_score_calculator">PyCTBN.PyCTBN.estimators.fam_score_calculator module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.parameters_estimator">PyCTBN.PyCTBN.estimators.parameters_estimator module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator">PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_estimator">PyCTBN.PyCTBN.estimators.structure_estimator module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators.structure_score_based_estimator">PyCTBN.PyCTBN.estimators.structure_score_based_estimator module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.estimators.html#module-PyCTBN.PyCTBN.estimators">Module contents</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html">PyCTBN.PyCTBN.optimizers package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.constraint_based_optimizer">PyCTBN.PyCTBN.optimizers.constraint_based_optimizer module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.hill_climbing_search">PyCTBN.PyCTBN.optimizers.hill_climbing_search module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.optimizer">PyCTBN.PyCTBN.optimizers.optimizer module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers.tabu_search">PyCTBN.PyCTBN.optimizers.tabu_search module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.optimizers.html#module-PyCTBN.PyCTBN.optimizers">Module contents</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html">PyCTBN.PyCTBN.structure_graph package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.network_graph">PyCTBN.PyCTBN.structure_graph.network_graph module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.sample_path">PyCTBN.PyCTBN.structure_graph.sample_path module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.set_of_cims">PyCTBN.PyCTBN.structure_graph.set_of_cims module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.structure">PyCTBN.PyCTBN.structure_graph.structure module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph.trajectory">PyCTBN.PyCTBN.structure_graph.trajectory module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.structure_graph.html#module-PyCTBN.PyCTBN.structure_graph">Module contents</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html">PyCTBN.PyCTBN.utility package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.abstract_importer">PyCTBN.PyCTBN.utility.abstract_importer module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.cache">PyCTBN.PyCTBN.utility.cache module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.json_importer">PyCTBN.PyCTBN.utility.json_importer module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility.sample_importer">PyCTBN.PyCTBN.utility.sample_importer module</a></li>
<li class="toctree-l4"><a class="reference internal" href="PyCTBN.PyCTBN.utility.html#module-PyCTBN.PyCTBN.utility">Module contents</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="PyCTBN.PyCTBN.html#module-PyCTBN.PyCTBN">Module contents</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-PyCTBN">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-PyCTBN" title="Permalink to this headline"></a></h2>
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2021, Bregoli Alessandro, Martini Filippo, Moretti Luca.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/jucacrispim/sphinx_pdj_theme">theme</a> provided by <a href="http://poraodojuca.net">Porão do Juca</a>.
</footer>
</div>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js">
</script>
<script type="text/javascript" src="_static/underscore.js">
</script>
<script type="text/javascript" src="_static/doctools.js">
</script>
<script type="text/javascript" src="_static/language_data.js">
</script>
<script type="text/javascript"
src="_static/js/theme.js"></script>
<script type="text/javascript"
src="_static/js/pdj.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -1,53 +0,0 @@
PyCTBN.estimators package
==========================
Submodules
----------
PyCTBN.estimators.fam\_score\_calculator module
------------------------------------------------
.. automodule:: PyCTBN.estimators.fam_score_calculator
:members:
:undoc-members:
:show-inheritance:
PyCTBN.estimators.parameters\_estimator module
-----------------------------------------------
.. automodule:: PyCTBN.estimators.parameters_estimator
:members:
:undoc-members:
:show-inheritance:
PyCTBN.estimators.structure\_constraint\_based\_estimator module
-----------------------------------------------------------------
.. automodule:: PyCTBN.estimators.structure_constraint_based_estimator
:members:
:undoc-members:
:show-inheritance:
PyCTBN.estimators.structure\_estimator module
----------------------------------------------
.. automodule:: PyCTBN.estimators.structure_estimator
:members:
:undoc-members:
:show-inheritance:
PyCTBN.estimators.structure\_score\_based\_estimator module
------------------------------------------------------------
.. automodule:: PyCTBN.estimators.structure_score_based_estimator
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: PyCTBN.estimators
:members:
:undoc-members:
:show-inheritance:

@ -1,45 +0,0 @@
PyCTBN.optimizers package
==========================
Submodules
----------
PyCTBN.optimizers.constraint\_based\_optimizer module
------------------------------------------------------
.. automodule:: PyCTBN.optimizers.constraint_based_optimizer
:members:
:undoc-members:
:show-inheritance:
PyCTBN.optimizers.hill\_climbing\_search module
------------------------------------------------
.. automodule:: PyCTBN.optimizers.hill_climbing_search
:members:
:undoc-members:
:show-inheritance:
PyCTBN.optimizers.optimizer module
-----------------------------------
.. automodule:: PyCTBN.optimizers.optimizer
:members:
:undoc-members:
:show-inheritance:
PyCTBN.optimizers.tabu\_search module
--------------------------------------
.. automodule:: PyCTBN.optimizers.tabu_search
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: PyCTBN.optimizers
:members:
:undoc-members:
:show-inheritance:

@ -1,77 +0,0 @@
PyCTBN.structure\_graph package
================================
Submodules
----------
PyCTBN.structure\_graph.abstract\_sample\_path module
------------------------------------------------------
.. automodule:: PyCTBN.structure_graph.abstract_sample_path
:members:
:undoc-members:
:show-inheritance:
PyCTBN.structure\_graph.conditional\_intensity\_matrix module
--------------------------------------------------------------
.. automodule:: PyCTBN.structure_graph.conditional_intensity_matrix
:members:
:undoc-members:
:show-inheritance:
PyCTBN.structure\_graph.network\_graph module
----------------------------------------------
.. automodule:: PyCTBN.structure_graph.network_graph
:members:
:undoc-members:
:show-inheritance:
PyCTBN.structure\_graph.sample\_path module
--------------------------------------------
.. automodule:: PyCTBN.structure_graph.sample_path
:members:
:undoc-members:
:show-inheritance:
PyCTBN.structure\_graph.set\_of\_cims module
---------------------------------------------
.. automodule:: PyCTBN.structure_graph.set_of_cims
:members:
:undoc-members:
:show-inheritance:
PyCTBN.structure\_graph.sets\_of\_cims\_container module
---------------------------------------------------------
.. automodule:: PyCTBN.structure_graph.sets_of_cims_container
:members:
:undoc-members:
:show-inheritance:
PyCTBN.structure\_graph.structure module
-----------------------------------------
.. automodule:: PyCTBN.structure_graph.structure
:members:
:undoc-members:
:show-inheritance:
PyCTBN.structure\_graph.trajectory module
------------------------------------------
.. automodule:: PyCTBN.structure_graph.trajectory
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: PyCTBN.structure_graph
:members:
:undoc-members:
:show-inheritance:

@ -1,53 +0,0 @@
PyCTBN.utility package
=======================
Submodules
----------
PyCTBN.utility.abstract\_importer module
-----------------------------------------
.. automodule:: PyCTBN.utility.abstract_importer
:members:
:undoc-members:
:show-inheritance:
PyCTBN.utility.cache module
----------------------------
.. automodule:: PyCTBN.utility.cache
:members:
:undoc-members:
:show-inheritance:
PyCTBN.utility.decorators module
---------------------------------
.. automodule:: PyCTBN.utility.decorators
:members:
:undoc-members:
:show-inheritance:
PyCTBN.utility.json\_importer module
-------------------------------------
.. automodule:: PyCTBN.utility.json_importer
:members:
:undoc-members:
:show-inheritance:
PyCTBN.utility.sample\_importer module
---------------------------------------
.. automodule:: PyCTBN.utility.sample_importer
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: PyCTBN.utility
:members:
:undoc-members:
:show-inheritance:

@ -1,923 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xml:lang="" lang="" version="-//W3C//DTD XHTML 1.1//EN" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Index &mdash; PyCTBN 2.0 documentation</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'/>
<link rel="stylesheet" href="_static/css/pdj.css" type="text/css" />
<link rel="index" title="Index"
href="#"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="PyCTBN 2.0 documentation" href="index.html"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" />
<meta name="robots" content="follow, all" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Add jQuery library -->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="index.html" class="fa fa-home"> PyCTBN </a>
<div role="search">
<form id ="rtd-search-form" class="wy-form"
action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples.html#installation-usage">Installation/Usage</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#implementing-your-own-data-importer">Implementing your own data importer</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#parameters-estimation-example">Parameters Estimation Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#structure-estimation-example">Structure Estimation Example</a></li>
</ul>
</li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" id="barra-mobile" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="#">Porão do Juca</a>
</nav>
<div class="wy-nav-content">
<div class="fundo-claro">
</div>
<div class="fundo-escuro">
</div>
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<!-- <ul class="wy-breadcrumbs"> -->
<!-- <li><a href="#">Docs</a> &raquo;</li> -->
<!-- <li>Features</li> -->
<!-- <li class="wy-breadcrumbs-aside"> -->
<!-- <a href="_sources/index.txt" rel="nofollow"> View page source</a> -->
<!-- </li> -->
<!-- </ul> -->
<!-- <hr/> -->
</div>
<div role="main" class="">
<div id="content" class="hfeed entry-container hentry">
<h1 id="index">Index</h1>
<div class="genindex-jumpbox">
<a href="#A"><strong>A</strong></a>
| <a href="#B"><strong>B</strong></a>
| <a href="#C"><strong>C</strong></a>
| <a href="#D"><strong>D</strong></a>
| <a href="#E"><strong>E</strong></a>
| <a href="#F"><strong>F</strong></a>
| <a href="#G"><strong>G</strong></a>
| <a href="#H"><strong>H</strong></a>
| <a href="#I"><strong>I</strong></a>
| <a href="#J"><strong>J</strong></a>
| <a href="#M"><strong>M</strong></a>
| <a href="#N"><strong>N</strong></a>
| <a href="#O"><strong>O</strong></a>
| <a href="#P"><strong>P</strong></a>
| <a href="#R"><strong>R</strong></a>
| <a href="#S"><strong>S</strong></a>
| <a href="#T"><strong>T</strong></a>
| <a href="#V"><strong>V</strong></a>
</div>
<h2 id="A">A</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.abstract_importer.AbstractImporter">AbstractImporter (class in PyCTBN.utility.abstract_importer)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.abstract_sample_path.AbstractSamplePath">AbstractSamplePath (class in PyCTBN.structure_graph.abstract_sample_path)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.set_of_cims.SetOfCims.actual_cims">actual_cims() (PyCTBN.structure_graph.set_of_cims.SetOfCims property)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.structure.Structure.add_edge">add_edge() (PyCTBN.structure_graph.structure.Structure method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.add_edges">add_edges() (PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.add_nodes">add_nodes() (PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_estimator.StructureEstimator.adjacency_matrix">adjacency_matrix() (PyCTBN.estimators.structure_estimator.StructureEstimator method)</a>
</li>
</ul></td>
</tr></table>
<h2 id="B">B</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.set_of_cims.SetOfCims.build_cims">build_cims() (PyCTBN.structure_graph.set_of_cims.SetOfCims method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_estimator.StructureEstimator.build_complete_graph">build_complete_graph() (PyCTBN.estimators.structure_estimator.StructureEstimator static method)</a>
</li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.abstract_importer.AbstractImporter.build_list_of_samples_array">build_list_of_samples_array() (PyCTBN.utility.abstract_importer.AbstractImporter method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.build_p_comb_structure_for_a_node">build_p_comb_structure_for_a_node() (PyCTBN.structure_graph.network_graph.NetworkGraph static method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_estimator.StructureEstimator.build_removable_edges_matrix">build_removable_edges_matrix() (PyCTBN.estimators.structure_estimator.StructureEstimator method)</a>
</li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.abstract_importer.AbstractImporter.build_sorter">build_sorter() (PyCTBN.utility.abstract_importer.AbstractImporter method)</a>
<ul>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.json_importer.JsonImporter.build_sorter">(PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.sample_importer.SampleImporter.build_sorter">(PyCTBN.utility.sample_importer.SampleImporter method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.abstract_sample_path.AbstractSamplePath.build_structure">build_structure() (PyCTBN.structure_graph.abstract_sample_path.AbstractSamplePath method)</a>
<ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.sample_path.SamplePath.build_structure">(PyCTBN.structure_graph.sample_path.SamplePath method)</a>
</li>
</ul></li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.build_time_columns_filtering_for_a_node">build_time_columns_filtering_for_a_node() (PyCTBN.structure_graph.network_graph.NetworkGraph static method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.build_time_scalar_indexing_structure_for_a_node">build_time_scalar_indexing_structure_for_a_node() (PyCTBN.structure_graph.network_graph.NetworkGraph static method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.set_of_cims.SetOfCims.build_times_and_transitions_structures">build_times_and_transitions_structures() (PyCTBN.structure_graph.set_of_cims.SetOfCims method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.abstract_sample_path.AbstractSamplePath.build_trajectories">build_trajectories() (PyCTBN.structure_graph.abstract_sample_path.AbstractSamplePath method)</a>
<ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.sample_path.SamplePath.build_trajectories">(PyCTBN.structure_graph.sample_path.SamplePath method)</a>
</li>
</ul></li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.build_transition_filtering_for_a_node">build_transition_filtering_for_a_node() (PyCTBN.structure_graph.network_graph.NetworkGraph static method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.build_transition_scalar_indexing_structure_for_a_node">build_transition_scalar_indexing_structure_for_a_node() (PyCTBN.structure_graph.network_graph.NetworkGraph static method)</a>
</li>
</ul></td>
</tr></table>
<h2 id="C">C</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.cache.Cache">Cache (class in PyCTBN.utility.cache)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.cim">cim() (PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix property)</a>
</li>
<li>
PyCTBN
<ul>
<li><a href="PyCTBN.html#module-PyCTBN">module</a>
</li>
</ul></li>
<li>
PyCTBN.estimators
<ul>
<li><a href="PyCTBN.estimators.html#module-PyCTBN.estimators">module</a>
</li>
</ul></li>
<li>
PyCTBN.estimators.fam_score_calculator
<ul>
<li><a href="PyCTBN.estimators.html#module-PyCTBN.estimators.fam_score_calculator">module</a>
</li>
</ul></li>
<li>
PyCTBN.estimators.parameters_estimator
<ul>
<li><a href="PyCTBN.estimators.html#module-PyCTBN.estimators.parameters_estimator">module</a>
</li>
</ul></li>
<li>
PyCTBN.estimators.structure_constraint_based_estimator
<ul>
<li><a href="PyCTBN.estimators.html#module-PyCTBN.estimators.structure_constraint_based_estimator">module</a>
</li>
</ul></li>
<li>
PyCTBN.estimators.structure_estimator
<ul>
<li><a href="PyCTBN.estimators.html#module-PyCTBN.estimators.structure_estimator">module</a>
</li>
</ul></li>
<li>
PyCTBN.estimators.structure_score_based_estimator
<ul>
<li><a href="PyCTBN.estimators.html#module-PyCTBN.estimators.structure_score_based_estimator">module</a>
</li>
</ul></li>
<li>
PyCTBN.optimizers
<ul>
<li><a href="PyCTBN.optimizers.html#module-PyCTBN.optimizers">module</a>
</li>
</ul></li>
<li>
PyCTBN.optimizers.constraint_based_optimizer
<ul>
<li><a href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.constraint_based_optimizer">module</a>
</li>
</ul></li>
<li>
PyCTBN.optimizers.hill_climbing_search
<ul>
<li><a href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.hill_climbing_search">module</a>
</li>
</ul></li>
<li>
PyCTBN.optimizers.optimizer
<ul>
<li><a href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.optimizer">module</a>
</li>
</ul></li>
<li>
PyCTBN.optimizers.tabu_search
<ul>
<li><a href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.tabu_search">module</a>
</li>
</ul></li>
<li>
PyCTBN.structure_graph
<ul>
<li><a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph">module</a>
</li>
</ul></li>
<li>
PyCTBN.structure_graph.abstract_sample_path
<ul>
<li><a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.abstract_sample_path">module</a>
</li>
</ul></li>
<li>
PyCTBN.structure_graph.conditional_intensity_matrix
<ul>
<li><a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.conditional_intensity_matrix">module</a>
</li>
</ul></li>
<li>
PyCTBN.structure_graph.network_graph
<ul>
<li><a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.network_graph">module</a>
</li>
</ul></li>
<li>
PyCTBN.structure_graph.sample_path
<ul>
<li><a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.sample_path">module</a>
</li>
</ul></li>
<li>
PyCTBN.structure_graph.set_of_cims
<ul>
<li><a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.set_of_cims">module</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li>
PyCTBN.structure_graph.sets_of_cims_container
<ul>
<li><a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.sets_of_cims_container">module</a>
</li>
</ul></li>
<li>
PyCTBN.structure_graph.structure
<ul>
<li><a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.structure">module</a>
</li>
</ul></li>
<li>
PyCTBN.structure_graph.trajectory
<ul>
<li><a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.trajectory">module</a>
</li>
</ul></li>
<li>
PyCTBN.utility
<ul>
<li><a href="PyCTBN.utility.html#module-PyCTBN.utility">module</a>
</li>
</ul></li>
<li>
PyCTBN.utility.abstract_importer
<ul>
<li><a href="PyCTBN.utility.html#module-PyCTBN.utility.abstract_importer">module</a>
</li>
</ul></li>
<li>
PyCTBN.utility.cache
<ul>
<li><a href="PyCTBN.utility.html#module-PyCTBN.utility.cache">module</a>
</li>
</ul></li>
<li>
PyCTBN.utility.decorators
<ul>
<li><a href="PyCTBN.utility.html#module-PyCTBN.utility.decorators">module</a>
</li>
</ul></li>
<li>
PyCTBN.utility.json_importer
<ul>
<li><a href="PyCTBN.utility.html#module-PyCTBN.utility.json_importer">module</a>
</li>
</ul></li>
<li>
PyCTBN.utility.sample_importer
<ul>
<li><a href="PyCTBN.utility.html#module-PyCTBN.utility.sample_importer">module</a>
</li>
</ul></li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.structure.Structure.clean_structure_edges">clean_structure_edges() (PyCTBN.structure_graph.structure.Structure method)</a>
</li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.cache.Cache.clear">clear() (PyCTBN.utility.cache.Cache method)</a>
</li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.abstract_importer.AbstractImporter.clear_concatenated_frame">clear_concatenated_frame() (PyCTBN.utility.abstract_importer.AbstractImporter method)</a>
</li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.json_importer.JsonImporter.clear_data_frame_list">clear_data_frame_list() (PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.clear_indexing_filtering_structures">clear_indexing_filtering_structures() (PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.sample_path.SamplePath.clear_memory">clear_memory() (PyCTBN.structure_graph.sample_path.SamplePath method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.complete_test">complete_test() (PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.trajectory.Trajectory.complete_trajectory">complete_trajectory() (PyCTBN.structure_graph.trajectory.Trajectory property)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.compute_cim_coefficients">compute_cim_coefficients() (PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_parameters">compute_parameters() (PyCTBN.estimators.parameters_estimator.ParametersEstimator method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_parameters_for_node">compute_parameters_for_node() (PyCTBN.estimators.parameters_estimator.ParametersEstimator method)</a>
</li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.abstract_importer.AbstractImporter.compute_row_delta_in_all_samples_frames">compute_row_delta_in_all_samples_frames() (PyCTBN.utility.abstract_importer.AbstractImporter method)</a>
</li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.abstract_importer.AbstractImporter.compute_row_delta_sigle_samples_frame">compute_row_delta_sigle_samples_frame() (PyCTBN.utility.abstract_importer.AbstractImporter method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_state_res_time_for_node">compute_state_res_time_for_node() (PyCTBN.estimators.parameters_estimator.ParametersEstimator static method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_state_transitions_for_a_node">compute_state_transitions_for_a_node() (PyCTBN.estimators.parameters_estimator.ParametersEstimator static method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.compute_thumb_value">compute_thumb_value() (PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator method)</a>
</li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.abstract_importer.AbstractImporter.concatenated_samples">concatenated_samples() (PyCTBN.utility.abstract_importer.AbstractImporter property)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix">ConditionalIntensityMatrix (class in PyCTBN.structure_graph.conditional_intensity_matrix)</a>
</li>
<li><a href="PyCTBN.optimizers.html#PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer">ConstraintBasedOptimizer (class in PyCTBN.optimizers.constraint_based_optimizer)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.structure.Structure.contains_edge">contains_edge() (PyCTBN.structure_graph.structure.Structure method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.ctpc_algorithm">ctpc_algorithm() (PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator method)</a>
</li>
</ul></td>
</tr></table>
<h2 id="D">D</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.abstract_importer.AbstractImporter.dataset_id">dataset_id() (PyCTBN.utility.abstract_importer.AbstractImporter method)</a>
<ul>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.json_importer.JsonImporter.dataset_id">(PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.sample_importer.SampleImporter.dataset_id">(PyCTBN.utility.sample_importer.SampleImporter method)</a>
</li>
</ul></li>
</ul></td>
</tr></table>
<h2 id="E">E</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.edges">edges() (PyCTBN.structure_graph.network_graph.NetworkGraph property)</a>
<ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.structure.Structure.edges">(PyCTBN.structure_graph.structure.Structure property)</a>
</li>
</ul></li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.estimate_parents">estimate_parents() (PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.estimate_structure">estimate_structure() (PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator method)</a>
<ul>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_estimator.StructureEstimator.estimate_structure">(PyCTBN.estimators.structure_estimator.StructureEstimator method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.estimate_structure">(PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator method)</a>
</li>
</ul></li>
</ul></td>
</tr></table>
<h2 id="F">F</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.fam_score_calculator.FamScoreCalculator">FamScoreCalculator (class in PyCTBN.estimators.fam_score_calculator)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.parameters_estimator.ParametersEstimator.fast_init">fast_init() (PyCTBN.estimators.parameters_estimator.ParametersEstimator method)</a>
<ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.fast_init">(PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.abstract_importer.AbstractImporter.file_path">file_path() (PyCTBN.utility.abstract_importer.AbstractImporter property)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.set_of_cims.SetOfCims.filter_cims_with_mask">filter_cims_with_mask() (PyCTBN.structure_graph.set_of_cims.SetOfCims method)</a>
</li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.cache.Cache.find">find() (PyCTBN.utility.cache.Cache method)</a>
</li>
</ul></td>
</tr></table>
<h2 id="G">G</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_estimator.StructureEstimator.generate_possible_sub_sets_of_size">generate_possible_sub_sets_of_size() (PyCTBN.estimators.structure_estimator.StructureEstimator static method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.set_of_cims.SetOfCims.get_cims_number">get_cims_number() (PyCTBN.structure_graph.set_of_cims.SetOfCims method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.sets_of_cims_container.SetsOfCimsContainer.get_cims_of_node">get_cims_of_node() (PyCTBN.structure_graph.sets_of_cims_container.SetsOfCimsContainer method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.get_fam_score">get_fam_score() (PyCTBN.estimators.fam_score_calculator.FamScoreCalculator method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.structure.Structure.get_node_id">get_node_id() (PyCTBN.structure_graph.structure.Structure method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.get_node_indx">get_node_indx() (PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
<ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.structure.Structure.get_node_indx">(PyCTBN.structure_graph.structure.Structure method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.get_ordered_by_indx_set_of_parents">get_ordered_by_indx_set_of_parents() (PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.get_parents_by_id">get_parents_by_id() (PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.get_positional_node_indx">get_positional_node_indx() (PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
<ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.structure.Structure.get_positional_node_indx">(PyCTBN.structure_graph.structure.Structure method)</a>
</li>
</ul></li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator.get_score_from_graph">get_score_from_graph() (PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.sets_of_cims_container.SetsOfCimsContainer.get_set_of_cims">get_set_of_cims() (PyCTBN.structure_graph.sets_of_cims_container.SetsOfCimsContainer method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.get_states_number">get_states_number() (PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
<ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.structure.Structure.get_states_number">(PyCTBN.structure_graph.structure.Structure method)</a>
</li>
</ul></li>
</ul></td>
</tr></table>
<h2 id="H">H</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.has_edge">has_edge() (PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.sample_path.SamplePath.has_prior_net_structure">has_prior_net_structure() (PyCTBN.structure_graph.sample_path.SamplePath property)</a>
</li>
<li><a href="PyCTBN.optimizers.html#PyCTBN.optimizers.hill_climbing_search.HillClimbing">HillClimbing (class in PyCTBN.optimizers.hill_climbing_search)</a>
</li>
</ul></td>
</tr></table>
<h2 id="I">I</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.json_importer.JsonImporter.import_data">import_data() (PyCTBN.utility.json_importer.JsonImporter method)</a>
<ul>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.sample_importer.SampleImporter.import_data">(PyCTBN.utility.sample_importer.SampleImporter method)</a>
</li>
</ul></li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.json_importer.JsonImporter.import_sampled_cims">import_sampled_cims() (PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.json_importer.JsonImporter.import_structure">import_structure() (PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.json_importer.JsonImporter.import_trajectories">import_trajectories() (PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.json_importer.JsonImporter.import_variables">import_variables() (PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.independence_test">independence_test() (PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.sets_of_cims_container.SetsOfCimsContainer.init_cims_structure">init_cims_structure() (PyCTBN.structure_graph.sets_of_cims_container.SetsOfCimsContainer method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.init_graph">init_graph() (PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.parameters_estimator.ParametersEstimator.init_sets_cims_container">init_sets_cims_container() (PyCTBN.estimators.parameters_estimator.ParametersEstimator method)</a>
</li>
</ul></td>
</tr></table>
<h2 id="J">J</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.json_importer.JsonImporter">JsonImporter (class in PyCTBN.utility.json_importer)</a>
</li>
</ul></td>
</tr></table>
<h2 id="M">M</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.marginal_likelihood_q">marginal_likelihood_q() (PyCTBN.estimators.fam_score_calculator.FamScoreCalculator method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.marginal_likelihood_theta">marginal_likelihood_theta() (PyCTBN.estimators.fam_score_calculator.FamScoreCalculator method)</a>
</li>
<li>
module
<ul>
<li><a href="PyCTBN.html#module-PyCTBN">PyCTBN</a>
</li>
<li><a href="PyCTBN.estimators.html#module-PyCTBN.estimators">PyCTBN.estimators</a>
</li>
<li><a href="PyCTBN.estimators.html#module-PyCTBN.estimators.fam_score_calculator">PyCTBN.estimators.fam_score_calculator</a>
</li>
<li><a href="PyCTBN.estimators.html#module-PyCTBN.estimators.parameters_estimator">PyCTBN.estimators.parameters_estimator</a>
</li>
<li><a href="PyCTBN.estimators.html#module-PyCTBN.estimators.structure_constraint_based_estimator">PyCTBN.estimators.structure_constraint_based_estimator</a>
</li>
<li><a href="PyCTBN.estimators.html#module-PyCTBN.estimators.structure_estimator">PyCTBN.estimators.structure_estimator</a>
</li>
<li><a href="PyCTBN.estimators.html#module-PyCTBN.estimators.structure_score_based_estimator">PyCTBN.estimators.structure_score_based_estimator</a>
</li>
<li><a href="PyCTBN.optimizers.html#module-PyCTBN.optimizers">PyCTBN.optimizers</a>
</li>
<li><a href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.constraint_based_optimizer">PyCTBN.optimizers.constraint_based_optimizer</a>
</li>
<li><a href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.hill_climbing_search">PyCTBN.optimizers.hill_climbing_search</a>
</li>
<li><a href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.optimizer">PyCTBN.optimizers.optimizer</a>
</li>
<li><a href="PyCTBN.optimizers.html#module-PyCTBN.optimizers.tabu_search">PyCTBN.optimizers.tabu_search</a>
</li>
<li><a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph">PyCTBN.structure_graph</a>
</li>
<li><a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.abstract_sample_path">PyCTBN.structure_graph.abstract_sample_path</a>
</li>
<li><a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.conditional_intensity_matrix">PyCTBN.structure_graph.conditional_intensity_matrix</a>
</li>
<li><a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.network_graph">PyCTBN.structure_graph.network_graph</a>
</li>
<li><a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.sample_path">PyCTBN.structure_graph.sample_path</a>
</li>
<li><a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.set_of_cims">PyCTBN.structure_graph.set_of_cims</a>
</li>
<li><a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.sets_of_cims_container">PyCTBN.structure_graph.sets_of_cims_container</a>
</li>
<li><a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.structure">PyCTBN.structure_graph.structure</a>
</li>
<li><a href="PyCTBN.structure_graph.html#module-PyCTBN.structure_graph.trajectory">PyCTBN.structure_graph.trajectory</a>
</li>
<li><a href="PyCTBN.utility.html#module-PyCTBN.utility">PyCTBN.utility</a>
</li>
<li><a href="PyCTBN.utility.html#module-PyCTBN.utility.abstract_importer">PyCTBN.utility.abstract_importer</a>
</li>
<li><a href="PyCTBN.utility.html#module-PyCTBN.utility.cache">PyCTBN.utility.cache</a>
</li>
<li><a href="PyCTBN.utility.html#module-PyCTBN.utility.decorators">PyCTBN.utility.decorators</a>
</li>
<li><a href="PyCTBN.utility.html#module-PyCTBN.utility.json_importer">PyCTBN.utility.json_importer</a>
</li>
<li><a href="PyCTBN.utility.html#module-PyCTBN.utility.sample_importer">PyCTBN.utility.sample_importer</a>
</li>
</ul></li>
</ul></td>
</tr></table>
<h2 id="N">N</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph">NetworkGraph (class in PyCTBN.structure_graph.network_graph)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.nodes">nodes() (PyCTBN.structure_graph.network_graph.NetworkGraph property)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.nodes_indexes">nodes_indexes() (PyCTBN.structure_graph.network_graph.NetworkGraph property)</a>
<ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.structure.Structure.nodes_indexes">(PyCTBN.structure_graph.structure.Structure property)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.structure.Structure.nodes_labels">nodes_labels() (PyCTBN.structure_graph.structure.Structure property)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.nodes_values">nodes_values() (PyCTBN.structure_graph.network_graph.NetworkGraph property)</a>
<ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.structure.Structure.nodes_values">(PyCTBN.structure_graph.structure.Structure property)</a>
</li>
</ul></li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.json_importer.JsonImporter.normalize_trajectories">normalize_trajectories() (PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
</ul></td>
</tr></table>
<h2 id="O">O</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator.one_iteration_of_CTPC_algorithm">one_iteration_of_CTPC_algorithm() (PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator method)</a>
</li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.json_importer.JsonImporter.one_level_normalizing">one_level_normalizing() (PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
<li><a href="PyCTBN.optimizers.html#PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer.optimize_structure">optimize_structure() (PyCTBN.optimizers.constraint_based_optimizer.ConstraintBasedOptimizer method)</a>
<ul>
<li><a href="PyCTBN.optimizers.html#PyCTBN.optimizers.hill_climbing_search.HillClimbing.optimize_structure">(PyCTBN.optimizers.hill_climbing_search.HillClimbing method)</a>
</li>
<li><a href="PyCTBN.optimizers.html#PyCTBN.optimizers.optimizer.Optimizer.optimize_structure">(PyCTBN.optimizers.optimizer.Optimizer method)</a>
</li>
<li><a href="PyCTBN.optimizers.html#PyCTBN.optimizers.tabu_search.TabuSearch.optimize_structure">(PyCTBN.optimizers.tabu_search.TabuSearch method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.optimizers.html#PyCTBN.optimizers.optimizer.Optimizer">Optimizer (class in PyCTBN.optimizers.optimizer)</a>
</li>
</ul></td>
</tr></table>
<h2 id="P">P</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.p_combs">p_combs() (PyCTBN.structure_graph.network_graph.NetworkGraph property)</a>
<ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.set_of_cims.SetOfCims.p_combs">(PyCTBN.structure_graph.set_of_cims.SetOfCims property)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.parameters_estimator.ParametersEstimator">ParametersEstimator (class in PyCTBN.estimators.parameters_estimator)</a>
</li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.cache.Cache.put">put() (PyCTBN.utility.cache.Cache method)</a>
</li>
</ul></td>
</tr></table>
<h2 id="R">R</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.json_importer.JsonImporter.read_json_file">read_json_file() (PyCTBN.utility.json_importer.JsonImporter method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_estimator.StructureEstimator.remove_diagonal_elements">remove_diagonal_elements() (PyCTBN.estimators.structure_estimator.StructureEstimator method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.structure.Structure.remove_edge">remove_edge() (PyCTBN.structure_graph.structure.Structure method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.remove_edges">remove_edges() (PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.remove_node">remove_node() (PyCTBN.structure_graph.network_graph.NetworkGraph method)</a>
<ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.structure.Structure.remove_node">(PyCTBN.structure_graph.structure.Structure method)</a>
</li>
</ul></li>
</ul></td>
</tr></table>
<h2 id="S">S</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.sample_importer.SampleImporter">SampleImporter (class in PyCTBN.utility.sample_importer)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.sample_path.SamplePath">SamplePath (class in PyCTBN.structure_graph.sample_path)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_estimator.StructureEstimator.save_plot_estimated_structure_graph">save_plot_estimated_structure_graph() (PyCTBN.estimators.structure_estimator.StructureEstimator method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_estimator.StructureEstimator.save_results">save_results() (PyCTBN.estimators.structure_estimator.StructureEstimator method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.set_of_cims.SetOfCims">SetOfCims (class in PyCTBN.structure_graph.set_of_cims)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.sets_of_cims_container.SetsOfCimsContainer">SetsOfCimsContainer (class in PyCTBN.structure_graph.sets_of_cims_container)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_cim_xu_marginal_likelihood_q">single_cim_xu_marginal_likelihood_q() (PyCTBN.estimators.fam_score_calculator.FamScoreCalculator method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_cim_xu_marginal_likelihood_theta">single_cim_xu_marginal_likelihood_theta() (PyCTBN.estimators.fam_score_calculator.FamScoreCalculator method)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.single_internal_cim_xxu_marginal_likelihood_theta">single_internal_cim_xxu_marginal_likelihood_theta() (PyCTBN.estimators.fam_score_calculator.FamScoreCalculator method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.trajectory.Trajectory.size">size() (PyCTBN.structure_graph.trajectory.Trajectory method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.abstract_importer.AbstractImporter.sorter">sorter() (PyCTBN.utility.abstract_importer.AbstractImporter property)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_estimator.StructureEstimator.spurious_edges">spurious_edges() (PyCTBN.estimators.structure_estimator.StructureEstimator method)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.state_residence_times">state_residence_times() (PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix property)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix.state_transition_matrix">state_transition_matrix() (PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix property)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.structure.Structure">Structure (class in PyCTBN.structure_graph.structure)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.sample_path.SamplePath.structure">structure() (PyCTBN.structure_graph.sample_path.SamplePath property)</a>
<ul>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.abstract_importer.AbstractImporter.structure">(PyCTBN.utility.abstract_importer.AbstractImporter property)</a>
</li>
</ul></li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_constraint_based_estimator.StructureConstraintBasedEstimator">StructureConstraintBasedEstimator (class in PyCTBN.estimators.structure_constraint_based_estimator)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_estimator.StructureEstimator">StructureEstimator (class in PyCTBN.estimators.structure_estimator)</a>
</li>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator">StructureScoreBasedEstimator (class in PyCTBN.estimators.structure_score_based_estimator)</a>
</li>
</ul></td>
</tr></table>
<h2 id="T">T</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.optimizers.html#PyCTBN.optimizers.tabu_search.TabuSearch">TabuSearch (class in PyCTBN.optimizers.tabu_search)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.time_filtering">time_filtering() (PyCTBN.structure_graph.network_graph.NetworkGraph property)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.time_scalar_indexing_strucure">time_scalar_indexing_strucure() (PyCTBN.structure_graph.network_graph.NetworkGraph property)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.trajectory.Trajectory.times">times() (PyCTBN.structure_graph.trajectory.Trajectory property)</a>
</li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.decorators.timing">timing() (in module PyCTBN.utility.decorators)</a>
</li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.decorators.timing_write">timing_write() (in module PyCTBN.utility.decorators)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.sample_path.SamplePath.total_variables_count">total_variables_count() (PyCTBN.structure_graph.sample_path.SamplePath property)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.structure.Structure.total_variables_number">total_variables_number() (PyCTBN.structure_graph.structure.Structure property)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.sample_path.SamplePath.trajectories">trajectories() (PyCTBN.structure_graph.sample_path.SamplePath property)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.trajectory.Trajectory">Trajectory (class in PyCTBN.structure_graph.trajectory)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.trajectory.Trajectory.trajectory">trajectory() (PyCTBN.structure_graph.trajectory.Trajectory property)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.transition_filtering">transition_filtering() (PyCTBN.structure_graph.network_graph.NetworkGraph property)</a>
</li>
<li><a href="PyCTBN.structure_graph.html#PyCTBN.structure_graph.network_graph.NetworkGraph.transition_scalar_indexing_structure">transition_scalar_indexing_structure() (PyCTBN.structure_graph.network_graph.NetworkGraph property)</a>
</li>
</ul></td>
</tr></table>
<h2 id="V">V</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.variable_cim_xu_marginal_likelihood_q">variable_cim_xu_marginal_likelihood_q() (PyCTBN.estimators.fam_score_calculator.FamScoreCalculator method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="PyCTBN.estimators.html#PyCTBN.estimators.fam_score_calculator.FamScoreCalculator.variable_cim_xu_marginal_likelihood_theta">variable_cim_xu_marginal_likelihood_theta() (PyCTBN.estimators.fam_score_calculator.FamScoreCalculator method)</a>
</li>
<li><a href="PyCTBN.utility.html#PyCTBN.utility.abstract_importer.AbstractImporter.variables">variables() (PyCTBN.utility.abstract_importer.AbstractImporter property)</a>
</li>
</ul></td>
</tr></table>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2021, Bregoli Alessandro, Martini Filippo, Moretti Luca.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/jucacrispim/sphinx_pdj_theme">theme</a> provided by <a href="http://poraodojuca.net">Porão do Juca</a>.
</footer>
</div>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js">
</script>
<script type="text/javascript" src="_static/underscore.js">
</script>
<script type="text/javascript" src="_static/doctools.js">
</script>
<script type="text/javascript" src="_static/language_data.js">
</script>
<script type="text/javascript"
src="_static/js/theme.js"></script>
<script type="text/javascript"
src="_static/js/pdj.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>

Binary file not shown.

File diff suppressed because one or more lines are too long

@ -0,0 +1,53 @@
PyCTBN.PyCTBN.estimators package
================================
Submodules
----------
PyCTBN.PyCTBN.estimators.fam\_score\_calculator module
------------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.estimators.fam_score_calculator
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.estimators.parameters\_estimator module
-----------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.estimators.parameters_estimator
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.estimators.structure\_constraint\_based\_estimator module
-----------------------------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.estimators.structure\_estimator module
----------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.estimators.structure_estimator
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.estimators.structure\_score\_based\_estimator module
------------------------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.estimators.structure_score_based_estimator
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: PyCTBN.PyCTBN.estimators
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,45 @@
PyCTBN.PyCTBN.optimizers package
================================
Submodules
----------
PyCTBN.PyCTBN.optimizers.constraint\_based\_optimizer module
------------------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.optimizers.constraint_based_optimizer
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.optimizers.hill\_climbing\_search module
------------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.optimizers.hill_climbing_search
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.optimizers.optimizer module
-----------------------------------------
.. automodule:: PyCTBN.PyCTBN.optimizers.optimizer
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.optimizers.tabu\_search module
--------------------------------------------
.. automodule:: PyCTBN.PyCTBN.optimizers.tabu_search
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: PyCTBN.PyCTBN.optimizers
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,21 @@
PyCTBN.PyCTBN package
=====================
Subpackages
-----------
.. toctree::
:maxdepth: 4
PyCTBN.PyCTBN.estimators
PyCTBN.PyCTBN.optimizers
PyCTBN.PyCTBN.structure_graph
PyCTBN.PyCTBN.utility
Module contents
---------------
.. automodule:: PyCTBN.PyCTBN
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,61 @@
PyCTBN.PyCTBN.structure\_graph package
======================================
Submodules
----------
PyCTBN.PyCTBN.structure\_graph.conditional\_intensity\_matrix module
--------------------------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.structure\_graph.network\_graph module
----------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.structure_graph.network_graph
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.structure\_graph.sample\_path module
--------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.structure_graph.sample_path
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.structure\_graph.set\_of\_cims module
---------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.structure_graph.set_of_cims
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.structure\_graph.structure module
-----------------------------------------------
.. automodule:: PyCTBN.PyCTBN.structure_graph.structure
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.structure\_graph.trajectory module
------------------------------------------------
.. automodule:: PyCTBN.PyCTBN.structure_graph.trajectory
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: PyCTBN.PyCTBN.structure_graph
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,45 @@
PyCTBN.PyCTBN.utility package
=============================
Submodules
----------
PyCTBN.PyCTBN.utility.abstract\_importer module
-----------------------------------------------
.. automodule:: PyCTBN.PyCTBN.utility.abstract_importer
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.utility.cache module
----------------------------------
.. automodule:: PyCTBN.PyCTBN.utility.cache
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.utility.json\_importer module
-------------------------------------------
.. automodule:: PyCTBN.PyCTBN.utility.json_importer
:members:
:undoc-members:
:show-inheritance:
PyCTBN.PyCTBN.utility.sample\_importer module
---------------------------------------------
.. automodule:: PyCTBN.PyCTBN.utility.sample_importer
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: PyCTBN.PyCTBN.utility
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,21 @@
PyCTBN package
==============
Subpackages
-----------
.. toctree::
:maxdepth: 4
PyCTBN.PyCTBN
Submodules
----------
Module contents
---------------
.. automodule:: PyCTBN
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,121 @@
Examples
========
Installation/Usage
******************
Download the release in .tar.gz or .whl format and simply use pip install to install it::
$pip install PyCTBN-1.0.tar.gz
Implementing your own data importer
***********************************
.. code-block:: python
"""This example demonstrates the implementation of a simple data importer the extends the class abstract importer to import data in csv format.
The net in exam has three ternary nodes and no prior net structure.
"""
from PyCTBN import AbstractImporter
class CSVImporter(AbstractImporter):
def __init__(self, file_path):
self._df_samples_list = None
super(CSVImporter, self).__init__(file_path)
def import_data(self):
self.read_csv_file()
self._sorter = self.build_sorter(self._df_samples_list[0])
self.import_variables()
self.compute_row_delta_in_all_samples_frames(self._df_samples_list)
def read_csv_file(self):
df = pd.read_csv(self._file_path)
df.drop(df.columns[[0]], axis=1, inplace=True)
self._df_samples_list = [df]
def import_variables(self):
values_list = [3 for var in self._sorter]
# initialize dict of lists
data = {'Name':self._sorter, 'Value':values_list}
# Create the pandas DataFrame
self._df_variables = pd.DataFrame(data)
def build_sorter(self, sample_frame: pd.DataFrame) -> typing.List:
return list(sample_frame.columns)[1:]
def dataset_id(self) -> object:
pass
Parameters Estimation Example
*****************************
.. code-block:: python
from PyCTBN import JsonImporter
from PyCTBN import SamplePath
from PyCTBN import NetworkGraph
from PyCTBN import ParametersEstimator
def main():
read_files = glob.glob(os.path.join('./data', "*.json")) #Take all json files in this dir
#import data
importer = JsonImporter(read_files[0], 'samples', 'dyn.str', 'variables', 'Time', 'Name')
importer.import_data(0)
#Create a SamplePath Obj passing an already filled AbstractImporter object
s1 = SamplePath(importer)
#Build The trajectries and the structural infos
s1.build_trajectories()
s1.build_structure()
print(s1.structure.edges)
print(s1.structure.nodes_values)
#From The Structure Object build the Graph
g = NetworkGraph(s1.structure)
#Select a node you want to estimate the parameters
node = g.nodes[2]
print("Node", node)
#Init the _graph specifically for THIS node
g.fast_init(node)
#Use SamplePath and Grpah to create a ParametersEstimator Object
p1 = ParametersEstimator(s1.trajectories, g)
#Init the peEst specifically for THIS node
p1.fast_init(node)
#Compute the parameters
sofc1 = p1.compute_parameters_for_node(node)
#The est CIMS are inside the resultant SetOfCIms Obj
print(sofc1.actual_cims)
Structure Estimation Example
****************************
.. code-block:: python
from PyCTBN import JsonImporter
from PyCTBN import SamplePath
from PyCTBN import StructureEstimator
def structure_estimation_example():
# read the json files in ./data path
read_files = glob.glob(os.path.join('./data', "*.json"))
# initialize a JsonImporter object for the first file
importer = JsonImporter(read_files[0], 'samples', 'dyn.str', 'variables', 'Time', 'Name')
# import the data at index 0 of the outer json array
importer.import_data(0)
# construct a SamplePath Object passing a filled AbstractImporter
s1 = SamplePath(importer)
# build the trajectories
s1.build_trajectories()
# build the real structure
s1.build_structure()
# construct a StructureEstimator object
se1 = StructureEstimator(s1, 0.1, 0.1)
# call the ctpc algorithm
se1.ctpc_algorithm()
# the adjacency matrix of the estimated structure
print(se1.adjacency_matrix())
# save results to a json file
se1.save_results()

@ -0,0 +1,22 @@
.. PyCTBN documentation master file, created by
sphinx-quickstart on Wed Mar 3 14:50:44 2021.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to PyCTBN's documentation!
==================================
.. toctree::
:maxdepth: 4
:caption: Contents:
modules
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

@ -0,0 +1,8 @@
PyCTBN
======
.. toctree::
:maxdepth: 4
PyCTBN.PyCTBN
examples

@ -0,0 +1,856 @@
/*
* basic.css
* ~~~~~~~~~
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/* -- main layout ----------------------------------------------------------- */
div.clearer {
clear: both;
}
div.section::after {
display: block;
content: '';
clear: left;
}
/* -- relbar ---------------------------------------------------------------- */
div.related {
width: 100%;
font-size: 90%;
}
div.related h3 {
display: none;
}
div.related ul {
margin: 0;
padding: 0 0 0 10px;
list-style: none;
}
div.related li {
display: inline;
}
div.related li.right {
float: right;
margin-right: 5px;
}
/* -- sidebar --------------------------------------------------------------- */
div.sphinxsidebarwrapper {
padding: 10px 5px 0 10px;
}
div.sphinxsidebar {
float: left;
width: 230px;
margin-left: -100%;
font-size: 90%;
word-wrap: break-word;
overflow-wrap : break-word;
}
div.sphinxsidebar ul {
list-style: none;
}
div.sphinxsidebar ul ul,
div.sphinxsidebar ul.want-points {
margin-left: 20px;
list-style: square;
}
div.sphinxsidebar ul ul {
margin-top: 0;
margin-bottom: 0;
}
div.sphinxsidebar form {
margin-top: 10px;
}
div.sphinxsidebar input {
border: 1px solid #98dbcc;
font-family: sans-serif;
font-size: 1em;
}
div.sphinxsidebar #searchbox form.search {
overflow: hidden;
}
div.sphinxsidebar #searchbox input[type="text"] {
float: left;
width: 80%;
padding: 0.25em;
box-sizing: border-box;
}
div.sphinxsidebar #searchbox input[type="submit"] {
float: left;
width: 20%;
border-left: none;
padding: 0.25em;
box-sizing: border-box;
}
img {
border: 0;
max-width: 100%;
}
/* -- search page ----------------------------------------------------------- */
ul.search {
margin: 10px 0 0 20px;
padding: 0;
}
ul.search li {
padding: 5px 0 5px 20px;
background-image: url(file.png);
background-repeat: no-repeat;
background-position: 0 7px;
}
ul.search li a {
font-weight: bold;
}
ul.search li div.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
}
ul.keywordmatches li.goodmatch a {
font-weight: bold;
}
/* -- index page ------------------------------------------------------------ */
table.contentstable {
width: 90%;
margin-left: auto;
margin-right: auto;
}
table.contentstable p.biglink {
line-height: 150%;
}
a.biglink {
font-size: 1.3em;
}
span.linkdescr {
font-style: italic;
padding-top: 5px;
font-size: 90%;
}
/* -- general index --------------------------------------------------------- */
table.indextable {
width: 100%;
}
table.indextable td {
text-align: left;
vertical-align: top;
}
table.indextable ul {
margin-top: 0;
margin-bottom: 0;
list-style-type: none;
}
table.indextable > tbody > tr > td > ul {
padding-left: 0em;
}
table.indextable tr.pcap {
height: 10px;
}
table.indextable tr.cap {
margin-top: 10px;
background-color: #f2f2f2;
}
img.toggler {
margin-right: 3px;
margin-top: 3px;
cursor: pointer;
}
div.modindex-jumpbox {
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 1em 0 1em 0;
padding: 0.4em;
}
div.genindex-jumpbox {
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 1em 0 1em 0;
padding: 0.4em;
}
/* -- domain module index --------------------------------------------------- */
table.modindextable td {
padding: 2px;
border-collapse: collapse;
}
/* -- general body styles --------------------------------------------------- */
div.body {
min-width: 450px;
max-width: 800px;
}
div.body p, div.body dd, div.body li, div.body blockquote {
-moz-hyphens: auto;
-ms-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
}
a.headerlink {
visibility: hidden;
}
a.brackets:before,
span.brackets > a:before{
content: "[";
}
a.brackets:after,
span.brackets > a:after {
content: "]";
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink,
caption:hover > a.headerlink,
p.caption:hover > a.headerlink,
div.code-block-caption:hover > a.headerlink {
visibility: visible;
}
div.body p.caption {
text-align: inherit;
}
div.body td {
text-align: left;
}
.first {
margin-top: 0 !important;
}
p.rubric {
margin-top: 30px;
font-weight: bold;
}
img.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
}
img.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
}
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
img.align-default, .figure.align-default {
display: block;
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left;
}
.align-center {
text-align: center;
}
.align-default {
text-align: center;
}
.align-right {
text-align: right;
}
/* -- sidebars -------------------------------------------------------------- */
div.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px;
background-color: #ffe;
width: 40%;
float: right;
clear: right;
overflow-x: auto;
}
p.sidebar-title {
font-weight: bold;
}
div.admonition, div.topic, blockquote {
clear: left;
}
/* -- topics ---------------------------------------------------------------- */
div.topic {
border: 1px solid #ccc;
padding: 7px;
margin: 10px 0 10px 0;
}
p.topic-title {
font-size: 1.1em;
font-weight: bold;
margin-top: 10px;
}
/* -- admonitions ----------------------------------------------------------- */
div.admonition {
margin-top: 10px;
margin-bottom: 10px;
padding: 7px;
}
div.admonition dt {
font-weight: bold;
}
p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
}
div.body p.centered {
text-align: center;
margin-top: 25px;
}
/* -- content of sidebars/topics/admonitions -------------------------------- */
div.sidebar > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}
div.sidebar::after,
div.topic::after,
div.admonition::after,
blockquote::after {
display: block;
content: '';
clear: both;
}
/* -- tables ---------------------------------------------------------------- */
table.docutils {
margin-top: 10px;
margin-bottom: 10px;
border: 0;
border-collapse: collapse;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
table.align-default {
margin-left: auto;
margin-right: auto;
}
table caption span.caption-number {
font-style: italic;
}
table caption span.caption-text {
}
table.docutils td, table.docutils th {
padding: 1px 8px 1px 5px;
border-top: 0;
border-left: 0;
border-right: 0;
border-bottom: 1px solid #aaa;
}
table.footnote td, table.footnote th {
border: 0 !important;
}
th {
text-align: left;
padding-right: 5px;
}
table.citation {
border-left: solid 1px gray;
margin-left: 1px;
}
table.citation td {
border-bottom: none;
}
th > :first-child,
td > :first-child {
margin-top: 0px;
}
th > :last-child,
td > :last-child {
margin-bottom: 0px;
}
/* -- figures --------------------------------------------------------------- */
div.figure {
margin: 0.5em;
padding: 0.5em;
}
div.figure p.caption {
padding: 0.3em;
}
div.figure p.caption span.caption-number {
font-style: italic;
}
div.figure p.caption span.caption-text {
}
/* -- field list styles ----------------------------------------------------- */
table.field-list td, table.field-list th {
border: 0 !important;
}
.field-list ul {
margin: 0;
padding-left: 1em;
}
.field-list p {
margin: 0;
}
.field-name {
-moz-hyphens: manual;
-ms-hyphens: manual;
-webkit-hyphens: manual;
hyphens: manual;
}
/* -- hlist styles ---------------------------------------------------------- */
table.hlist {
margin: 1em 0;
}
table.hlist td {
vertical-align: top;
}
/* -- other body styles ----------------------------------------------------- */
ol.arabic {
list-style: decimal;
}
ol.loweralpha {
list-style: lower-alpha;
}
ol.upperalpha {
list-style: upper-alpha;
}
ol.lowerroman {
list-style: lower-roman;
}
ol.upperroman {
list-style: upper-roman;
}
:not(li) > ol > li:first-child > :first-child,
:not(li) > ul > li:first-child > :first-child {
margin-top: 0px;
}
:not(li) > ol > li:last-child > :last-child,
:not(li) > ul > li:last-child > :last-child {
margin-bottom: 0px;
}
ol.simple ol p,
ol.simple ul p,
ul.simple ol p,
ul.simple ul p {
margin-top: 0;
}
ol.simple > li:not(:first-child) > p,
ul.simple > li:not(:first-child) > p {
margin-top: 0;
}
ol.simple p,
ul.simple p {
margin-bottom: 0;
}
dl.footnote > dt,
dl.citation > dt {
float: left;
margin-right: 0.5em;
}
dl.footnote > dd,
dl.citation > dd {
margin-bottom: 0em;
}
dl.footnote > dd:after,
dl.citation > dd:after {
content: "";
clear: both;
}
dl.field-list {
display: grid;
grid-template-columns: fit-content(30%) auto;
}
dl.field-list > dt {
font-weight: bold;
word-break: break-word;
padding-left: 0.5em;
padding-right: 5px;
}
dl.field-list > dt:after {
content: ":";
}
dl.field-list > dd {
padding-left: 0.5em;
margin-top: 0em;
margin-left: 0em;
margin-bottom: 0em;
}
dl {
margin-bottom: 15px;
}
dd > :first-child {
margin-top: 0px;
}
dd ul, dd table {
margin-bottom: 10px;
}
dd {
margin-top: 3px;
margin-bottom: 10px;
margin-left: 30px;
}
dl > dd:last-child,
dl > dd:last-child > :last-child {
margin-bottom: 0;
}
dt:target, span.highlighted {
background-color: #fbe54e;
}
rect.highlighted {
fill: #fbe54e;
}
dl.glossary dt {
font-weight: bold;
font-size: 1.1em;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.versionmodified {
font-style: italic;
}
.system-message {
background-color: #fda;
padding: 5px;
border: 3px solid red;
}
.footnote:target {
background-color: #ffa;
}
.line-block {
display: block;
margin-top: 1em;
margin-bottom: 1em;
}
.line-block .line-block {
margin-top: 0;
margin-bottom: 0;
margin-left: 1.5em;
}
.guilabel, .menuselection {
font-family: sans-serif;
}
.accelerator {
text-decoration: underline;
}
.classifier {
font-style: oblique;
}
.classifier:before {
font-style: normal;
margin: 0.5em;
content: ":";
}
abbr, acronym {
border-bottom: dotted 1px;
cursor: help;
}
/* -- code displays --------------------------------------------------------- */
pre {
overflow: auto;
overflow-y: hidden; /* fixes display issues on Chrome browsers */
}
pre, div[class*="highlight-"] {
clear: both;
}
span.pre {
-moz-hyphens: none;
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
}
div[class*="highlight-"] {
margin: 1em 0;
}
td.linenos pre {
border: 0;
background-color: transparent;
color: #aaa;
}
table.highlighttable {
display: block;
}
table.highlighttable tbody {
display: block;
}
table.highlighttable tr {
display: flex;
}
table.highlighttable td {
margin: 0;
padding: 0;
}
table.highlighttable td.linenos {
padding-right: 0.5em;
}
table.highlighttable td.code {
flex: 1;
overflow: hidden;
}
.highlight .hll {
display: block;
}
div.highlight pre,
table.highlighttable pre {
margin: 0;
}
div.code-block-caption + div {
margin-top: 0;
}
div.code-block-caption {
margin-top: 1em;
padding: 2px 5px;
font-size: small;
}
div.code-block-caption code {
background-color: transparent;
}
table.highlighttable td.linenos,
span.linenos,
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
}
div.code-block-caption span.caption-number {
padding: 0.1em 0.3em;
font-style: italic;
}
div.code-block-caption span.caption-text {
}
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;
}
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
background-color: transparent;
}
.viewcode-link {
float: right;
}
.viewcode-back {
float: right;
font-family: sans-serif;
}
div.viewcode-block:target {
margin: -1px -10px;
padding: 0 10px;
}
/* -- math display ---------------------------------------------------------- */
img.math {
vertical-align: middle;
}
div.body div.math p {
text-align: center;
}
span.eqno {
float: right;
}
span.eqno a.headerlink {
position: absolute;
z-index: 1;
}
div.math:hover a.headerlink {
visibility: visible;
}
/* -- printout stylesheet --------------------------------------------------- */
@media print {
div.document,
div.documentwrapper,
div.bodywrapper {
margin: 0 !important;
width: 100%;
}
div.sphinxsidebar,
div.related,
div.footer,
#top-link {
display: none;
}
}

Some files were not shown because too many files have changed in this diff Show More