<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"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">PyCTBN.PyCTBN.estimators.fam_score_calculator.</span></span><spanclass="sig-name descname"><spanclass="pre">FamScoreCalculator</span></span><aclass="headerlink"href="#PyCTBN.PyCTBN.estimators.fam_score_calculator.FamScoreCalculator"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">get_fam_score</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">cims</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">numpy.array</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">tau_xu</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">float</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0.1</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">alpha_xu</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">float</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">1</span></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>
<spanclass="sig-name descname"><spanclass="pre">marginal_likelihood_q</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">cims</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">numpy.array</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">tau_xu</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">float</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0.1</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">alpha_xu</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">float</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">1</span></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>
<spanclass="sig-name descname"><spanclass="pre">marginal_likelihood_theta</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">cims</span></span><spanclass="p"><spanclass="pre">:</span></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"><spanclass="pre">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">alpha_xu</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">float</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">alpha_xxu</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">float</span></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>
<spanclass="sig-name descname"><spanclass="pre">single_cim_xu_marginal_likelihood_q</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">M_xu_suff_stats</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">float</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">T_xu_suff_stats</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">float</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">tau_xu</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">float</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0.1</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">alpha_xu</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">float</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">1</span></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>
<spanclass="sig-name descname"><spanclass="pre">single_cim_xu_marginal_likelihood_theta</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">index</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">int</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">cim</span></span><spanclass="p"><spanclass="pre">:</span></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"><spanclass="pre">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">alpha_xu</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">float</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">alpha_xxu</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">float</span></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>
<spanclass="sig-name descname"><spanclass="pre">single_internal_cim_xxu_marginal_likelihood_theta</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">M_xxu_suff_stats</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">float</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">alpha_xxu</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">float</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">1</span></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>
<spanclass="sig-name descname"><spanclass="pre">variable_cim_xu_marginal_likelihood_q</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">cim</span></span><spanclass="p"><spanclass="pre">:</span></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"><spanclass="pre">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">tau_xu</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">float</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0.1</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">alpha_xu</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">float</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">1</span></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>
<spanclass="sig-name descname"><spanclass="pre">variable_cim_xu_marginal_likelihood_theta</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">cim</span></span><spanclass="p"><spanclass="pre">:</span></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"><spanclass="pre">PyCTBN.PyCTBN.structure_graph.conditional_intensity_matrix.ConditionalIntensityMatrix</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">alpha_xu</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">float</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">alpha_xxu</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">float</span></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"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">PyCTBN.PyCTBN.estimators.parameters_estimator.</span></span><spanclass="sig-name descname"><spanclass="pre">ParametersEstimator</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">trajectories</span></span><spanclass="p"><spanclass="pre">:</span></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"><spanclass="pre">PyCTBN.PyCTBN.structure_graph.trajectory.Trajectory</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">net_graph</span></span><spanclass="p"><spanclass="pre">:</span></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"><spanclass="pre">PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph</span></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>
<spanclass="sig-name descname"><spanclass="pre">compute_parameters_for_node</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">node_id</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">str</span></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"><spanclass="pre">PyCTBN.PyCTBN.structure_graph.set_of_cims.SetOfCims</span></a><aclass="headerlink"href="#PyCTBN.PyCTBN.estimators.parameters_estimator.ParametersEstimator.compute_parameters_for_node"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">static</span></em><spanclass="sig-name descname"><spanclass="pre">compute_state_res_time_for_node</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">times</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">numpy.ndarray</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">trajectory</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">numpy.ndarray</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">cols_filter</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">numpy.ndarray</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">scalar_indexes_struct</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">numpy.ndarray</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">T</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">numpy.ndarray</span></span></em><spanclass="sig-paren">)</span>→<spanclass="pre">None</span><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"><spanclass="pre">static</span></em><spanclass="sig-name descname"><spanclass="pre">compute_state_transitions_for_a_node</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">node_indx</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">int</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">trajectory</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">numpy.ndarray</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">cols_filter</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">numpy.ndarray</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">scalar_indexing</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">numpy.ndarray</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">M</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">numpy.ndarray</span></span></em><spanclass="sig-paren">)</span>→<spanclass="pre">None</span><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>
<spanclass="sig-name descname"><spanclass="pre">fast_init</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">node_id</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">str</span></span></em><spanclass="sig-paren">)</span>→<spanclass="pre">None</span><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-odd"><p>the complete directed graph built using the nodes labels in <codeclass="docutils literal notranslate"><spanclass="pre">_nodes</span></code></p>
<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>
<spanclass="sig-name descname"><spanclass="pre">compute_thumb_value</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">parent_val</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">child_val</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">parent_set_vals</span></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>
<spanclass="sig-name descname"><spanclass="pre">ctpc_algorithm</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">disable_multiprocessing</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">bool</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">False</span></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>
<spanclass="sig-name descname"><spanclass="pre">estimate_structure</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">disable_multiprocessing</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">bool</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">False</span></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>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>
<spanclass="sig-name descname"><spanclass="pre">one_iteration_of_CTPC_algorithm</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">var_id</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">str</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">tot_vars_count</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">int</span></span></em><spanclass="sig-paren">)</span>→<spanclass="pre">List</span><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"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">PyCTBN.PyCTBN.estimators.structure_estimator.</span></span><spanclass="sig-name descname"><spanclass="pre">StructureEstimator</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">sample_path</span></span><spanclass="p"><spanclass="pre">:</span></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"><spanclass="pre">PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">known_edges</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">Optional</span><spanclass="p"><spanclass="pre">[</span></span><spanclass="pre">List</span><spanclass="p"><spanclass="pre">]</span></span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></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>
<spanclass="sig-name descname"><spanclass="pre">adjacency_matrix</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span>→<spanclass="pre">numpy.ndarray</span><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"><spanclass="pre">static</span></em><spanclass="sig-name descname"><spanclass="pre">build_complete_graph</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">node_ids</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">List</span></span></em><spanclass="sig-paren">)</span>→<spanclass="pre">networkx.classes.digraph.DiGraph</span><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>
<spanclass="sig-name descname"><spanclass="pre">build_removable_edges_matrix</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">known_edges</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">List</span></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>
<emclass="property"><spanclass="pre">abstract</span></em><spanclass="sig-name descname"><spanclass="pre">estimate_structure</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span>→<spanclass="pre">List</span><aclass="headerlink"href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.estimate_structure"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">static</span></em><spanclass="sig-name descname"><spanclass="pre">generate_possible_sub_sets_of_size</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">u</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">List</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">size</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">int</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">parent_label</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">str</span></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>
<spanclass="sig-name descname"><spanclass="pre">save_plot_estimated_structure_graph</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">file_path</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">str</span></span></em><spanclass="sig-paren">)</span>→<spanclass="pre">None</span><aclass="headerlink"href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.save_plot_estimated_structure_graph"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">save_results</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">file_path</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">str</span></span></em><spanclass="sig-paren">)</span>→<spanclass="pre">None</span><aclass="headerlink"href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.save_results"title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">spurious_edges</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span>→<spanclass="pre">List</span><aclass="headerlink"href="#PyCTBN.PyCTBN.estimators.structure_estimator.StructureEstimator.spurious_edges"title="Permalink to this definition">¶</a></dt>
<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>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">PyCTBN.PyCTBN.estimators.structure_score_based_estimator.</span></span><spanclass="sig-name descname"><spanclass="pre">StructureScoreBasedEstimator</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">sample_path</span></span><spanclass="p"><spanclass="pre">:</span></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"><spanclass="pre">PyCTBN.PyCTBN.structure_graph.sample_path.SamplePath</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">tau_xu</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">int</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0.1</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">alpha_xu</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">int</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">1</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">known_edges</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">List</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">[]</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#PyCTBN.PyCTBN.estimators.structure_score_based_estimator.StructureScoreBasedEstimator"title="Permalink to this definition">¶</a></dt>
<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>
<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>
<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>
<spanclass="sig-name descname"><spanclass="pre">get_score_from_graph</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">graph</span></span><spanclass="p"><spanclass="pre">:</span></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"><spanclass="pre">PyCTBN.PyCTBN.structure_graph.network_graph.NetworkGraph</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">node_id</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="n"><spanclass="pre">str</span></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>
<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>.