Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kvarada committed Nov 21, 2023
1 parent ce7cf50 commit e523ced
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 50 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 25 additions & 24 deletions _sources/lectures/19_time-series.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lectures/17_natural-language-processing.html
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ <h2>Imports<a class="headerlink" href="#imports" title="Permalink to this headin
Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.
</pre></div>
</div>
<img alt="../_images/66fb019b907d7259341c9ab23de87acfbf2272d63a595e10951cb493079e5917.png" src="../_images/66fb019b907d7259341c9ab23de87acfbf2272d63a595e10951cb493079e5917.png" />
<img alt="../_images/5a8499c8457bebcd85ed93f9b8c873e117cc6075056a72cb69b14d545ff786dc.png" src="../_images/5a8499c8457bebcd85ed93f9b8c873e117cc6075056a72cb69b14d545ff786dc.png" />
</div>
</div>
<div class="cell docutils container">
Expand Down
43 changes: 21 additions & 22 deletions lectures/19_time-series.html
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,8 @@ <h3>Encoding time of day as a categorical feature<a class="headerlink" href="#en
</div>
</div>
<ul class="simple">
<li><p>What if we add interaction features (e.g., something like Day == 5 and hour == 9:00)</p></li>
<li><p>The scores are a bit better now.</p></li>
<li><p>What if we add interaction features (e.g., something like Day == Mon and hour == 9:00)</p></li>
<li><p>We can do it using <code class="docutils literal notranslate"><span class="pre">sklearn</span></code>’s <code class="docutils literal notranslate"><span class="pre">PolynomialFeatures</span></code> transformer.</p></li>
</ul>
<div class="cell docutils container">
Expand Down Expand Up @@ -1790,16 +1791,14 @@ <h3>Encoding time of day as a categorical feature<a class="headerlink" href="#en
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.
</pre></div>
</div>
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Train-set R^2: 0.87
Train-set R^2: 0.87
Test-set R^2: 0.85
</pre></div>
</div>
<img alt="../_images/85412bb536ae0a97c3176419ba4ca35b40a9ec0b6e8f08c287256ec40504844e.png" src="../_images/85412bb536ae0a97c3176419ba4ca35b40a9ec0b6e8f08c287256ec40504844e.png" />
</div>
</div>
<p>Let’s examine the coefficients learned by <code class="docutils literal notranslate"><span class="pre">Ridge</span></code>.</p>
<p>The scores are much better now. Since we are using a linear model, we can examine the coefficients learned by <code class="docutils literal notranslate"><span class="pre">Ridge</span></code>.</p>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">features_nonzero</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">features_poly</span><span class="p">)[</span><span class="n">lr</span><span class="o">.</span><span class="n">coef_</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">]</span>
Expand Down Expand Up @@ -2301,10 +2300,10 @@ <h3>Lag-based features<a class="headerlink" href="#lag-based-features" title="Pe
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Train-set R^2: 0.95
Test-set R^2: 0.67
Test-set R^2: 0.69
</pre></div>
</div>
<img alt="../_images/b3593ccaf9f3e3a95cc55aeb81ff8ece760a3da6c315f3ff9a829f57bdbbb1cd.png" src="../_images/b3593ccaf9f3e3a95cc55aeb81ff8ece760a3da6c315f3ff9a829f57bdbbb1cd.png" />
<img alt="../_images/7223e773cbadb77981275668076fd8b598d1896c8f8684dd0ed7e4433a5835f4.png" src="../_images/7223e773cbadb77981275668076fd8b598d1896c8f8684dd0ed7e4433a5835f4.png" />
</div>
</div>
<p>The results are not as good as the results with our previously engineered features. How about combining lag-based features and the previously extracted features?</p>
Expand All @@ -2323,11 +2322,11 @@ <h3>Lag-based features<a class="headerlink" href="#lag-based-features" title="Pe
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Train-set R^2: 0.95
Test-set R^2: 0.77
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Train-set R^2: 0.96
Test-set R^2: 0.79
</pre></div>
</div>
<img alt="../_images/d222baec77c4f3529c49f7f76fd3c193d0954df4b73bc82c4d50963815f74515.png" src="../_images/d222baec77c4f3529c49f7f76fd3c193d0954df4b73bc82c4d50963815f74515.png" />
<img alt="../_images/5ba8227a9e8d225c25cd9b9c819610ec41de3ce74d40205ce41e2ce909254e6d.png" src="../_images/5ba8227a9e8d225c25cd9b9c819610ec41de3ce74d40205ce41e2ce909254e6d.png" />
</div>
</div>
<p>Some improvement but we are getting better results without the lag features in this case.</p>
Expand Down Expand Up @@ -2428,36 +2427,36 @@ <h3>Cross-validation<a class="headerlink" href="#cross-validation" title="Permal
<tbody>
<tr>
<th>0</th>
<td>0.000782</td>
<td>0.000268</td>
<td>0.000962</td>
<td>0.000299</td>
<td>0.642676</td>
<td>0.873182</td>
</tr>
<tr>
<th>1</th>
<td>0.000537</td>
<td>0.000225</td>
<td>0.000655</td>
<td>0.000292</td>
<td>0.828405</td>
<td>0.874305</td>
</tr>
<tr>
<th>2</th>
<td>0.001041</td>
<td>0.000754</td>
<td>0.000706</td>
<td>0.000265</td>
<td>0.773851</td>
<td>0.901262</td>
</tr>
<tr>
<th>3</th>
<td>0.000965</td>
<td>0.000645</td>
<td>0.001002</td>
<td>0.000751</td>
<td>0.696712</td>
<td>0.889429</td>
</tr>
<tr>
<th>4</th>
<td>0.000953</td>
<td>0.000227</td>
<td>0.000813</td>
<td>0.000245</td>
<td>0.892733</td>
<td>0.863889</td>
</tr>
Expand All @@ -2482,10 +2481,10 @@ <h2>Forecasting further into the future<a class="headerlink" href="#forecasting-
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Train-set R^2: 0.94
Test-set R^2: 0.67
Test-set R^2: 0.69
</pre></div>
</div>
<img alt="../_images/57a105a80af0556d72b80b57e68117748634c0c1e316ddd16a79fa0500de3663.png" src="../_images/57a105a80af0556d72b80b57e68117748634c0c1e316ddd16a79fa0500de3663.png" />
<img alt="../_images/a99b49081b28890e9e721b1cc202f8dcd0d80b49ae50de01f10b5b12386b3c60.png" src="../_images/a99b49081b28890e9e721b1cc202f8dcd0d80b49ae50de01f10b5b12386b3c60.png" />
</div>
</div>
<ul class="simple">
Expand Down
2 changes: 1 addition & 1 deletion lectures/class_demos/14_class-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ <h2>Let’s cluster images!!<a class="headerlink" href="#let-s-cluster-images" t
Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.
</pre></div>
</div>
<img alt="../../_images/80c69416a28068b32b7d995d381f0f6529018f772b668445946422c8a757b384.png" src="../../_images/80c69416a28068b32b7d995d381f0f6529018f772b668445946422c8a757b384.png" />
<img alt="../../_images/e2fbe152d5cbb22abce858b1950883edf4f4a1295ffabb5b8d55558ef031c635.png" src="../../_images/e2fbe152d5cbb22abce858b1950883edf4f4a1295ffabb5b8d55558ef031c635.png" />
</div>
</div>
<div class="cell docutils container">
Expand Down
2 changes: 1 addition & 1 deletion lectures/class_demos/15_class-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ <h1>Lecture 15: Class demo<a class="headerlink" href="#lecture-15-class-demo" ti
Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.
</pre></div>
</div>
<img alt="../../_images/cd421f298341966020aaca456a1ec51bd32aa33fe8d8c23adab33865026b7809.png" src="../../_images/cd421f298341966020aaca456a1ec51bd32aa33fe8d8c23adab33865026b7809.png" />
<img alt="../../_images/c78df450bb22e3e9f8b73099149ff949bbe9911b14991ccb4b5549e617072e96.png" src="../../_images/c78df450bb22e3e9f8b73099149ff949bbe9911b14991ccb4b5549e617072e96.png" />
</div>
</div>
<div class="cell docutils container">
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit e523ced

Please sign in to comment.