Skip to content

Commit

Permalink
[ci skip] Change c.c. to cm³ (#771) 6205ca5
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturoAmorQ committed Mar 14, 2024
1 parent 55d77b6 commit 27f81a4
Show file tree
Hide file tree
Showing 98 changed files with 677 additions and 680 deletions.
Binary file not shown.
Binary file not shown.
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
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.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
2 changes: 1 addition & 1 deletion _sources/python_scripts/datasets_blood_transfusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
# * `Recency`: the time in months since the last time a person intended to give
# blood;
# * `Frequency`: the number of time a person intended to give blood in the past;
# * `Monetary`: the amount of blood given in the past (in c.c.);
# * `Monetary`: the amount of blood given in the past (in cm³);
# * `Time`: the time in months since the first time a person intended to give
# blood.
#
Expand Down
2 changes: 1 addition & 1 deletion _sources/python_scripts/metrics_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
# predictions a classifier can provide.
#
# For this reason, we will create a synthetic sample for a new potential donor:
# they donated blood twice in the past (1000 c.c. each time). The last time was
# they donated blood twice in the past (1000 cm³ each time). The last time was
# 6 months ago, and the first time goes back to 20 months ago.

# %%
Expand Down
366 changes: 183 additions & 183 deletions appendix/notebook_timings.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions python_scripts/02_numerical_pipeline_cross_validation.html
Original file line number Diff line number Diff line change
Expand Up @@ -799,12 +799,12 @@ <h2>The need for cross-validation<a class="headerlink" href="#the-need-for-cross
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>CPU times: user 462 ms, sys: 267 ms, total: 728 ms
Wall time: 411 ms
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>CPU times: user 469 ms, sys: 281 ms, total: 751 ms
Wall time: 422 ms
</pre></div>
</div>
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>{&#39;fit_time&#39;: array([0.06059599, 0.05906844, 0.05620313, 0.05689025, 0.05796146]),
&#39;score_time&#39;: array([0.01392531, 0.01375055, 0.01452756, 0.01398158, 0.01382446]),
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>{&#39;fit_time&#39;: array([0.06269455, 0.06022215, 0.06006885, 0.06087542, 0.05975509]),
&#39;score_time&#39;: array([0.01281929, 0.01433253, 0.01422644, 0.01378584, 0.01394677]),
&#39;test_score&#39;: array([0.79557785, 0.80049135, 0.79965192, 0.79873055, 0.80456593])}
</pre></div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions python_scripts/02_numerical_pipeline_scaling.html
Original file line number Diff line number Diff line change
Expand Up @@ -2037,7 +2037,7 @@ <h2>Model fitting with preprocessing<a class="headerlink" href="#model-fitting-w
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>The accuracy using a Pipeline is 0.807 with a fitting time of 0.074 seconds in 9 iterations
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>The accuracy using a Pipeline is 0.807 with a fitting time of 0.057 seconds in 9 iterations
</pre></div>
</div>
</div>
Expand Down Expand Up @@ -2067,7 +2067,7 @@ <h2>Model fitting with preprocessing<a class="headerlink" href="#model-fitting-w
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>The accuracy using a LogisticRegression is 0.807 with a fitting time of 0.158 seconds in 60 iterations
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>The accuracy using a LogisticRegression is 0.807 with a fitting time of 0.128 seconds in 60 iterations
</pre></div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions python_scripts/03_categorical_pipeline.html
Original file line number Diff line number Diff line change
Expand Up @@ -1944,8 +1944,8 @@ <h2>Evaluate our predictive pipeline<a class="headerlink" href="#evaluate-our-pr
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>{&#39;fit_time&#39;: array([0.18781209, 0.17397404, 0.18133903, 0.18490911, 0.17868161]),
&#39;score_time&#39;: array([0.0243237 , 0.02378368, 0.02416205, 0.02540421, 0.02295303]),
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>{&#39;fit_time&#39;: array([0.18273258, 0.17200065, 0.17647791, 0.18191218, 0.16968513]),
&#39;score_time&#39;: array([0.02293396, 0.02304316, 0.02214861, 0.02400017, 0.02363253]),
&#39;test_score&#39;: array([0.83232675, 0.83570478, 0.82831695, 0.83292383, 0.83497133])}
</pre></div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions python_scripts/03_categorical_pipeline_column_transformer.html
Original file line number Diff line number Diff line change
Expand Up @@ -1480,8 +1480,8 @@ <h2>Evaluation of the model with cross-validation<a class="headerlink" href="#ev
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>{&#39;fit_time&#39;: array([0.26318002, 0.26783419, 0.23443294, 0.24915934, 0.2725606 ]),
&#39;score_time&#39;: array([0.02992344, 0.0289917 , 0.02811599, 0.02935672, 0.02843928]),
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>{&#39;fit_time&#39;: array([0.25529766, 0.26091695, 0.23097396, 0.24259877, 0.26471639]),
&#39;score_time&#39;: array([0.02783799, 0.0291338 , 0.02745199, 0.02845907, 0.02718282]),
&#39;test_score&#39;: array([0.85116184, 0.84993346, 0.8482801 , 0.85257985, 0.85544636])}
</pre></div>
</div>
Expand Down Expand Up @@ -1553,8 +1553,8 @@ <h2>Fitting a more powerful model<a class="headerlink" href="#fitting-a-more-pow
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>CPU times: user 691 ms, sys: 7.92 ms, total: 699 ms
Wall time: 698 ms
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>CPU times: user 688 ms, sys: 0 ns, total: 688 ms
Wall time: 687 ms
</pre></div>
</div>
</div>
Expand All @@ -1566,7 +1566,7 @@ <h2>Fitting a more powerful model<a class="headerlink" href="#fitting-a-more-pow
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>0.8805994595037262
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>0.881008926377856
</pre></div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion python_scripts/03_categorical_pipeline_ex_02.html
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ <h2>Reference pipeline (no numerical scaling and integer-coded categories)<a cla
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>The mean cross-validation accuracy is: 0.873 ± 0.002 with a fitting time of 4.393
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>The mean cross-validation accuracy is: 0.873 ± 0.003 with a fitting time of 4.275
</pre></div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions python_scripts/03_categorical_pipeline_sol_02.html
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ <h2>Reference pipeline (no numerical scaling and integer-coded categories)<a cla
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>The mean cross-validation accuracy is: 0.873 ± 0.003 with a fitting time of 4.379
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>The mean cross-validation accuracy is: 0.874 ± 0.002 with a fitting time of 4.267
</pre></div>
</div>
</div>
Expand Down Expand Up @@ -835,7 +835,7 @@ <h2>Scaling numerical features<a class="headerlink" href="#scaling-numerical-fea
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>The mean cross-validation accuracy is: 0.873 ± 0.002 with a fitting time of 4.416
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>The mean cross-validation accuracy is: 0.873 ± 0.002 with a fitting time of 4.277
</pre></div>
</div>
</div>
Expand Down Expand Up @@ -891,7 +891,7 @@ <h2>One-hot encoding of categorical variables<a class="headerlink" href="#one-ho
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>The mean cross-validation accuracy is: 0.873 ± 0.002 with a fitting time of 17.401
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>The mean cross-validation accuracy is: 0.873 ± 0.002 with a fitting time of 17.032
</pre></div>
</div>
</div>
Expand Down
76 changes: 38 additions & 38 deletions python_scripts/cross_validation_baseline.html
Original file line number Diff line number Diff line change
Expand Up @@ -743,13 +743,13 @@ <h1>Comparing model performance with a simple baseline<a class="headerlink" href
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>count 30.000000
mean 45.711788
std 1.191156
min 43.291196
25% 44.897219
50% 45.784888
75% 46.688555
max 48.157434
mean 45.633816
std 1.217253
min 43.164525
25% 44.863200
50% 45.826493
75% 46.525464
max 47.717535
Name: Decision tree regressor, dtype: float64
</pre></div>
</div>
Expand Down Expand Up @@ -826,152 +826,152 @@ <h1>Comparing model performance with a simple baseline<a class="headerlink" href
<tbody>
<tr>
<th>0</th>
<td>47.014650</td>
<td>46.314723</td>
<td>90.713153</td>
</tr>
<tr>
<th>1</th>
<td>46.995805</td>
<td>46.595711</td>
<td>90.539353</td>
</tr>
<tr>
<th>2</th>
<td>44.469734</td>
<td>44.224121</td>
<td>91.941912</td>
</tr>
<tr>
<th>3</th>
<td>43.439962</td>
<td>43.745801</td>
<td>90.213912</td>
</tr>
<tr>
<th>4</th>
<td>48.157434</td>
<td>47.610850</td>
<td>92.015862</td>
</tr>
<tr>
<th>5</th>
<td>45.057621</td>
<td>44.862297</td>
<td>90.542490</td>
</tr>
<tr>
<th>6</th>
<td>44.501008</td>
<td>43.805296</td>
<td>89.757566</td>
</tr>
<tr>
<th>7</th>
<td>44.865934</td>
<td>45.151203</td>
<td>92.477244</td>
</tr>
<tr>
<th>8</th>
<td>44.991075</td>
<td>45.123296</td>
<td>90.947952</td>
</tr>
<tr>
<th>9</th>
<td>44.816389</td>
<td>44.865907</td>
<td>91.991373</td>
</tr>
<tr>
<th>10</th>
<td>46.726934</td>
<td>46.926475</td>
<td>92.023571</td>
</tr>
<tr>
<th>11</th>
<td>46.017070</td>
<td>46.083784</td>
<td>90.556965</td>
</tr>
<tr>
<th>12</th>
<td>45.756531</td>
<td>45.482961</td>
<td>91.539567</td>
</tr>
<tr>
<th>13</th>
<td>45.652805</td>
<td>45.484250</td>
<td>91.185225</td>
</tr>
<tr>
<th>14</th>
<td>46.891755</td>
<td>47.208010</td>
<td>92.298971</td>
</tr>
<tr>
<th>15</th>
<td>44.549413</td>
<td>44.087635</td>
<td>91.084639</td>
</tr>
<tr>
<th>16</th>
<td>46.296850</td>
<td>45.902660</td>
<td>90.984471</td>
</tr>
<tr>
<th>17</th>
<td>47.169953</td>
<td>47.221503</td>
<td>89.981744</td>
</tr>
<tr>
<th>18</th>
<td>45.071770</td>
<td>44.656508</td>
<td>90.547140</td>
</tr>
<tr>
<th>19</th>
<td>46.774847</td>
<td>46.690062</td>
<td>89.820219</td>
</tr>
<tr>
<th>20</th>
<td>43.291196</td>
<td>43.164525</td>
<td>91.768721</td>
</tr>
<tr>
<th>21</th>
<td>45.929062</td>
<td>45.879401</td>
<td>92.305556</td>
</tr>
<tr>
<th>22</th>
<td>45.200743</td>
<td>45.949361</td>
<td>90.503017</td>
</tr>
<tr>
<th>23</th>
<td>46.573420</td>
<td>46.844423</td>
<td>92.147974</td>
</tr>
<tr>
<th>24</th>
<td>46.315741</td>
<td>46.232214</td>
<td>91.386320</td>
</tr>
<tr>
<th>25</th>
<td>45.813246</td>
<td>46.061211</td>
<td>90.815660</td>
</tr>
<tr>
<th>26</th>
<td>44.145274</td>
<td>43.905906</td>
<td>92.216574</td>
</tr>
<tr>
<th>27</th>
<td>45.934293</td>
<td>45.773585</td>
<td>90.107460</td>
</tr>
<tr>
<th>28</th>
<td>45.376586</td>
<td>45.443278</td>
<td>90.620318</td>
</tr>
<tr>
<th>29</th>
<td>47.556537</td>
<td>47.717535</td>
<td>91.165331</td>
</tr>
</tbody>
Expand All @@ -992,7 +992,7 @@ <h1>Comparing model performance with a simple baseline<a class="headerlink" href
</div>
</div>
<div class="cell_output docutils container">
<img alt="../_images/2236ffafb3d84298a3e76953ed976f5aa59c1513def0b4678e2be2ef95398f65.png" src="../_images/2236ffafb3d84298a3e76953ed976f5aa59c1513def0b4678e2be2ef95398f65.png" />
<img alt="../_images/2215c2947df1a3033fb856e7ab2bfbd3f1c67a7be63a0fc2cab89c409477bdf1.png" src="../_images/2215c2947df1a3033fb856e7ab2bfbd3f1c67a7be63a0fc2cab89c409477bdf1.png" />
</div>
</div>
<p>We see that the generalization performance of our decision tree is far from
Expand Down
6 changes: 3 additions & 3 deletions python_scripts/cross_validation_grouping.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ <h1>Sample grouping<a class="headerlink" href="#sample-grouping" title="Permalin
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>The average accuracy is 0.966 ± 0.005
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>The average accuracy is 0.964 ± 0.013
</pre></div>
</div>
</div>
Expand Down Expand Up @@ -787,7 +787,7 @@ <h1>Sample grouping<a class="headerlink" href="#sample-grouping" title="Permalin
</div>
</div>
<div class="cell_output docutils container">
<img alt="../_images/d38db5862a0786f769369e92914306b9e7aec5899b147928a1b0bf7298cea1db.png" src="../_images/d38db5862a0786f769369e92914306b9e7aec5899b147928a1b0bf7298cea1db.png" />
<img alt="../_images/c9d38595b97dfd00a5ba6c27b7a8607103748526a4172f15f1465f8212a45581.png" src="../_images/c9d38595b97dfd00a5ba6c27b7a8607103748526a4172f15f1465f8212a45581.png" />
</div>
</div>
<p>The cross-validation testing error that uses the shuffling has less variance
Expand Down Expand Up @@ -1014,7 +1014,7 @@ <h1>Sample grouping<a class="headerlink" href="#sample-grouping" title="Permalin
</div>
</div>
<div class="cell_output docutils container">
<img alt="../_images/c2258ca6c77f26957ff5f9b2ccbbb58571146c06a0a35b8599ca119ef3283712.png" src="../_images/c2258ca6c77f26957ff5f9b2ccbbb58571146c06a0a35b8599ca119ef3283712.png" />
<img alt="../_images/2ffadb284332abcf71e017907143072209c187b343d152879667f92f32ae4795.png" src="../_images/2ffadb284332abcf71e017907143072209c187b343d152879667f92f32ae4795.png" />
</div>
</div>
<p>As a conclusion, it is really important to take any sample grouping pattern
Expand Down
2 changes: 1 addition & 1 deletion python_scripts/cross_validation_learning_curve.html
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ <h2>Learning curve<a class="headerlink" href="#learning-curve" title="Permalink
</div>
</div>
<div class="cell_output docutils container">
<img alt="../_images/3486f06511af2fbdced698306aa18bdee4021a11317fce769cdd68e01d2886d8.png" src="../_images/3486f06511af2fbdced698306aa18bdee4021a11317fce769cdd68e01d2886d8.png" />
<img alt="../_images/7240f75198cd816379bb54aa36850803195e16868bf151570d55a03da3db9c5d.png" src="../_images/7240f75198cd816379bb54aa36850803195e16868bf151570d55a03da3db9c5d.png" />
</div>
</div>
<p>Looking at the training error alone, we see that we get an error of 0 k$. It
Expand Down
Loading

0 comments on commit 27f81a4

Please sign in to comment.