Skip to content

Commit

Permalink
rerendered doc
Browse files Browse the repository at this point in the history
  • Loading branch information
daslu committed Sep 27, 2024
1 parent 624c9a2 commit 2cfebec
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 81 deletions.
150 changes: 75 additions & 75 deletions docs/noj_book.automl.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,61 +367,61 @@ <h2 data-number="8.1" class="anchored" data-anchor-id="the-metamorph-pipeline-ab
<tbody>
<tr class="odd">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">0.0</td>
</tr>
<tr class="even">
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">1.0</td>
</tr>
<tr class="odd">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">0.0</td>
</tr>
<tr class="even">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
</tr>
<tr class="odd">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">0.0</td>
</tr>
<tr class="even">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">0.0</td>
</tr>
<tr class="odd">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">0.0</td>
</tr>
<tr class="even">
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">1.0</td>
</tr>
<tr class="odd">
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">0.0</td>
</tr>
<tr class="even">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">0.0</td>
</tr>
Expand All @@ -433,32 +433,44 @@ <h2 data-number="8.1" class="anchored" data-anchor-id="the-metamorph-pipeline-ab
</tr>
<tr class="even">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">0.0</td>
</tr>
<tr class="odd">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
</tr>
<tr class="odd">
<tr class="even">
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">0.0</td>
</tr>
<tr class="odd">
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
</tr>
<tr class="even">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">0.0</td>
</tr>
<tr class="odd">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
</tr>
<tr class="even">
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
</tr>
<tr class="odd">
Expand All @@ -469,7 +481,7 @@ <h2 data-number="8.1" class="anchored" data-anchor-id="the-metamorph-pipeline-ab
</tr>
<tr class="even">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">0.0</td>
</tr>
Expand All @@ -480,19 +492,7 @@ <h2 data-number="8.1" class="anchored" data-anchor-id="the-metamorph-pipeline-ab
<td style="text-align: right;">0.0</td>
</tr>
<tr class="even">
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">1.0</td>
</tr>
<tr class="odd">
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">1.0</td>
</tr>
<tr class="even">
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
Expand All @@ -504,15 +504,15 @@ <h2 data-number="8.1" class="anchored" data-anchor-id="the-metamorph-pipeline-ab
</tr>
</tbody>
</table>
<div><pre><code class="sourceCode language-clojure printed-clojure">:metamorph/mode :fit</code></pre></div><div><pre><code class="sourceCode language-clojure printed-clojure">#uuid "2c62eb2d-1785-478f-b66d-c3ae7b64348e" {:model-data {:majority-class 1.0, :distinct-labels (0.0 1.0)}, :options {:model-type :metamorph.ml/dummy-classifier}, :id #uuid "9d5dcb45-9a55-4313-af63-b2d87b32802d", :feature-columns [:sex :pclass :embarked], :target-columns [:survived], :target-categorical-maps {:survived #tech.v3.dataset.categorical.CategoricalMap{:lookup-table {"no" 0, "yes" 1}, :src-column :survived, :result-datatype :float64}}, :scicloj.metamorph.ml/unsupervised? nil}</code></pre></div></div><p>}</p></div>
<div><pre><code class="sourceCode language-clojure printed-clojure">:metamorph/mode :fit</code></pre></div><div><pre><code class="sourceCode language-clojure printed-clojure">#uuid "81782be5-2536-4bdd-8f81-49ec3b6326f7" {:model-data {:majority-class 1.0, :distinct-labels (0.0 1.0)}, :options {:model-type :metamorph.ml/dummy-classifier}, :id #uuid "b1cd14fb-804d-499d-b8a1-aa7d160ebfaf", :feature-columns [:sex :pclass :embarked], :target-columns [:survived], :target-categorical-maps {:survived #tech.v3.dataset.categorical.CategoricalMap{:lookup-table {"no" 0, "yes" 1}, :src-column :survived, :result-datatype :float64}}, :scicloj.metamorph.ml/unsupervised? nil}</code></pre></div></div><p>}</p></div>
<p>The ctx contains lots of information, so I only show its top level keys</p>
<div class="sourceClojure">
<div class="sourceCode" id="cb13"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a>(<span class="kw">keys</span> ctx-after-train)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="printedClojure">
<div class="sourceCode" id="cb14"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a>(<span class="at">:metamorph/data</span></span>
<span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a> <span class="at">:metamorph/mode</span></span>
<span id="cb14-3"><a href="#cb14-3" aria-hidden="true" tabindex="-1"></a> #uuid <span class="st">"2c62eb2d-1785-478f-b66d-c3ae7b64348e"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb14-3"><a href="#cb14-3" aria-hidden="true" tabindex="-1"></a> #uuid <span class="st">"81782be5-2536-4bdd-8f81-49ec3b6326f7"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>This context map has the “data”, the “mode” and an UUID for each operation (we had only one in this pipeline)</p>
<div class="sourceClojure">
Expand All @@ -531,61 +531,61 @@ <h2 data-number="8.1" class="anchored" data-anchor-id="the-metamorph-pipeline-ab
<tbody>
<tr class="odd">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">0.0</td>
</tr>
<tr class="even">
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">1.0</td>
</tr>
<tr class="odd">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">0.0</td>
</tr>
<tr class="even">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
</tr>
<tr class="odd">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">0.0</td>
</tr>
<tr class="even">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">0.0</td>
</tr>
<tr class="odd">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">0.0</td>
</tr>
<tr class="even">
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">1.0</td>
</tr>
<tr class="odd">
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">0.0</td>
</tr>
<tr class="even">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">0.0</td>
</tr>
Expand All @@ -597,32 +597,44 @@ <h2 data-number="8.1" class="anchored" data-anchor-id="the-metamorph-pipeline-ab
</tr>
<tr class="even">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">0.0</td>
</tr>
<tr class="odd">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
</tr>
<tr class="odd">
<tr class="even">
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">0.0</td>
</tr>
<tr class="odd">
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
</tr>
<tr class="even">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">0.0</td>
</tr>
<tr class="odd">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
</tr>
<tr class="even">
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
</tr>
<tr class="odd">
Expand All @@ -633,7 +645,7 @@ <h2 data-number="8.1" class="anchored" data-anchor-id="the-metamorph-pipeline-ab
</tr>
<tr class="even">
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">0.0</td>
</tr>
Expand All @@ -644,19 +656,7 @@ <h2 data-number="8.1" class="anchored" data-anchor-id="the-metamorph-pipeline-ab
<td style="text-align: right;">0.0</td>
</tr>
<tr class="even">
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">2.0</td>
<td style="text-align: right;">1.0</td>
</tr>
<tr class="odd">
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">3.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">1.0</td>
</tr>
<tr class="even">
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
<td style="text-align: right;">0.0</td>
<td style="text-align: right;">1.0</td>
Expand All @@ -666,7 +666,7 @@ <h2 data-number="8.1" class="anchored" data-anchor-id="the-metamorph-pipeline-ab
</div><div><pre><code class="sourceCode language-clojure printed-clojure">:fit
</code></pre></div><div><pre><code class="sourceCode language-clojure printed-clojure">{:model-data {:majority-class 1.0, :distinct-labels (0.0 1.0)},
:options {:model-type :metamorph.ml/dummy-classifier},
:id #uuid "9d5dcb45-9a55-4313-af63-b2d87b32802d",
:id #uuid "b1cd14fb-804d-499d-b8a1-aa7d160ebfaf",
:feature-columns [:sex :pclass :embarked],
:target-columns [:survived],
:target-categorical-maps
Expand All @@ -690,7 +690,7 @@ <h2 data-number="8.1" class="anchored" data-anchor-id="the-metamorph-pipeline-ab
<div class="printedClojure">
<div class="sourceCode" id="cb18"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a>(<span class="at">:metamorph/data</span></span>
<span id="cb18-2"><a href="#cb18-2" aria-hidden="true" tabindex="-1"></a> <span class="at">:metamorph/mode</span></span>
<span id="cb18-3"><a href="#cb18-3" aria-hidden="true" tabindex="-1"></a> #uuid <span class="st">"2c62eb2d-1785-478f-b66d-c3ae7b64348e"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb18-3"><a href="#cb18-3" aria-hidden="true" tabindex="-1"></a> #uuid <span class="st">"81782be5-2536-4bdd-8f81-49ec3b6326f7"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>For the dummy-model we do not see a <code>trained-model</code>, but it “communicates” the majority class from the train data to use it for prediction. So the <code>dummy-model</code> has ‘learned’ the majority class from its training data.</p>
<p>So we can get prediction result out of the ctx:</p>
Expand Down Expand Up @@ -723,7 +723,7 @@ <h2 data-number="8.2" class="anchored" data-anchor-id="use-metamorph-pipelines-t
<div class="printedClojure">
<div class="sourceCode" id="cb23"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a>(<span class="at">:metamorph/data</span></span>
<span id="cb23-2"><a href="#cb23-2" aria-hidden="true" tabindex="-1"></a> <span class="at">:metamorph/mode</span></span>
<span id="cb23-3"><a href="#cb23-3" aria-hidden="true" tabindex="-1"></a> #uuid <span class="st">"97a96cdc-a3ab-400d-bbff-2b50917e2b12"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb23-3"><a href="#cb23-3" aria-hidden="true" tabindex="-1"></a> #uuid <span class="st">"39b8b911-7c11-4ce5-a3bd-0dbf5ead1963"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>To show the power of pipelines, I start with doing the simplest possible pipeline, and expand then on it.</p>
<p>We can already chain train and test with usual functions:</p>
Expand Down Expand Up @@ -1663,20 +1663,20 @@ <h2 data-number="8.5" class="anchored" data-anchor-id="finding-the-best-model-au
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:sex :pclass]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:sex :pclass :embarked]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td>0.7762267504602298</td>
<td>0.7750777629657843</td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>{:model-type :sklearn.classification/random-forest-classifier}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>{:model-type :sklearn.classification/logistic-regression}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:sex :pclass :embarked]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:sex :pclass]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td>0.7750777629657843</td>
<td>0.773973211451787</td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>{:model-type :sklearn.classification/logistic-regression}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>{:model-type :sklearn.classification/random-forest-classifier}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
</tbody>
Expand Down
Loading

0 comments on commit 2cfebec

Please sign in to comment.