Skip to content

Commit

Permalink
Merge pull request #9 from chris-santiago/develop
Browse files Browse the repository at this point in the history
docs
  • Loading branch information
chris-santiago authored Mar 27, 2024
2 parents 860bd3e + b955f2d commit a254aad
Show file tree
Hide file tree
Showing 13 changed files with 120 additions and 9 deletions.
Binary file modified docs/build/html/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/html/.doctrees/steps.doctree
Binary file not shown.
18 changes: 14 additions & 4 deletions docs/build/html/_modules/steps/mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,17 @@
</div>
<article role="main">
<h1>Source code for steps.mixin</h1><div class="highlight"><pre>
<span></span><span class="kn">from</span> <span class="nn">abc</span> <span class="kn">import</span> <span class="n">ABCMeta</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Union</span><span class="p">,</span> <span class="n">Any</span>
<span></span><span class="sd">&quot;&quot;&quot;Step selection mixin module.&quot;&quot;&quot;</span>
<span class="kn">from</span> <span class="nn">abc</span> <span class="kn">import</span> <span class="n">ABCMeta</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Any</span><span class="p">,</span> <span class="n">Union</span>

<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">from</span> <span class="nn">sklearn.linear_model</span> <span class="kn">import</span> <span class="n">LinearRegression</span><span class="p">,</span> <span class="n">LogisticRegression</span>
<span class="kn">from</span> <span class="nn">sklearn.metrics</span> <span class="kn">import</span> <span class="n">log_loss</span><span class="p">,</span> <span class="n">mean_squared_error</span>


<div class="viewcode-block" id="StepsMixin">
<a class="viewcode-back" href="../../steps.html#steps.forward.StepsMixin">[docs]</a>
<span class="k">class</span> <span class="nc">StepsMixin</span><span class="p">(</span><span class="n">metaclass</span><span class="o">=</span><span class="n">ABCMeta</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Step selection mixin that returns regressor/classifier estimator and score func.</span>
Expand All @@ -212,6 +215,8 @@ <h1>Source code for steps.mixin</h1><div class="highlight"><pre>
<span class="sd"> and a score func based on target dtype using the `get_loss_func` func.</span>
<span class="sd"> &quot;&quot;&quot;</span>

<div class="viewcode-block" id="StepsMixin.get_estimator">
<a class="viewcode-back" href="../../steps.html#steps.forward.StepsMixin.get_estimator">[docs]</a>
<span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">get_estimator</span><span class="p">(</span><span class="n">y</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Any</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
Expand All @@ -229,8 +234,11 @@ <h1>Source code for steps.mixin</h1><div class="highlight"><pre>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">y</span><span class="o">.</span><span class="n">dtype</span> <span class="o">==</span> <span class="s1">&#39;float&#39;</span><span class="p">:</span>
<span class="k">return</span> <span class="n">LinearRegression</span>
<span class="k">return</span> <span class="n">LogisticRegression</span>
<span class="k">return</span> <span class="n">LogisticRegression</span></div>


<div class="viewcode-block" id="StepsMixin.get_loss_func">
<a class="viewcode-back" href="../../steps.html#steps.forward.StepsMixin.get_loss_func">[docs]</a>
<span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">get_loss_func</span><span class="p">(</span><span class="n">y</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Union</span><span class="p">[</span><span class="n">mean_squared_error</span><span class="p">,</span> <span class="n">log_loss</span><span class="p">]:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
Expand All @@ -248,7 +256,9 @@ <h1>Source code for steps.mixin</h1><div class="highlight"><pre>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">y</span><span class="o">.</span><span class="n">dtype</span> <span class="o">==</span> <span class="s1">&#39;float&#39;</span><span class="p">:</span>
<span class="k">return</span> <span class="n">mean_squared_error</span>
<span class="k">return</span> <span class="n">log_loss</span>
<span class="k">return</span> <span class="n">log_loss</span></div>
</div>

</pre></div>
</article>
</div>
Expand Down
9 changes: 9 additions & 0 deletions docs/build/html/_sources/steps.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ steps.metrics module
:undoc-members:
:show-inheritance:

steps.mixin module
--------------------

.. automodule:: steps.mixin
:members:
:undoc-members:
:show-inheritance:


steps.subset module
-------------------

Expand Down
19 changes: 17 additions & 2 deletions docs/build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ <h2>G</h2>
<li><a href="steps.html#steps.forward.ForwardSelector.get_estimator">get_estimator() (steps.forward.ForwardSelector static method)</a>

<ul>
<li><a href="steps.html#steps.mixin.StepsMixin.get_estimator">(steps.mixin.StepsMixin static method)</a>
</li>
<li><a href="steps.html#steps.subset.SubsetSelector.get_estimator">(steps.subset.SubsetSelector static method)</a>
</li>
</ul></li>
Expand All @@ -260,6 +262,8 @@ <h2>G</h2>
<li><a href="steps.html#steps.forward.ForwardSelector.get_loss_func">get_loss_func() (steps.forward.ForwardSelector static method)</a>

<ul>
<li><a href="steps.html#steps.mixin.StepsMixin.get_loss_func">(steps.mixin.StepsMixin static method)</a>
</li>
<li><a href="steps.html#steps.subset.SubsetSelector.get_loss_func">(steps.subset.SubsetSelector static method)</a>
</li>
</ul></li>
Expand Down Expand Up @@ -314,6 +318,8 @@ <h2>M</h2>
<li><a href="steps.html#module-steps.forward">steps.forward</a>
</li>
<li><a href="steps.html#module-steps.metrics">steps.metrics</a>
</li>
<li><a href="steps.html#module-steps.mixin">steps.mixin</a>
</li>
<li><a href="steps.html#module-steps.subset">steps.subset</a>
</li>
Expand Down Expand Up @@ -345,20 +351,27 @@ <h2>S</h2>
<li><a href="steps.html#module-steps">module</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li>
steps.forward

<ul>
<li><a href="steps.html#module-steps.forward">module</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li>
steps.metrics

<ul>
<li><a href="steps.html#module-steps.metrics">module</a>
</li>
</ul></li>
<li>
steps.mixin

<ul>
<li><a href="steps.html#module-steps.mixin">module</a>
</li>
</ul></li>
<li>
Expand All @@ -368,6 +381,8 @@ <h2>S</h2>
<li><a href="steps.html#module-steps.subset">module</a>
</li>
</ul></li>
<li><a href="steps.html#steps.mixin.StepsMixin">StepsMixin (class in steps.mixin)</a>
</li>
<li><a href="steps.html#steps.subset.SubsetSelector">SubsetSelector (class in steps.subset)</a>
</li>
</ul></td>
Expand Down
4 changes: 4 additions & 0 deletions docs/build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ <h1>step-select Documentation<a class="headerlink" href="#step-select-documentat
<li class="toctree-l4"><a class="reference internal" href="steps.html#steps.metrics.get_aic"><code class="docutils literal notranslate"><span class="pre">get_aic()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="steps.html#module-steps.mixin">steps.mixin module</a><ul>
<li class="toctree-l4"><a class="reference internal" href="steps.html#steps.mixin.StepsMixin"><code class="docutils literal notranslate"><span class="pre">StepsMixin</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="steps.html#module-steps.subset">steps.subset module</a><ul>
<li class="toctree-l4"><a class="reference internal" href="steps.html#steps.subset.SubsetSelector"><code class="docutils literal notranslate"><span class="pre">SubsetSelector</span></code></a></li>
</ul>
Expand Down
8 changes: 8 additions & 0 deletions docs/build/html/modules.html
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,14 @@ <h1>steps<a class="headerlink" href="#steps" title="Link to this heading">#</a><
<li class="toctree-l3"><a class="reference internal" href="steps.html#steps.metrics.get_aic"><code class="docutils literal notranslate"><span class="pre">get_aic()</span></code></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="steps.html#module-steps.mixin">steps.mixin module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="steps.html#steps.mixin.StepsMixin"><code class="docutils literal notranslate"><span class="pre">StepsMixin</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="steps.html#steps.mixin.StepsMixin.get_estimator"><code class="docutils literal notranslate"><span class="pre">StepsMixin.get_estimator()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="steps.html#steps.mixin.StepsMixin.get_loss_func"><code class="docutils literal notranslate"><span class="pre">StepsMixin.get_loss_func()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="steps.html#module-steps.subset">steps.subset module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="steps.html#steps.subset.SubsetSelector"><code class="docutils literal notranslate"><span class="pre">SubsetSelector</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="steps.html#steps.subset.SubsetSelector.__init__"><code class="docutils literal notranslate"><span class="pre">SubsetSelector.__init__()</span></code></a></li>
Expand Down
Binary file modified docs/build/html/objects.inv
Binary file not shown.
6 changes: 6 additions & 0 deletions docs/build/html/py-modindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ <h1>Python Module Index</h1>
<a href="steps.html#module-steps.metrics"><code class="xref">steps.metrics</code></a></td><td>
<em></em></td>
</tr>
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;
<a href="steps.html#module-steps.mixin"><code class="xref">steps.mixin</code></a></td><td>
<em></em></td>
</tr>
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;
Expand Down
Loading

0 comments on commit a254aad

Please sign in to comment.