Skip to content

Commit

Permalink
Merge pull request #3 from VicentePerezSoloviev/devel
Browse files Browse the repository at this point in the history
packaging
  • Loading branch information
VicentePerezSoloviev authored Jun 9, 2020
2 parents 534c25f + 5c25e16 commit 10d1669
Show file tree
Hide file tree
Showing 10 changed files with 148 additions and 17 deletions.
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/index.doctree
Binary file not shown.
1 change: 1 addition & 0 deletions docs/build/html/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

<h1>All modules for which code is available</h1>
<ul><li><a href="EDApy/optimization/multivariate/EDA_multivariate.html">EDApy.optimization.multivariate.EDA_multivariate</a></li>
<li><a href="EDApy/optimization/multivariate/EDA_multivariate_gaussian.html">EDApy.optimization.multivariate.EDA_multivariate_gaussian</a></li>
<li><a href="EDApy/optimization/univariate/continuous.html">EDApy.optimization.univariate.continuous</a></li>
<li><a href="EDApy/optimization/univariate/discrete.html">EDApy.optimization.univariate.discrete</a></li>
<li><a href="EDApy/prueba.html">EDApy.prueba</a></li>
Expand Down
10 changes: 8 additions & 2 deletions docs/build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,18 @@ To use both univariate EDAs there is no need to install R.
Documentation for the code
##########################

EDA multivariate
****************
EDA multivariate with evidences
********************************
.. autoclass:: EDApy.optimization.multivariate.EDA_multivariate
.. autoclass:: EDApy.optimization.multivariate.EDA_multivariate.EDAgbn
:members:

EDA multivariate with no evidences
***********************************
.. autoclass:: EDApy.optimization.multivariate.EDA_multivariate_gaussian
.. autoclass:: EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian
:members:

EDA discrete
************
.. autoclass:: EDApy.optimization.univariate.EDA_discrete
Expand Down
26 changes: 22 additions & 4 deletions docs/build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ <h2 id="B">B</h2>
<h2 id="C">C</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#EDApy.optimization.univariate.continuous.UMDAc.check_generation">check_generation() (EDApy.optimization.univariate.continuous.UMDAc method)</a>
<li><a href="index.html#EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian.check_generation">check_generation() (EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian method)</a>

<ul>
<li><a href="index.html#EDApy.optimization.univariate.continuous.UMDAc.check_generation">(EDApy.optimization.univariate.continuous.UMDAc method)</a>
</li>
<li><a href="index.html#EDApy.optimization.univariate.discrete.UMDAd.check_generation">(EDApy.optimization.univariate.discrete.UMDAd method)</a>
</li>
</ul></li>
Expand All @@ -88,11 +90,17 @@ <h2 id="E">E</h2>
<li><a href="index.html#EDApy.optimization.univariate.EDA_continuous">EDA_continuous (in module EDApy.optimization.univariate)</a>
</li>
<li><a href="index.html#EDApy.optimization.univariate.EDA_discrete">EDA_discrete (in module EDApy.optimization.univariate)</a>
</li>
<li><a href="index.html#EDApy.optimization.multivariate.EDA_multivariate">EDA_multivariate (in module EDApy.optimization.multivariate)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#EDApy.optimization.multivariate.EDA_multivariate">EDA_multivariate (in module EDApy.optimization.multivariate)</a>
<li><a href="index.html#EDApy.optimization.multivariate.EDA_multivariate_gaussian">EDA_multivariate_gaussian (class in EDApy.optimization.multivariate)</a>

<ul>
<li><a href="index.html#EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian">(class in EDApy.optimization.multivariate.EDA_multivariate_gaussian)</a>
</li>
</ul></li>
<li><a href="index.html#EDApy.optimization.multivariate.EDA_multivariate.EDAgbn">EDAgbn (class in EDApy.optimization.multivariate.EDA_multivariate)</a>
</li>
</ul></td>
Expand Down Expand Up @@ -124,6 +132,8 @@ <h2 id="N">N</h2>
<li><a href="index.html#EDApy.optimization.multivariate.EDA_multivariate.EDAgbn.new_generation">new_generation() (EDApy.optimization.multivariate.EDA_multivariate.EDAgbn method)</a>

<ul>
<li><a href="index.html#EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian.new_generation">(EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian method)</a>
</li>
<li><a href="index.html#EDApy.optimization.univariate.continuous.UMDAc.new_generation">(EDApy.optimization.univariate.continuous.UMDAc method)</a>
</li>
<li><a href="index.html#EDApy.optimization.univariate.discrete.UMDAd.new_generation">(EDApy.optimization.univariate.discrete.UMDAd method)</a>
Expand All @@ -138,6 +148,8 @@ <h2 id="R">R</h2>
<li><a href="index.html#EDApy.optimization.multivariate.EDA_multivariate.EDAgbn.run">run() (EDApy.optimization.multivariate.EDA_multivariate.EDAgbn method)</a>

<ul>
<li><a href="index.html#EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian.run">(EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian method)</a>
</li>
<li><a href="index.html#EDApy.optimization.univariate.continuous.UMDAc.run">(EDApy.optimization.univariate.continuous.UMDAc method)</a>
</li>
<li><a href="index.html#EDApy.optimization.univariate.discrete.UMDAd.run">(EDApy.optimization.univariate.discrete.UMDAd method)</a>
Expand Down Expand Up @@ -165,8 +177,12 @@ <h2 id="T">T</h2>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#EDApy.optimization.univariate.continuous.UMDAc.truncation">truncation() (EDApy.optimization.univariate.continuous.UMDAc method)</a>
<li><a href="index.html#EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian.truncation">truncation() (EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian method)</a>

<ul>
<li><a href="index.html#EDApy.optimization.univariate.continuous.UMDAc.truncation">(EDApy.optimization.univariate.continuous.UMDAc method)</a>
</li>
</ul></li>
</ul></td>
</tr></table>

Expand All @@ -179,9 +195,11 @@ <h2 id="U">U</h2>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#EDApy.optimization.univariate.continuous.UMDAc.update_vector">update_vector() (EDApy.optimization.univariate.continuous.UMDAc method)</a>
<li><a href="index.html#EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian.update_vector">update_vector() (EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian method)</a>

<ul>
<li><a href="index.html#EDApy.optimization.univariate.continuous.UMDAc.update_vector">(EDApy.optimization.univariate.continuous.UMDAc method)</a>
</li>
<li><a href="index.html#EDApy.optimization.univariate.discrete.UMDAd.update_vector">(EDApy.optimization.univariate.discrete.UMDAd method)</a>
</li>
</ul></li>
Expand Down
97 changes: 95 additions & 2 deletions docs/build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ <h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to t
</div>
<div class="section" id="documentation-for-the-code">
<h2>Documentation for the code<a class="headerlink" href="#documentation-for-the-code" title="Permalink to this headline"></a></h2>
<div class="section" id="eda-multivariate">
<h3>EDA multivariate<a class="headerlink" href="#eda-multivariate" title="Permalink to this headline"></a></h3>
<div class="section" id="eda-multivariate-with-evidences">
<h3>EDA multivariate with evidences<a class="headerlink" href="#eda-multivariate-with-evidences" title="Permalink to this headline"></a></h3>
<dl class="py attribute">
<dt id="EDApy.optimization.multivariate.EDA_multivariate">
<code class="sig-prename descclassname">EDApy.optimization.multivariate.</code><code class="sig-name descname">EDA_multivariate</code><a class="headerlink" href="#EDApy.optimization.multivariate.EDA_multivariate" title="Permalink to this definition"></a></dt>
Expand Down Expand Up @@ -237,6 +237,99 @@ <h3>EDA multivariate<a class="headerlink" href="#eda-multivariate" title="Permal

</dd></dl>

</div>
<div class="section" id="eda-multivariate-with-no-evidences">
<h3>EDA multivariate with no evidences<a class="headerlink" href="#eda-multivariate-with-no-evidences" title="Permalink to this headline"></a></h3>
<dl class="py class">
<dt id="EDApy.optimization.multivariate.EDA_multivariate_gaussian">
<em class="property">class </em><code class="sig-prename descclassname">EDApy.optimization.multivariate.</code><code class="sig-name descname">EDA_multivariate_gaussian</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">SIZE_GEN</span></em>, <em class="sig-param"><span class="n">MAX_ITER</span></em>, <em class="sig-param"><span class="n">DEAD_ITER</span></em>, <em class="sig-param"><span class="n">ALPHA</span></em>, <em class="sig-param"><span class="n">aim</span></em>, <em class="sig-param"><span class="n">cost_function</span></em>, <em class="sig-param"><span class="n">mus</span></em>, <em class="sig-param"><span class="n">sigma</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/EDApy/optimization/multivariate/EDA_multivariate_gaussian.html#EDA_multivariate_gaussian"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EDApy.optimization.multivariate.EDA_multivariate_gaussian" title="Permalink to this definition"></a></dt>
<dd><p>Multivariate Estimation of Distribution algorithm continuous.
New individuals are sampled from a multivariate normal distribution. Evidences are not allowed</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>SIZE_GEN</strong> (<em>int</em>) – total size of the generations in the execution of the algorithm</p></li>
<li><p><strong>MAX_ITER</strong> (<em>int</em>) – total number of iterations in case that optimum is not yet found. If reached, the optimum found is returned</p></li>
<li><p><strong>DEAD_ITER</strong> (<em>int</em>) – total number of iteration with no better solution found. If reached, the optimum found is returned</p></li>
<li><p><strong>ALPHA</strong> (<em>float</em><em> [</em><em>0-1</em><em>]</em>) – percentage of the generation tu take, in order to sample from them. The best individuals selection</p></li>
<li><p><strong>aim</strong> (<em>'minimize'</em><em> or </em><em>'maximize'.</em>) – Represents the optimization aim.</p></li>
<li><p><strong>cost_function</strong> (<em>callable function which receives a dictionary as input and returns a numeric</em>) – a callable function implemented by the user, to optimize.</p></li>
<li><p><strong>mus</strong> (<em>pandas dataframe</em><em> (</em><em>one row</em><em>)</em>) – pandas dataframe with initial mus of the multivariate gaussian</p></li>
<li><p><strong>sigma</strong> (<em>pandas dataframe</em><em> (</em><em>one row</em><em>)</em>) – pandas dataframe with the sigmas of the variable (diagonal of covariance matrix)</p></li>
</ul>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p><strong>Exception</strong> – cost function is not callable</p>
</dd>
</dl>
</dd></dl>

<dl class="py class">
<dt id="EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian">
<em class="property">class </em><code class="sig-prename descclassname">EDApy.optimization.multivariate.EDA_multivariate_gaussian.</code><code class="sig-name descname">EDA_multivariate_gaussian</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">SIZE_GEN</span></em>, <em class="sig-param"><span class="n">MAX_ITER</span></em>, <em class="sig-param"><span class="n">DEAD_ITER</span></em>, <em class="sig-param"><span class="n">ALPHA</span></em>, <em class="sig-param"><span class="n">aim</span></em>, <em class="sig-param"><span class="n">cost_function</span></em>, <em class="sig-param"><span class="n">mus</span></em>, <em class="sig-param"><span class="n">sigma</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/EDApy/optimization/multivariate/EDA_multivariate_gaussian.html#EDA_multivariate_gaussian"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian" title="Permalink to this definition"></a></dt>
<dd><p>Multivariate Estimation of Distribution algorithm continuous.
New individuals are sampled from a multivariate normal distribution. Evidences are not allowed</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>SIZE_GEN</strong> (<em>int</em>) – total size of the generations in the execution of the algorithm</p></li>
<li><p><strong>MAX_ITER</strong> (<em>int</em>) – total number of iterations in case that optimum is not yet found. If reached, the optimum found is returned</p></li>
<li><p><strong>DEAD_ITER</strong> (<em>int</em>) – total number of iteration with no better solution found. If reached, the optimum found is returned</p></li>
<li><p><strong>ALPHA</strong> (<em>float</em><em> [</em><em>0-1</em><em>]</em>) – percentage of the generation tu take, in order to sample from them. The best individuals selection</p></li>
<li><p><strong>aim</strong> (<em>'minimize'</em><em> or </em><em>'maximize'.</em>) – Represents the optimization aim.</p></li>
<li><p><strong>cost_function</strong> (<em>callable function which receives a dictionary as input and returns a numeric</em>) – a callable function implemented by the user, to optimize.</p></li>
<li><p><strong>mus</strong> (<em>pandas dataframe</em><em> (</em><em>one row</em><em>)</em>) – pandas dataframe with initial mus of the multivariate gaussian</p></li>
<li><p><strong>sigma</strong> (<em>pandas dataframe</em><em> (</em><em>one row</em><em>)</em>) – pandas dataframe with the sigmas of the variable (diagonal of covariance matrix)</p></li>
</ul>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p><strong>Exception</strong> – cost function is not callable</p>
</dd>
</dl>
<dl class="py method">
<dt id="EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian.check_generation">
<code class="sig-name descname">check_generation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/EDApy/optimization/multivariate/EDA_multivariate_gaussian.html#EDA_multivariate_gaussian.check_generation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian.check_generation" title="Permalink to this definition"></a></dt>
<dd><p>Check the cost of each individual in the cost function implemented by the user</p>
</dd></dl>

<dl class="py method">
<dt id="EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian.new_generation">
<code class="sig-name descname">new_generation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/EDApy/optimization/multivariate/EDA_multivariate_gaussian.html#EDA_multivariate_gaussian.new_generation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian.new_generation" title="Permalink to this definition"></a></dt>
<dd><p>Build a new generation sampled from the vector of probabilities. Updates the generation pandas dataframe</p>
</dd></dl>

<dl class="py method">
<dt id="EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian.run">
<code class="sig-name descname">run</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">output</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/EDApy/optimization/multivariate/EDA_multivariate_gaussian.html#EDA_multivariate_gaussian.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian.run" title="Permalink to this definition"></a></dt>
<dd><p>Run method to execute the EDA algorithm</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>output</strong> (<em>bool</em>) – True if wanted to print each iteration</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>best cost, best individual, history of costs along execution</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>float, pandas dataframe, list</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt id="EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian.truncation">
<code class="sig-name descname">truncation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/EDApy/optimization/multivariate/EDA_multivariate_gaussian.html#EDA_multivariate_gaussian.truncation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian.truncation" title="Permalink to this definition"></a></dt>
<dd><p>Selection of the best individuals of the actual generation. Updates the generation by selecting the best individuals</p>
</dd></dl>

<dl class="py method">
<dt id="EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian.update_vector">
<code class="sig-name descname">update_vector</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/EDApy/optimization/multivariate/EDA_multivariate_gaussian.html#EDA_multivariate_gaussian.update_vector"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#EDApy.optimization.multivariate.EDA_multivariate_gaussian.EDA_multivariate_gaussian.update_vector" title="Permalink to this definition"></a></dt>
<dd><p>From the best individuals update the vector of normal distributions in order to the next
generation can sample from it. Update the vector of normal distributions</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="eda-discrete">
<h3>EDA discrete<a class="headerlink" href="#eda-discrete" title="Permalink to this headline"></a></h3>
Expand Down
9 changes: 6 additions & 3 deletions docs/build/html/objects.inv
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# Project: EDApy
# Version:
# The remainder of this file is compressed using zlib.
xڵ��n�0 ��<E��Z�]{��v�Ti��ăh!A�Ӎ=��*���\*��ߟȿ}���&�5�J|QZ���(������l u���F���y"Bq�LK���#�$���6P䪥2I�FLs��1�
�s*[�
��<��gŖ�hCg ��c}~ z),j�DDwM��W���t51�������Pŏ�.��03ޡF������Wl����V(���.�`�f`�*�n�I_��[�g@)+���7�����/�9��1a��j����_:�W�tT���cL��O��V�wT�̂��O�]n����v��.B,�9H�y"�h�G�����5k��ݒJ�_Xu����G͝� up�G٩�/P�j ԰r\�������D H�����
x�͖�n�0�w��]��5[�d�)R��
V��|vZ��5�4@+
��vAp��~[��f��Tu�*�K�A W2)�0�H4'��v��qU��1�g�}<�\2xO
S���x��@�ɆJA�FL2@�R��P�D �P̳�c��@�-5VCƱ�.?��h����M���� A�5!��ERV���[�zR/&�Ρ�Ӧ
C�8�K�yiN,"'>�/�QKh�5����k�9ꞛk��ɪ�X[����� ŭHS%�VY\~׏P�j���i�.�I���]�D�[�c
}�����]=E�ڰSPO^<�����w}���#���G�,�"�^��4���k���u��[ ���W�9��ŏ�ktIc�6I��vnQ����^���bV������P��a5Ѵv���?��O���
Expand Down
Loading

0 comments on commit 10d1669

Please sign in to comment.