Skip to content

Commit

Permalink
Deployed d9714ff with MkDocs version: 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
KarelZe committed Nov 20, 2023
1 parent bfff50d commit abeb244
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 29 deletions.
89 changes: 61 additions & 28 deletions reference/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,13 @@ <h1>API reference</h1>
<span class="normal">520</span>
<span class="normal">521</span>
<span class="normal">522</span>
<span class="normal">523</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">class</span> <span class="nc">ClassicalClassifier</span><span class="p">(</span><span class="n">ClassifierMixin</span><span class="p">,</span> <span class="n">BaseEstimator</span><span class="p">):</span>
<span class="normal">523</span>
<span class="normal">524</span>
<span class="normal">525</span>
<span class="normal">526</span>
<span class="normal">527</span>
<span class="normal">528</span>
<span class="normal">529</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">class</span> <span class="nc">ClassicalClassifier</span><span class="p">(</span><span class="n">ClassifierMixin</span><span class="p">,</span> <span class="n">BaseEstimator</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;ClassicalClassifier implements several trade classification rules.</span>

<span class="sd"> Including:</span>
Expand Down Expand Up @@ -937,6 +943,12 @@ <h1>API reference</h1>
<span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Initialize a ClassicalClassifier.</span>

<span class="sd"> Examples:</span>
<span class="sd"> &gt;&gt;&gt; clf = ClassicalClassifier(layers=[(&quot;lr&quot;, &quot;all&quot;)], strategy=&quot;const&quot;)</span>

<span class="sd"> Or equivalent:</span>
<span class="sd"> &gt;&gt;&gt; clf = ClassicalClassifier(layers=[(&quot;quote&quot;, &quot;all&quot;), (&quot;tick&quot;, &quot;all&quot;)], strategy=&quot;const&quot;)</span>

<span class="sd"> Args:</span>
<span class="sd"> layers (List[ tuple[ str, str, ] ]): Layers of classical rule.</span>
<span class="sd"> features (List[str] | None, optional): List of feature names in order of columns. Required to match columns in feature matrix with label. Can be `None`, if `pd.DataFrame` is passed. Defaults to None.</span>
Expand Down Expand Up @@ -1343,7 +1355,7 @@ <h1>API reference</h1>
<span class="n">func</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">func_mapping_</span><span class="p">[</span><span class="n">func_str</span><span class="p">]</span>
<span class="n">pred</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">where</span><span class="p">(</span>
<span class="n">np</span><span class="o">.</span><span class="n">isnan</span><span class="p">(</span><span class="n">pred</span><span class="p">),</span>
<span class="n">func</span><span class="p">(</span><span class="n">subset</span><span class="p">),</span>
<span class="n">func</span><span class="p">(</span><span class="n">subset</span><span class="p">),</span> <span class="c1"># type: ignore [operator]</span>
<span class="n">pred</span><span class="p">,</span>
<span class="p">)</span>

Expand Down Expand Up @@ -1420,6 +1432,15 @@ <h2 id="tclf.classical_classifier.ClassicalClassifier.__init__" class="doc doc-h



<p><strong>Examples:</strong></p>
<div class="codehilite"><pre><span></span><code><span class="gp">&gt;&gt;&gt; </span><span class="n">clf</span> <span class="o">=</span> <span class="n">ClassicalClassifier</span><span class="p">(</span><span class="n">layers</span><span class="o">=</span><span class="p">[(</span><span class="s2">&quot;lr&quot;</span><span class="p">,</span> <span class="s2">&quot;all&quot;</span><span class="p">)],</span> <span class="n">strategy</span><span class="o">=</span><span class="s2">&quot;const&quot;</span><span class="p">)</span>
</code></pre></div>
<p>Or equivalent:</p>
<div class="codehilite"><pre><span></span><code><span class="gp">&gt;&gt;&gt; </span><span class="n">clf</span> <span class="o">=</span> <span class="n">ClassicalClassifier</span><span class="p">(</span><span class="n">layers</span><span class="o">=</span><span class="p">[(</span><span class="s2">&quot;quote&quot;</span><span class="p">,</span> <span class="s2">&quot;all&quot;</span><span class="p">),</span> <span class="p">(</span><span class="s2">&quot;tick&quot;</span><span class="p">,</span> <span class="s2">&quot;all&quot;</span><span class="p">)],</span> <span class="n">strategy</span><span class="o">=</span><span class="s2">&quot;const&quot;</span><span class="p">)</span>
</code></pre></div>



<p><strong>Parameters:</strong></p>
<table>
<thead>
Expand Down Expand Up @@ -1516,7 +1537,13 @@ <h2 id="tclf.classical_classifier.ClassicalClassifier.__init__" class="doc doc-h
<span class="normal">80</span>
<span class="normal">81</span>
<span class="normal">82</span>
<span class="normal">83</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
<span class="normal">83</span>
<span class="normal">84</span>
<span class="normal">85</span>
<span class="normal">86</span>
<span class="normal">87</span>
<span class="normal">88</span>
<span class="normal">89</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="o">*</span><span class="p">,</span>
<span class="n">layers</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span>
Expand All @@ -1531,6 +1558,12 @@ <h2 id="tclf.classical_classifier.ClassicalClassifier.__init__" class="doc doc-h
<span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Initialize a ClassicalClassifier.</span>

<span class="sd"> Examples:</span>
<span class="sd"> &gt;&gt;&gt; clf = ClassicalClassifier(layers=[(&quot;lr&quot;, &quot;all&quot;)], strategy=&quot;const&quot;)</span>

<span class="sd"> Or equivalent:</span>
<span class="sd"> &gt;&gt;&gt; clf = ClassicalClassifier(layers=[(&quot;quote&quot;, &quot;all&quot;), (&quot;tick&quot;, &quot;all&quot;)], strategy=&quot;const&quot;)</span>

<span class="sd"> Args:</span>
<span class="sd"> layers (List[ tuple[ str, str, ] ]): Layers of classical rule.</span>
<span class="sd"> features (List[str] | None, optional): List of feature names in order of columns. Required to match columns in feature matrix with label. Can be `None`, if `pd.DataFrame` is passed. Defaults to None.</span>
Expand Down Expand Up @@ -1691,13 +1724,7 @@ <h2 id="tclf.classical_classifier.ClassicalClassifier.fit" class="doc doc-headin

<details class="quote">
<summary>Source code in <code>src/tclf/classical_classifier.py</code></summary>
<div class="codehilite"><table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">378</span>
<span class="normal">379</span>
<span class="normal">380</span>
<span class="normal">381</span>
<span class="normal">382</span>
<span class="normal">383</span>
<span class="normal">384</span>
<div class="codehilite"><table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">384</span>
<span class="normal">385</span>
<span class="normal">386</span>
<span class="normal">387</span>
Expand Down Expand Up @@ -1766,7 +1793,13 @@ <h2 id="tclf.classical_classifier.ClassicalClassifier.fit" class="doc doc-headin
<span class="normal">450</span>
<span class="normal">451</span>
<span class="normal">452</span>
<span class="normal">453</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span> <span class="nf">fit</span><span class="p">(</span>
<span class="normal">453</span>
<span class="normal">454</span>
<span class="normal">455</span>
<span class="normal">456</span>
<span class="normal">457</span>
<span class="normal">458</span>
<span class="normal">459</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span> <span class="nf">fit</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="n">npt</span><span class="o">.</span><span class="n">NDArray</span> <span class="o">|</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">,</span>
<span class="n">y</span><span class="p">:</span> <span class="n">npt</span><span class="o">.</span><span class="n">NDArray</span> <span class="o">|</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">,</span>
Expand Down Expand Up @@ -1920,13 +1953,7 @@ <h2 id="tclf.classical_classifier.ClassicalClassifier.predict" class="doc doc-he

<details class="quote">
<summary>Source code in <code>src/tclf/classical_classifier.py</code></summary>
<div class="codehilite"><table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">455</span>
<span class="normal">456</span>
<span class="normal">457</span>
<span class="normal">458</span>
<span class="normal">459</span>
<span class="normal">460</span>
<span class="normal">461</span>
<div class="codehilite"><table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">461</span>
<span class="normal">462</span>
<span class="normal">463</span>
<span class="normal">464</span>
Expand Down Expand Up @@ -1958,7 +1985,13 @@ <h2 id="tclf.classical_classifier.ClassicalClassifier.predict" class="doc doc-he
<span class="normal">490</span>
<span class="normal">491</span>
<span class="normal">492</span>
<span class="normal">493</span></pre></div></td><td class="code"><div><pre><span></span><code><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="n">npt</span><span class="o">.</span><span class="n">NDArray</span> <span class="o">|</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">npt</span><span class="o">.</span><span class="n">NDArray</span><span class="p">:</span>
<span class="normal">493</span>
<span class="normal">494</span>
<span class="normal">495</span>
<span class="normal">496</span>
<span class="normal">497</span>
<span class="normal">498</span>
<span class="normal">499</span></pre></div></td><td class="code"><div><pre><span></span><code><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="n">npt</span><span class="o">.</span><span class="n">NDArray</span> <span class="o">|</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">npt</span><span class="o">.</span><span class="n">NDArray</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Perform classification on test vectors `X`.</span>

<span class="sd"> Args:</span>
Expand All @@ -1983,7 +2016,7 @@ <h2 id="tclf.classical_classifier.ClassicalClassifier.predict" class="doc doc-he
<span class="n">func</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">func_mapping_</span><span class="p">[</span><span class="n">func_str</span><span class="p">]</span>
<span class="n">pred</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">where</span><span class="p">(</span>
<span class="n">np</span><span class="o">.</span><span class="n">isnan</span><span class="p">(</span><span class="n">pred</span><span class="p">),</span>
<span class="n">func</span><span class="p">(</span><span class="n">subset</span><span class="p">),</span>
<span class="n">func</span><span class="p">(</span><span class="n">subset</span><span class="p">),</span> <span class="c1"># type: ignore [operator]</span>
<span class="n">pred</span><span class="p">,</span>
<span class="p">)</span>

Expand Down Expand Up @@ -2077,13 +2110,7 @@ <h2 id="tclf.classical_classifier.ClassicalClassifier.predict_proba" class="doc

<details class="quote">
<summary>Source code in <code>src/tclf/classical_classifier.py</code></summary>
<div class="codehilite"><table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">495</span>
<span class="normal">496</span>
<span class="normal">497</span>
<span class="normal">498</span>
<span class="normal">499</span>
<span class="normal">500</span>
<span class="normal">501</span>
<div class="codehilite"><table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">501</span>
<span class="normal">502</span>
<span class="normal">503</span>
<span class="normal">504</span>
Expand All @@ -2105,7 +2132,13 @@ <h2 id="tclf.classical_classifier.ClassicalClassifier.predict_proba" class="doc
<span class="normal">520</span>
<span class="normal">521</span>
<span class="normal">522</span>
<span class="normal">523</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span> <span class="nf">predict_proba</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="n">npt</span><span class="o">.</span><span class="n">NDArray</span> <span class="o">|</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">npt</span><span class="o">.</span><span class="n">NDArray</span><span class="p">:</span>
<span class="normal">523</span>
<span class="normal">524</span>
<span class="normal">525</span>
<span class="normal">526</span>
<span class="normal">527</span>
<span class="normal">528</span>
<span class="normal">529</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span> <span class="nf">predict_proba</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="n">npt</span><span class="o">.</span><span class="n">NDArray</span> <span class="o">|</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">npt</span><span class="o">.</span><span class="n">NDArray</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Predict class probabilities for X.</span>

<span class="sd"> Probabilities are either 0 or 1 depending on the class.</span>
Expand Down
Loading

0 comments on commit abeb244

Please sign in to comment.