Skip to content

Commit

Permalink
v0.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
erp12 committed Aug 18, 2020
1 parent 24d44b0 commit 0b3df5a
Show file tree
Hide file tree
Showing 55 changed files with 3,427 additions and 634 deletions.
Binary file modified docs/doctrees/api.doctree
Binary file not shown.
Binary file modified docs/doctrees/api/gp.doctree
Binary file not shown.
Binary file modified docs/doctrees/api/push.doctree
Binary file not shown.
Binary file modified docs/doctrees/contributing.doctree
Binary file not shown.
Binary file modified docs/doctrees/core_instructions.doctree
Binary file not shown.
Binary file modified docs/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/doctrees/instructions.doctree
Binary file not shown.
Binary file modified docs/doctrees/overview.doctree
Binary file not shown.
Binary file modified docs/doctrees/push_types.doctree
Binary file not shown.
Binary file modified docs/doctrees/release_notes.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 25f5ba41d8d9986eb492f3bceec4e8d1
config: a9d68c3b21de126b29e62a919941552f
tags: 645f666f9bcd5a90fca523b33c5a78b7
10 changes: 7 additions & 3 deletions docs/html/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &#8212; PyshGP 0.1.6 documentation</title>
<link rel="stylesheet" href="../_static/nature.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
Expand All @@ -24,7 +25,8 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">PyshGP 0.1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../index.html">PyshGP 0.1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Overview: module code</a></li>
</ul>
</div>

Expand Down Expand Up @@ -55,6 +57,7 @@ <h1>All modules for which code is available</h1>
<li><a href="pyshgp/validation.html">pyshgp.validation</a></li>
</ul>

<div class="clearer"></div>
</div>
</div>
</div>
Expand Down Expand Up @@ -83,12 +86,13 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">PyshGP 0.1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../index.html">PyshGP 0.1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Overview: module code</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2019, Edward Pantridge.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.0.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
</div>
</body>
</html>
18 changes: 11 additions & 7 deletions docs/html/_modules/pyshgp/gp/estimators.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pyshgp.gp.estimators &#8212; PyshGP 0.1.6 documentation</title>
<link rel="stylesheet" href="../../../_static/nature.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
Expand All @@ -25,7 +26,8 @@ <h3>Navigation</h3>
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">PyshGP 0.1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" accesskey="U">Module code</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" accesskey="U">Module code</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyshgp.gp.estimators</a></li>
</ul>
</div>

Expand All @@ -45,7 +47,7 @@ <h1>Source code for pyshgp.gp.estimators</h1><div class="highlight"><pre>
<span class="kn">import</span> <span class="nn">pyshgp.gp.variation</span> <span class="k">as</span> <span class="nn">vr</span>
<span class="kn">from</span> <span class="nn">pyshgp.gp.evaluation</span> <span class="kn">import</span> <span class="n">DatasetEvaluator</span>
<span class="kn">from</span> <span class="nn">pyshgp.gp.genome</span> <span class="kn">import</span> <span class="n">GeneSpawner</span>
<span class="kn">from</span> <span class="nn">pyshgp.push.interpreter</span> <span class="kn">import</span> <span class="n">PushInterpreter</span><span class="p">,</span> <span class="n">DEFAULT_INTERPRETER</span>
<span class="kn">from</span> <span class="nn">pyshgp.push.interpreter</span> <span class="kn">import</span> <span class="n">PushInterpreter</span>
<span class="kn">from</span> <span class="nn">pyshgp.push.config</span> <span class="kn">import</span> <span class="n">PushConfig</span>
<span class="kn">from</span> <span class="nn">pyshgp.push.program</span> <span class="kn">import</span> <span class="n">ProgramSignature</span>
<span class="kn">from</span> <span class="nn">pyshgp.tap</span> <span class="kn">import</span> <span class="n">tap</span><span class="p">,</span> <span class="n">set_verbosity</span>
Expand Down Expand Up @@ -136,7 +138,7 @@ <h1>Source code for pyshgp.gp.estimators</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">solution</span> <span class="o">=</span> <span class="kc">None</span>

<span class="k">if</span> <span class="n">interpreter</span> <span class="o">==</span> <span class="s2">&quot;default&quot;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">interpreter</span> <span class="o">=</span> <span class="n">DEFAULT_INTERPRETER</span>
<span class="bp">self</span><span class="o">.</span><span class="n">interpreter</span> <span class="o">=</span> <span class="n">PushInterpreter</span><span class="p">()</span>
<span class="k">else</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">interpreter</span> <span class="o">=</span> <span class="n">interpreter</span>

Expand Down Expand Up @@ -182,6 +184,7 @@ <h1>Source code for pyshgp.gp.estimators</h1><div class="highlight"><pre>

<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">X</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">arity</span><span class="p">,</span> <span class="n">y_types</span> <span class="o">=</span> <span class="n">check_X_y</span><span class="p">(</span><span class="n">X</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">y_types</span><span class="p">)</span>
<span class="n">output_types</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">interpreter</span><span class="o">.</span><span class="n">type_library</span><span class="o">.</span><span class="n">push_type_for_type</span><span class="p">(</span><span class="n">t</span><span class="p">)</span><span class="o">.</span><span class="n">name</span> <span class="k">for</span> <span class="n">t</span> <span class="ow">in</span> <span class="n">y_types</span><span class="p">]</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">last_str_from_stdout</span><span class="p">:</span>
<span class="n">ndx</span> <span class="o">=</span> <span class="n">list_rindex</span><span class="p">(</span><span class="n">output_types</span><span class="p">,</span> <span class="s2">&quot;str&quot;</span><span class="p">)</span>
Expand All @@ -191,8 +194,7 @@ <h1>Source code for pyshgp.gp.estimators</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">evaluator</span> <span class="o">=</span> <span class="n">DatasetEvaluator</span><span class="p">(</span><span class="n">X</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">interpreter</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">interpreter</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_build_search_algo</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">solution</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">search</span><span class="o">.</span><span class="n">run</span><span class="p">()</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">search</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">parallel_context</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">search</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">parallel_context</span><span class="o">.</span><span class="n">pool</span><span class="o">.</span><span class="n">close</span><span class="p">()</span></div>
<span class="bp">self</span><span class="o">.</span><span class="n">search</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">tear_down</span><span class="p">()</span></div>

<div class="viewcode-block" id="PushEstimator.predict"><a class="viewcode-back" href="../../../api/gp.html#pyshgp.gp.estimators.PushEstimator.predict">[docs]</a> <span class="k">def</span> <span class="nf">predict</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">X</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Execute the synthesized push program on a dataset.</span>
Expand Down Expand Up @@ -257,6 +259,7 @@ <h1>Source code for pyshgp.gp.estimators</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">solution</span> <span class="o">=</span> <span class="n">Individual</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">filepath</span><span class="p">)</span></div></div>
</pre></div>

<div class="clearer"></div>
</div>
</div>
</div>
Expand Down Expand Up @@ -286,12 +289,13 @@ <h3>Navigation</h3>
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">PyshGP 0.1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyshgp.gp.estimators</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2019, Edward Pantridge.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.0.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
</div>
</body>
</html>
14 changes: 9 additions & 5 deletions docs/html/_modules/pyshgp/gp/evaluation.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pyshgp.gp.evaluation &#8212; PyshGP 0.1.6 documentation</title>
<link rel="stylesheet" href="../../../_static/nature.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
Expand All @@ -25,7 +26,8 @@ <h3>Navigation</h3>
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">PyshGP 0.1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" accesskey="U">Module code</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" accesskey="U">Module code</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyshgp.gp.evaluation</a></li>
</ul>
</div>

Expand All @@ -42,7 +44,7 @@ <h1>Source code for pyshgp.gp.evaluation</h1><div class="highlight"><pre>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>

<span class="kn">from</span> <span class="nn">pyshgp.push.interpreter</span> <span class="kn">import</span> <span class="n">PushInterpreter</span><span class="p">,</span> <span class="n">DEFAULT_INTERPRETER</span><span class="p">,</span> <span class="n">Program</span>
<span class="kn">from</span> <span class="nn">pyshgp.push.interpreter</span> <span class="kn">import</span> <span class="n">PushInterpreter</span><span class="p">,</span> <span class="n">Program</span>
<span class="kn">from</span> <span class="nn">pyshgp.tap</span> <span class="kn">import</span> <span class="n">tap</span>
<span class="kn">from</span> <span class="nn">pyshgp.utils</span> <span class="kn">import</span> <span class="n">Token</span>

Expand Down Expand Up @@ -114,7 +116,7 @@ <h1>Source code for pyshgp.gp.evaluation</h1><div class="highlight"><pre>
<span class="n">penalty</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">1e6</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">penalty</span> <span class="o">=</span> <span class="n">penalty</span>
<span class="k">if</span> <span class="n">interpreter</span> <span class="o">==</span> <span class="s2">&quot;default&quot;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">interpreter</span> <span class="o">=</span> <span class="n">DEFAULT_INTERPRETER</span>
<span class="bp">self</span><span class="o">.</span><span class="n">interpreter</span> <span class="o">=</span> <span class="n">PushInterpreter</span><span class="p">()</span>
<span class="k">else</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">interpreter</span> <span class="o">=</span> <span class="n">interpreter</span>

Expand Down Expand Up @@ -273,6 +275,7 @@ <h1>Source code for pyshgp.gp.evaluation</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">error_function</span><span class="p">(</span><span class="n">program</span><span class="p">)</span></div></div>
</pre></div>

<div class="clearer"></div>
</div>
</div>
</div>
Expand Down Expand Up @@ -302,12 +305,13 @@ <h3>Navigation</h3>
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">PyshGP 0.1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyshgp.gp.evaluation</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2019, Edward Pantridge.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.0.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
</div>
</body>
</html>
10 changes: 7 additions & 3 deletions docs/html/_modules/pyshgp/gp/genome.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pyshgp.gp.genome &#8212; PyshGP 0.1.6 documentation</title>
<link rel="stylesheet" href="../../../_static/nature.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
Expand All @@ -25,7 +26,8 @@ <h3>Navigation</h3>
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">PyshGP 0.1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" accesskey="U">Module code</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" accesskey="U">Module code</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyshgp.gp.genome</a></li>
</ul>
</div>

Expand Down Expand Up @@ -391,6 +393,7 @@ <h1>Source code for pyshgp.gp.genome</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">gn</span><span class="p">,</span> <span class="n">errs</span></div></div>
</pre></div>

<div class="clearer"></div>
</div>
</div>
</div>
Expand Down Expand Up @@ -420,12 +423,13 @@ <h3>Navigation</h3>
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">PyshGP 0.1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyshgp.gp.genome</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2019, Edward Pantridge.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.0.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
</div>
</body>
</html>
10 changes: 7 additions & 3 deletions docs/html/_modules/pyshgp/gp/individual.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pyshgp.gp.individual &#8212; PyshGP 0.1.6 documentation</title>
<link rel="stylesheet" href="../../../_static/nature.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
Expand All @@ -25,7 +26,8 @@ <h3>Navigation</h3>
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">PyshGP 0.1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" accesskey="U">Module code</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" accesskey="U">Module code</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyshgp.gp.individual</a></li>
</ul>
</div>

Expand Down Expand Up @@ -130,6 +132,7 @@ <h1>Source code for pyshgp.gp.individual</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">other</span><span class="p">,</span> <span class="n">Individual</span><span class="p">)</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">genome</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">genome</span></div>
</pre></div>

<div class="clearer"></div>
</div>
</div>
</div>
Expand Down Expand Up @@ -159,12 +162,13 @@ <h3>Navigation</h3>
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">PyshGP 0.1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyshgp.gp.individual</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2019, Edward Pantridge.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.0.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
</div>
</body>
</html>
Loading

0 comments on commit 0b3df5a

Please sign in to comment.