Skip to content

Commit

Permalink
deploy: 1c8706e
Browse files Browse the repository at this point in the history
  • Loading branch information
deepyaman committed Sep 14, 2024
1 parent f850ea9 commit 6144f73
Show file tree
Hide file tree
Showing 7 changed files with 770 additions and 1,431 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -258,22 +258,22 @@ <h3 class="anchored" data-anchor-id="install-ibisml">Install IbisML</h3>
<section id="create-your-first-recipe" class="level3">
<h3 class="anchored" data-anchor-id="create-your-first-recipe">Create your first recipe</h3>
<p>With recipes, you can define sequences of feature engineering steps to get your data ready for modeling. For example, create a recipe to replace missing values using the mean of each numeric column and then normalize numeric data to have a standard deviation of one and a mean of zero.</p>
<div id="a605b784" class="cell" data-execution_count="1">
<div id="f31778c6" class="cell" data-execution_count="1">
<div class="sourceCode cell-code" id="cb2"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> ibis_ml <span class="im">as</span> ml</span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a>imputer <span class="op">=</span> ml.ImputeMean(ml.numeric())</span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a>scaler <span class="op">=</span> ml.ScaleStandard(ml.numeric())</span>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a>rec <span class="op">=</span> ml.Recipe(imputer, scaler)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>A recipe can be chained in a <a href="https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.Pipeline.html"><code>Pipeline</code></a> like any other <a href="https://scikit-learn.org/stable/glossary.html#term-transformer">transformer</a>.</p>
<div id="0442cdab" class="cell" data-execution_count="2">
<div id="69115402" class="cell" data-execution_count="2">
<div class="sourceCode cell-code" id="cb3"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="im">from</span> sklearn.pipeline <span class="im">import</span> Pipeline</span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="im">from</span> sklearn.svm <span class="im">import</span> SVC</span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a>pipe <span class="op">=</span> Pipeline([(<span class="st">"rec"</span>, rec), (<span class="st">"svc"</span>, SVC())])</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>The pipeline can be used as any other estimator and avoids leaking the test set into the train set.</p>
<div id="902422cf" class="cell" data-execution_count="3">
<div id="701ee4a0" class="cell" data-execution_count="3">
<div class="sourceCode cell-code" id="cb4"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="im">from</span> sklearn.datasets <span class="im">import</span> make_classification</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="im">from</span> sklearn.model_selection <span class="im">import</span> train_test_split</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a></span>
Expand Down
1 change: 0 additions & 1 deletion reference/core.html
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,6 @@ <h3 class="anchored" data-anchor-id="ibis_ml.Recipe.is_fitted">is_fitted</h3>
<h3 class="anchored" data-anchor-id="ibis_ml.Recipe.set_output">set_output</h3>
<p><code>set_output(transform=None)</code></p>
<p>Set output type returned by <code>transform</code>.</p>
<p>This is part of the standard Scikit-Learn API.</p>
<section id="parameters-3" class="level4">
<h4 class="anchored" data-anchor-id="parameters-3">Parameters</h4>
<table class="caption-top table">
Expand Down
6 changes: 3 additions & 3 deletions reference/support-matrix/index.html

Large diffs are not rendered by default.

Loading

0 comments on commit 6144f73

Please sign in to comment.