<liclass="toctree-l2"><aclass="reference internal"href="examples.html#implementing-your-own-data-importer">Implementing your own data importer</a></li>
<spanid="pyctbn-pyctbn-estimators-fam-score-calculator-module"></span><h2>PyCTBN.PyCTBN.estimators.fam_score_calculator module<aclass="headerlink"href="#module-PyCTBN.PyCTBN.estimators.fam_score_calculator"title="Permalink to this headline">¶</a></h2>
<emclass="property">class </em><codeclass="sig-prename descclassname">PyCTBN.PyCTBN.estimators.fam_score_calculator.</code><codeclass="sig-name descname">FamScoreCalculator</code><aclass="headerlink"href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">get_fam_score</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">cims</span><spanclass="p">:</span><spanclass="n">numpy.array</span></em>, <emclass="sig-param"><spanclass="n">tau_xu</span><spanclass="p">:</span><spanclass="n">float</span><spanclass="o">=</span><spanclass="default_value">0.1</span></em>, <emclass="sig-param"><spanclass="n">alpha_xu</span><spanclass="p">:</span><spanclass="n">float</span><spanclass="o">=</span><spanclass="default_value">1</span></em><spanclass="sig-paren">)</span><aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="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>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>the FamScore value of the node</p>
<codeclass="sig-name descname">marginal_likelihood_q</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">cims</span><spanclass="p">:</span><spanclass="n">numpy.array</span></em>, <emclass="sig-param"><spanclass="n">tau_xu</span><spanclass="p">:</span><spanclass="n">float</span><spanclass="o">=</span><spanclass="default_value">0.1</span></em>, <emclass="sig-param"><spanclass="n">alpha_xu</span><spanclass="p">:</span><spanclass="n">float</span><spanclass="o">=</span><spanclass="default_value">1</span></em><spanclass="sig-paren">)</span><aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="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>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>the value of the marginal likelihood over q</p>
<codeclass="sig-name descname">marginal_likelihood_theta</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">cims</span><spanclass="p">:</span><spanclass="n"><aclass="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>, <emclass="sig-param"><spanclass="n">alpha_xu</span><spanclass="p">:</span><spanclass="n">float</span></em>, <emclass="sig-param"><spanclass="n">alpha_xxu</span><spanclass="p">:</span><spanclass="n">float</span></em><spanclass="sig-paren">)</span><aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="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>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>the value of the marginal likelihood over theta</p>
<codeclass="sig-name descname">single_cim_xu_marginal_likelihood_q</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">M_xu_suff_stats</span><spanclass="p">:</span><spanclass="n">float</span></em>, <emclass="sig-param"><spanclass="n">T_xu_suff_stats</span><spanclass="p">:</span><spanclass="n">float</span></em>, <emclass="sig-param"><spanclass="n">tau_xu</span><spanclass="p">:</span><spanclass="n">float</span><spanclass="o">=</span><spanclass="default_value">0.1</span></em>, <emclass="sig-param"><spanclass="n">alpha_xu</span><spanclass="p">:</span><spanclass="n">float</span><spanclass="o">=</span><spanclass="default_value">1</span></em><spanclass="sig-paren">)</span><aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="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>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>the value of the marginal likelihood of the node when assumes a specif value</p>
<codeclass="sig-name descname">single_cim_xu_marginal_likelihood_theta</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">index</span><spanclass="p">:</span><spanclass="n">int</span></em>, <emclass="sig-param"><spanclass="n">cim</span><spanclass="p">:</span><spanclass="n"><aclass="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>, <emclass="sig-param"><spanclass="n">alpha_xu</span><spanclass="p">:</span><spanclass="n">float</span></em>, <emclass="sig-param"><spanclass="n">alpha_xxu</span><spanclass="p">:</span><spanclass="n">float</span></em><spanclass="sig-paren">)</span><aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="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>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>the value of the marginal likelihood over theta when the node assumes a specif value</p>
<codeclass="sig-name descname">single_internal_cim_xxu_marginal_likelihood_theta</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">M_xxu_suff_stats</span><spanclass="p">:</span><spanclass="n">float</span></em>, <emclass="sig-param"><spanclass="n">alpha_xxu</span><spanclass="p">:</span><spanclass="n">float</span><spanclass="o">=</span><spanclass="default_value">1</span></em><spanclass="sig-paren">)</span><aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>M_xxu_suff_stats</strong> (<em>float</em>) – value of the suffucient statistic M[xx’<ahref="#id1"><spanclass="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>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>the value of the marginal likelihood over theta when the node assumes a specif value</p>
<codeclass="sig-name descname">variable_cim_xu_marginal_likelihood_q</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">cim</span><spanclass="p">:</span><spanclass="n"><aclass="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>, <emclass="sig-param"><spanclass="n">tau_xu</span><spanclass="p">:</span><spanclass="n">float</span><spanclass="o">=</span><spanclass="default_value">0.1</span></em>, <emclass="sig-param"><spanclass="n">alpha_xu</span><spanclass="p">:</span><spanclass="n">float</span><spanclass="o">=</span><spanclass="default_value">1</span></em><spanclass="sig-paren">)</span><aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="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>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>the value of the marginal likelihood over q</p>
<codeclass="sig-name descname">variable_cim_xu_marginal_likelihood_theta</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">cim</span><spanclass="p">:</span><spanclass="n"><aclass="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>, <emclass="sig-param"><spanclass="n">alpha_xu</span><spanclass="p">:</span><spanclass="n">float</span></em>, <emclass="sig-param"><spanclass="n">alpha_xxu</span><spanclass="p">:</span><spanclass="n">float</span></em><spanclass="sig-paren">)</span><aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="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>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>the value of the marginal likelihood over theta</p>
<spanid="pyctbn-pyctbn-estimators-parameters-estimator-module"></span><h2>PyCTBN.PyCTBN.estimators.parameters_estimator module<aclass="headerlink"href="#module-PyCTBN.PyCTBN.estimators.parameters_estimator"title="Permalink to this headline">¶</a></h2>
<emclass="property">class </em><codeclass="sig-prename descclassname">PyCTBN.PyCTBN.estimators.parameters_estimator.</code><codeclass="sig-name descname">ParametersEstimator</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">trajectories</span><spanclass="p">:</span><spanclass="n"><aclass="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>, <emclass="sig-param"><spanclass="n">net_graph</span><spanclass="p">:</span><spanclass="n"><aclass="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><spanclass="sig-paren">)</span><aclass="headerlink"href="#PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator"title="Permalink to this definition">¶</a></dt>
<p>Has the task of computing the cims of particular node given the trajectories and the net structure
in the graph <codeclass="docutils literal notranslate"><spanclass="pre">_net_graph</span></code>.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>trajectories</strong> (<aclass="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> (<aclass="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>
<dtclass="field-even">_single_set_of_cims</dt>
<ddclass="field-even"><p>the set of cims object that will hold the cims of the node</p>
<codeclass="sig-name descname">compute_parameters_for_node</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">node_id</span><spanclass="p">:</span><spanclass="n">str</span></em><spanclass="sig-paren">)</span>→<aclass="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><aclass="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 <codeclass="docutils literal notranslate"><spanclass="pre">node_id</span></code>.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>node_id</strong> (<em>string</em>) – the node label</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>A SetOfCims object filled with the computed CIMS</p>
<emclass="property">static </em><codeclass="sig-name descname">compute_state_res_time_for_node</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">times</span><spanclass="p">:</span><spanclass="n">numpy.ndarray</span></em>, <emclass="sig-param"><spanclass="n">trajectory</span><spanclass="p">:</span><spanclass="n">numpy.ndarray</span></em>, <emclass="sig-param"><spanclass="n">cols_filter</span><spanclass="p">:</span><spanclass="n">numpy.ndarray</span></em>, <emclass="sig-param"><spanclass="n">scalar_indexes_struct</span><spanclass="p">:</span><spanclass="n">numpy.ndarray</span></em>, <emclass="sig-param"><spanclass="n">T</span><spanclass="p">:</span><spanclass="n">numpy.ndarray</span></em><spanclass="sig-paren">)</span>→ None<aclass="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 <codeclass="docutils literal notranslate"><spanclass="pre">T</span></code> with the results</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="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>
<emclass="property">static </em><codeclass="sig-name descname">compute_state_transitions_for_a_node</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">node_indx</span><spanclass="p">:</span><spanclass="n">int</span></em>, <emclass="sig-param"><spanclass="n">trajectory</span><spanclass="p">:</span><spanclass="n">numpy.ndarray</span></em>, <emclass="sig-param"><spanclass="n">cols_filter</span><spanclass="p">:</span><spanclass="n">numpy.ndarray</span></em>, <emclass="sig-param"><spanclass="n">scalar_indexing</span><spanclass="p">:</span><spanclass="n">numpy.ndarray</span></em>, <emclass="sig-param"><spanclass="n">M</span><spanclass="p">:</span><spanclass="n">numpy.ndarray</span></em><spanclass="sig-paren">)</span>→ None<aclass="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 <codeclass="docutils literal notranslate"><spanclass="pre">M</span></code> with the results.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="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>
<codeclass="sig-name descname">fast_init</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">node_id</span><spanclass="p">:</span><spanclass="n">str</span></em><spanclass="sig-paren">)</span>→ None<aclass="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 <codeclass="docutils literal notranslate"><spanclass="pre">node_id</span></code>.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>node_id</strong> (<em>string</em>) – the node label</p>
<spanid="pyctbn-pyctbn-estimators-structure-constraint-based-estimator-module"></span><h2>PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator module<aclass="headerlink"href="#module-PyCTBN.PyCTBN.estimators.structure_constraint_based_estimator"title="Permalink to this headline">¶</a></h2>
<p>Has the task of estimating the network structure given the trajectories in samplepath by using a constraint-based approach.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>sample_path</strong> (<aclass="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>
<ddclass="field-even"><p>the complete directed graph built using the nodes labels in <codeclass="docutils literal notranslate"><spanclass="pre">_nodes</span></code></p>
<codeclass="sig-name descname">complete_test</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">test_parent</span><spanclass="p">:</span><spanclass="n">str</span></em>, <emclass="sig-param"><spanclass="n">test_child</span><spanclass="p">:</span><spanclass="n">str</span></em>, <emclass="sig-param"><spanclass="n">parent_set</span><spanclass="p">:</span><spanclass="n">List</span></em>, <emclass="sig-param"><spanclass="n">child_states_numb</span><spanclass="p">:</span><spanclass="n">int</span></em>, <emclass="sig-param"><spanclass="n">tot_vars_count</span><spanclass="p">:</span><spanclass="n">int</span></em>, <emclass="sig-param"><spanclass="n">parent_indx</span></em>, <emclass="sig-param"><spanclass="n">child_indx</span></em><spanclass="sig-paren">)</span>→ bool<aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="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 <codeclass="docutils literal notranslate"><spanclass="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>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>True iff test_child and test_parent are independent given the sep_set parent_set. False otherwise</p>
<codeclass="sig-name descname">compute_thumb_value</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">parent_val</span></em>, <emclass="sig-param"><spanclass="n">child_val</span></em>, <emclass="sig-param"><spanclass="n">parent_set_vals</span></em><spanclass="sig-paren">)</span><aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="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>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>the thumb value for the current independence test</p>
<codeclass="sig-name descname">ctpc_algorithm</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">disable_multiprocessing</span><spanclass="p">:</span><spanclass="n">bool</span><spanclass="o">=</span><spanclass="default_value">False</span></em><spanclass="sig-paren">)</span><aclass="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>
<codeclass="sig-name descname">estimate_structure</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">disable_multiprocessing</span><spanclass="p">:</span><spanclass="n">bool</span><spanclass="o">=</span><spanclass="default_value">False</span></em><spanclass="sig-paren">)</span><aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>List of estimated edges</p>
<codeclass="sig-name descname">independence_test</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">child_states_numb</span><spanclass="p">:</span><spanclass="n">int</span></em>, <emclass="sig-param"><spanclass="n">cim1</span><spanclass="p">:</span><spanclass="n"><aclass="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>, <emclass="sig-param"><spanclass="n">cim2</span><spanclass="p">:</span><spanclass="n"><aclass="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>, <emclass="sig-param"><spanclass="n">thumb_value</span><spanclass="p">:</span><spanclass="n">float</span></em>, <emclass="sig-param"><spanclass="n">parent_indx</span></em>, <emclass="sig-param"><spanclass="n">child_indx</span></em><spanclass="sig-paren">)</span>→ bool<aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>child_states_numb</strong> (<em>int</em>) – the cardinality of the test child</p></li>
<li><p><strong>cim1</strong> (<aclass="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> (<aclass="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>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>True iff both tests do NOT reject the null hypothesis of independence. False otherwise.</p>
<codeclass="sig-name descname">one_iteration_of_CTPC_algorithm</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">var_id</span><spanclass="p">:</span><spanclass="n">str</span></em>, <emclass="sig-param"><spanclass="n">tot_vars_count</span><spanclass="p">:</span><spanclass="n">int</span></em><spanclass="sig-paren">)</span>→ List<aclass="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 <codeclass="docutils literal notranslate"><spanclass="pre">var_id</span></code> as <codeclass="docutils literal notranslate"><spanclass="pre">test_child</span></code>.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>var_id</strong> (<em>string</em>) – the node label of the test child</p>
<spanid="pyctbn-pyctbn-estimators-structure-estimator-module"></span><h2>PyCTBN.PyCTBN.estimators.structure_estimator module<aclass="headerlink"href="#module-PyCTBN.PyCTBN.estimators.structure_estimator"title="Permalink to this headline">¶</a></h2>
<emclass="property">class </em><codeclass="sig-prename descclassname">PyCTBN.PyCTBN.estimators.structure_estimator.</code><codeclass="sig-name descname">StructureEstimator</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">sample_path</span><spanclass="p">:</span><spanclass="n"><aclass="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>, <emclass="sig-param"><spanclass="n">known_edges</span><spanclass="p">:</span><spanclass="n">List</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator"title="Permalink to this definition">¶</a></dt>
<p>Has the task of estimating the network structure given the trajectories in <codeclass="docutils literal notranslate"><spanclass="pre">samplepath</span></code>.</p>
<li><p><strong>sample_path</strong> (<aclass="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>known_edges</strong> (<em>List</em>) – the prior known edges in the net structure if present</p></li>
<ddclass="field-odd"><p>the complete directed graph built using the nodes labels in <codeclass="docutils literal notranslate"><spanclass="pre">_nodes</span></code></p>
<codeclass="sig-name descname">adjacency_matrix</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span>→ numpy.ndarray<aclass="headerlink"href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.adjacency_matrix"title="Permalink to this definition">¶</a></dt>
<dd><p>Converts the estimated structure <codeclass="docutils literal notranslate"><spanclass="pre">_complete_graph</span></code> to a boolean adjacency matrix representation.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The adjacency matrix of the graph <codeclass="docutils literal notranslate"><spanclass="pre">_complete_graph</span></code></p>
<emclass="property">static </em><codeclass="sig-name descname">build_complete_graph</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">node_ids</span><spanclass="p">:</span><spanclass="n">List</span></em><spanclass="sig-paren">)</span>→ networkx.classes.digraph.DiGraph<aclass="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 <codeclass="docutils literal notranslate"><spanclass="pre">node_ids</span></code>:</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>node_ids</strong> (<em>List</em>) – the list of nodes labels</p>
<codeclass="sig-name descname">build_removable_edges_matrix</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">known_edges</span><spanclass="p">:</span><spanclass="n">List</span></em><spanclass="sig-paren">)</span><aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>known_edges</strong> (<em>List</em>) – the list of nodes labels</p>
<emclass="property">abstract </em><codeclass="sig-name descname">estimate_structure</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span>→ List<aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>List of estimated edges</p>
<emclass="property">static </em><codeclass="sig-name descname">generate_possible_sub_sets_of_size</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">u</span><spanclass="p">:</span><spanclass="n">List</span></em>, <emclass="sig-param"><spanclass="n">size</span><spanclass="p">:</span><spanclass="n">int</span></em>, <emclass="sig-param"><spanclass="n">parent_label</span><spanclass="p">:</span><spanclass="n">str</span></em><spanclass="sig-paren">)</span><aclass="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 <codeclass="docutils literal notranslate"><spanclass="pre">u</span></code> of size <codeclass="docutils literal notranslate"><spanclass="pre">size</span></code>,
that do not contains a the node identified by <codeclass="docutils literal notranslate"><spanclass="pre">parent_label</span></code>.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="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>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>an Iterator Object containing a list of lists</p>
<codeclass="sig-name descname">save_plot_estimated_structure_graph</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">file_path</span><spanclass="p">:</span><spanclass="n">str</span></em><spanclass="sig-paren">)</span>→ None<aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>file_path</strong> – path to save the file to</p>
<codeclass="sig-name descname">save_results</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">file_path</span><spanclass="p">:</span><spanclass="n">str</span></em><spanclass="sig-paren">)</span>→ None<aclass="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 file_path.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>file_path</strong> (<em>string</em>) – the path including the file name with .json extension</p>
<codeclass="sig-name descname">spurious_edges</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span>→ List<aclass="headerlink"href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.spurious_edges"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="simple">
<dt>Return the spurious edges present in the estimated structure, if a prior net structure is present in</dt><dd><p><codeclass="docutils literal notranslate"><spanclass="pre">_sample_path.structure</span></code>.</p>
</dd>
</dl>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>A list containing the spurious edges</p>
<spanid="pyctbn-pyctbn-estimators-structure-score-based-estimator-module"></span><h2>PyCTBN.PyCTBN.estimators.structure_score_based_estimator module<aclass="headerlink"href="#module-PyCTBN.PyCTBN.estimators.structure_score_based_estimator"title="Permalink to this headline">¶</a></h2>
<p>Has the task of estimating the network structure given the trajectories in samplepath by
using a score based approach and differt kinds of optimization algorithms.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>sample_path</strong> (<aclass="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>
<codeclass="sig-name descname">estimate_parents</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">node_id</span><spanclass="p">:</span><spanclass="n">str</span></em>, <emclass="sig-param"><spanclass="n">max_parents</span><spanclass="p">:</span><spanclass="n">int</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">iterations_number</span><spanclass="p">:</span><spanclass="n">int</span><spanclass="o">=</span><spanclass="default_value">40</span></em>, <emclass="sig-param"><spanclass="n">patience</span><spanclass="p">:</span><spanclass="n">int</span><spanclass="o">=</span><spanclass="default_value">10</span></em>, <emclass="sig-param"><spanclass="n">tabu_length</span><spanclass="p">:</span><spanclass="n">int</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">tabu_rules_duration</span><spanclass="p">:</span><spanclass="n">int</span><spanclass="o">=</span><spanclass="default_value">5</span></em>, <emclass="sig-param"><spanclass="n">optimizer</span><spanclass="p">:</span><spanclass="n">str</span><spanclass="o">=</span><spanclass="default_value">'hill'</span></em><spanclass="sig-paren">)</span><aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="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>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>A list of the best edges for the currente node</p>
<codeclass="sig-name descname">estimate_structure</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">max_parents</span><spanclass="p">:</span><spanclass="n">int</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">iterations_number</span><spanclass="p">:</span><spanclass="n">int</span><spanclass="o">=</span><spanclass="default_value">40</span></em>, <emclass="sig-param"><spanclass="n">patience</span><spanclass="p">:</span><spanclass="n">int</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">tabu_length</span><spanclass="p">:</span><spanclass="n">int</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">tabu_rules_duration</span><spanclass="p">:</span><spanclass="n">int</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">optimizer</span><spanclass="p">:</span><spanclass="n">str</span><spanclass="o">=</span><spanclass="default_value">'tabu'</span></em>, <emclass="sig-param"><spanclass="n">disable_multiprocessing</span><spanclass="p">:</span><spanclass="n">bool</span><spanclass="o">=</span><spanclass="default_value">False</span></em><spanclass="sig-paren">)</span><aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="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>
<codeclass="sig-name descname">get_score_from_graph</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">graph</span><spanclass="p">:</span><spanclass="n"><aclass="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>, <emclass="sig-param"><spanclass="n">node_id</span><spanclass="p">:</span><spanclass="n">str</span></em><spanclass="sig-paren">)</span><aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="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>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>The FamSCore for this graph structure</p>
<spanid="module-contents"></span><h2>Module contents<aclass="headerlink"href="#module-PyCTBN.PyCTBN.estimators"title="Permalink to this headline">¶</a></h2>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/jucacrispim/sphinx_pdj_theme">theme</a> provided by <ahref="http://poraodojuca.net">Porão do Juca</a>.