Skip to content

Commit bc0f012

Browse files
committed
Merge branch 'dev'
2 parents 0e45c0e + 8bf8ee7 commit bc0f012

7 files changed

Lines changed: 60 additions & 584 deletions

File tree

docs/_static/custom_theme.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@
1313
.wy-body-for-nav .wy-nav-content-wrap a:visited {
1414
color: #2980B9;
1515
}
16+
17+
.wy-menu-vertical li.current a, .wy-menu-vertical li.toctree-l2.current > a{
18+
padding: .4045em 1.427em;
19+
}

docs/html/_static/custom_theme.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@
1313
.wy-body-for-nav .wy-nav-content-wrap a:visited {
1414
color: #2980B9;
1515
}
16+
17+
.wy-menu-vertical li.current a, .wy-menu-vertical li.toctree-l2.current > a{
18+
padding: .4045em 1.427em;
19+
}

docs/html/documentation.html

Lines changed: 0 additions & 583 deletions
This file was deleted.

docs/html/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ <h1>Welcome to Moead-Framework’s documentation!<a class="headerlink" href="#we
174174
<li class="toctree-l1"><a class="reference internal" href="tuto.html">Tutorials</a><ul>
175175
<li class="toctree-l2"><a class="reference internal" href="tuto.html#implement-your-own-problem">Implement your own problem</a></li>
176176
<li class="toctree-l2"><a class="reference internal" href="tuto.html#implement-your-own-algorithm">Implement your own algorithm</a></li>
177+
<li class="toctree-l2"><a class="reference internal" href="tuto.html#manage-the-reproducibility-of-results">Manage the reproducibility of results</a></li>
177178
<li class="toctree-l2"><a class="reference internal" href="tuto.html#save-data-with-the-framework">Save data with the framework</a></li>
178179
</ul>
179180
</li>

docs/html/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/html/tuto.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
<li class="toctree-l1 current"><a class="current reference internal" href="#">Tutorials</a><ul>
8787
<li class="toctree-l2"><a class="reference internal" href="#implement-your-own-problem">Implement your own problem</a></li>
8888
<li class="toctree-l2"><a class="reference internal" href="#implement-your-own-algorithm">Implement your own algorithm</a></li>
89+
<li class="toctree-l2"><a class="reference internal" href="#manage-the-reproducibility-of-results">Manage the reproducibility of results</a></li>
8990
<li class="toctree-l2"><a class="reference internal" href="#save-data-with-the-framework">Save data with the framework</a></li>
9091
</ul>
9192
</li>
@@ -240,6 +241,28 @@ <h2>Implement your own algorithm<a class="headerlink" href="#implement-your-own-
240241
<p>For example with the implementation of MOEA/D-DE <a class="bibtex reference internal" href="references.html#moead-de" id="id1">[LZ09]</a> in the class <code class="xref py py-class docutils literal notranslate"><span class="pre">moead_framework.algorithm.combinatorial.moead_delta_nr</span></code> that extends <strong>Moead</strong> to rewrite the
241242
function update_solutions() and add two new parameters.</p>
242243
</div>
244+
<div class="section" id="manage-the-reproducibility-of-results">
245+
<h2>Manage the reproducibility of results<a class="headerlink" href="#manage-the-reproducibility-of-results" title="Permalink to this headline"></a></h2>
246+
<p>Reproducibility of results is a major principle for scientific research.
247+
The feature used here is not specific to the framework but
248+
can be used for every python project that uses the random and numpy modules.</p>
249+
<p>Because the framework uses the random and numpy modules, you can be sure
250+
to have the same results by running the same script several times if you
251+
add the following instructions before initializing problems or algorithms:</p>
252+
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">random</span>
253+
<span class="kn">import</span> <span class="nn">numpy</span>
254+
255+
<span class="n">seed</span> <span class="o">=</span> <span class="mi">0</span>
256+
<span class="n">random</span><span class="o">.</span><span class="n">seed</span><span class="p">(</span><span class="n">seed</span><span class="p">)</span>
257+
<span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">seed</span><span class="p">(</span><span class="n">seed</span><span class="p">)</span>
258+
</pre></div>
259+
</div>
260+
<p>You can find more information with the following links:</p>
261+
<ul class="simple">
262+
<li><p><a class="reference external" href="https://docs.python.org/3/library/random.html">https://docs.python.org/3/library/random.html</a></p></li>
263+
<li><p><a class="reference external" href="https://numpy.org/doc/stable/reference/random/generated/numpy.random.seed.html">https://numpy.org/doc/stable/reference/random/generated/numpy.random.seed.html</a></p></li>
264+
</ul>
265+
</div>
243266
<div class="section" id="save-data-with-the-framework">
244267
<h2>Save data with the framework<a class="headerlink" href="#save-data-with-the-framework" title="Permalink to this headline"></a></h2>
245268
<p>You can easily save a set of solutions by using the function <code class="code docutils literal notranslate"><span class="pre">save_population(&quot;population.txt&quot;,</span> <span class="pre">population)</span></code>.

docs/tuto.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,33 @@ For example with the implementation of MOEA/D-DE :cite:`moead_de` in the class :
9393
function update_solutions() and add two new parameters.
9494

9595

96+
Manage the reproducibility of results
97+
--------------------------------------------------------------------
98+
99+
Reproducibility of results is a major principle for scientific research.
100+
The feature used here is not specific to the framework but
101+
can be used for every python project that uses the random and numpy modules.
102+
103+
Because the framework uses the random and numpy modules, you can be sure
104+
to have the same results by running the same script several times if you
105+
add the following instructions before initializing problems or algorithms:
106+
107+
.. code-block:: python
108+
109+
import random
110+
import numpy
111+
112+
seed = 0
113+
random.seed(seed)
114+
np.random.seed(seed)
115+
116+
117+
You can find more information with the following links:
118+
119+
- https://docs.python.org/3/library/random.html
120+
- https://numpy.org/doc/stable/reference/random/generated/numpy.random.seed.html
121+
122+
96123
Save data with the framework
97124
--------------------------------------------------------------------
98125

0 commit comments

Comments
 (0)