Skip to content

Commit

Permalink
deploy: 45c1384
Browse files Browse the repository at this point in the history
  • Loading branch information
brownsarahm committed Oct 25, 2024
1 parent ae2a5b0 commit 01020d4
Show file tree
Hide file tree
Showing 23 changed files with 170 additions and 169 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.
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.
5 changes: 3 additions & 2 deletions _sources/notes/2024-10-17.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ X_train, X_test, y_train, y_test = train_test_split(iris_df[feature_vars],
This function returns multiple values, the docs say that it returns [twice as many](https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html#:~:text=splittinglist%2C%20length%3D2%20*%20len(arrays)) as it is passed. We passed two separate things, the features and the labels separated, so we get train and test each for both.

```{note}
If you get different numbers fort the index than I do here or run the train test split multipe times and see things change, you have a different ranomd seed above.
If you get different numbers for the index than I do here or run the train test split multipe times and see things change, you have a different ranomd seed above.
```

```{code-cell} ipython3
Expand Down Expand Up @@ -298,7 +298,8 @@ Gaussian Naive Bayes is a very simple model, but it is a {term}`generative` mode

```{code-cell} ipython3
N = 20
gnb_df = pd.DataFrame(np.concatenate([np.random.multivariate_normal(th, sig*np.eye(4),N)
n_features = len(feature_vars)
gnb_df = pd.DataFrame(np.concatenate([np.random.multivariate_normal(th, sig*np.eye(n_features),N)
for th, sig in zip(gnb.theta_,gnb.var_)]),
columns = gnb.feature_names_in_)
gnb_df['species'] = [ci for cl in [[c]*N for c in gnb.classes_] for ci in cl]
Expand Down
Binary file modified coursemanual.pdf
Binary file not shown.
146 changes: 73 additions & 73 deletions notes/2024-09-17.html
Original file line number Diff line number Diff line change
Expand Up @@ -656,54 +656,54 @@ <h3><span class="section-number">4.1.1. </span>Summarizing and Visualizing Data
</thead>
<tbody>
<tr>
<th>6725</th>
<td>2012</td>
<td>North American Coal</td>
<td>Investor-owned Company</td>
<td>Lignite Coal</td>
<td>25.764311</td>
<th>6827</th>
<td>1995</td>
<td>North Korea</td>
<td>Nation State</td>
<td>Anthracite Coal</td>
<td>13.221050</td>
<td>Million tonnes/yr</td>
<td>34.503826</td>
<td>38.574888</td>
</tr>
<tr>
<th>2795</th>
<td>1932</td>
<td>ConocoPhillips</td>
<th>1591</th>
<td>2018</td>
<td>Canadian Natural Resources</td>
<td>Investor-owned Company</td>
<td>Oil &amp; NGL</td>
<td>27.595849</td>
<td>299.665000</td>
<td>Million bbl/yr</td>
<td>11.004615</td>
<td>119.499778</td>
</tr>
<tr>
<th>8795</th>
<td>1969</td>
<th>1166</th>
<td>2009</td>
<td>BHP</td>
<td>Investor-owned Company</td>
<td>Metallurgical Coal</td>
<td>36.416000</td>
<td>Million tonnes/yr</td>
<td>108.032327</td>
</tr>
<tr>
<th>9007</th>
<td>2015</td>
<td>Poland</td>
<td>Nation State</td>
<td>Lignite Coal</td>
<td>76.837868</td>
<td>Metallurgical Coal</td>
<td>12.985117</td>
<td>Million tonnes/yr</td>
<td>102.902050</td>
<td>38.521870</td>
</tr>
<tr>
<th>4332</th>
<td>1931</td>
<td>ExxonMobil</td>
<th>11088</th>
<td>1999</td>
<td>Suncor Energy</td>
<td>Investor-owned Company</td>
<td>Natural Gas</td>
<td>124.810560</td>
<td>393.800000</td>
<td>Bcf/yr</td>
<td>9.097490</td>
</tr>
<tr>
<th>4230</th>
<td>2011</td>
<td>Exxaro Resources Ltd</td>
<td>Investor-owned Company</td>
<td>Metallurgical Coal</td>
<td>4.503228</td>
<td>Million tonnes/yr</td>
<td>13.359353</td>
<td>28.704236</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -1100,59 +1100,59 @@ <h3><span class="section-number">4.5.4. </span>How a column is added<a class="he
</thead>
<tbody>
<tr>
<th>3341</th>
<td>2017</td>
<td>CRH</td>
<td>Investor-owned Company</td>
<td>Cement</td>
<td>21.400000</td>
<td>Million Tonnes CO2</td>
<td>14.889350</td>
<td>Cement</td>
<th>8908</th>
<td>1996</td>
<td>Poland</td>
<td>Nation State</td>
<td>Lignite Coal</td>
<td>63.845576</td>
<td>Million tonnes/yr</td>
<td>85.502641</td>
<td>Coal</td>
</tr>
<tr>
<th>1700</th>
<td>2021</td>
<td>Cenovus Energy</td>
<th>4276</th>
<td>1903</td>
<td>ExxonMobil</td>
<td>Investor-owned Company</td>
<td>Oil &amp; NGL</td>
<td>234.439500</td>
<td>Million bbl/yr</td>
<td>93.489291</td>
<td>Oil &amp; NGL</td>
<td>Natural Gas</td>
<td>17.322720</td>
<td>Bcf/yr</td>
<td>1.262660</td>
<td>Natural Gas</td>
</tr>
<tr>
<th>12217</th>
<td>1976</td>
<td>Westmoreland Mining</td>
<td>Investor-owned Company</td>
<td>Sub-Bituminous Coal</td>
<td>4.768391</td>
<td>Million tonnes/yr</td>
<td>9.627813</td>
<td>Coal</td>
<th>8412</th>
<td>1992</td>
<td>Petroleum Development Oman</td>
<td>State-owned Entity</td>
<td>Natural Gas</td>
<td>145.655315</td>
<td>Bcf/yr</td>
<td>10.616873</td>
<td>Natural Gas</td>
</tr>
<tr>
<th>9739</th>
<td>2009</td>
<td>RWE</td>
<th>4248</th>
<td>2020</td>
<td>Exxaro Resources Ltd</td>
<td>Investor-owned Company</td>
<td>Lignite Coal</td>
<td>92.300000</td>
<td>Metallurgical Coal</td>
<td>5.331660</td>
<td>Million tonnes/yr</td>
<td>123.609094</td>
<td>15.816993</td>
<td>Coal</td>
</tr>
<tr>
<th>2955</th>
<td>2012</td>
<td>ConocoPhillips</td>
<td>Investor-owned Company</td>
<td>Oil &amp; NGL</td>
<td>334.774000</td>
<td>Million bbl/yr</td>
<td>133.500472</td>
<td>Oil &amp; NGL</td>
<th>9694</th>
<td>2022</td>
<td>Russian Federation</td>
<td>Nation State</td>
<td>Metallurgical Coal</td>
<td>98.936523</td>
<td>Million tonnes/yr</td>
<td>293.506779</td>
<td>Coal</td>
</tr>
</tbody>
</table>
Expand Down
18 changes: 9 additions & 9 deletions notes/2024-09-19.html
Original file line number Diff line number Diff line change
Expand Up @@ -697,10 +697,10 @@ <h2><span class="section-number">5.8. </span>Emissions by type<a class="headerli
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;seaborn.axisgrid.FacetGrid at 0x7f7f44d59580&gt;
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;seaborn.axisgrid.FacetGrid at 0x7fc6d46e3a30&gt;
</pre></div>
</div>
<img alt="../_images/9ed7bca22165368840adb5e50c3342959137200e3418dd93524edf46f12d011f.png" src="../_images/9ed7bca22165368840adb5e50c3342959137200e3418dd93524edf46f12d011f.png" />
<img alt="../_images/d85b0dfc69d388eb167bf2ddd3053528d3d2e7630935a635d2fc154ec9b50bcf.png" src="../_images/d85b0dfc69d388eb167bf2ddd3053528d3d2e7630935a635d2fc154ec9b50bcf.png" />
</div>
</div>
<div class="cell docutils container">
Expand All @@ -710,10 +710,10 @@ <h2><span class="section-number">5.8. </span>Emissions by type<a class="headerli
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;seaborn.axisgrid.FacetGrid at 0x7f7f44d593d0&gt;
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;seaborn.axisgrid.FacetGrid at 0x7fc7185a3cd0&gt;
</pre></div>
</div>
<img alt="../_images/d8553f1d1cb1cbdb7ac575fa6ef38ab4502f8e9a982a9003631f52ccba63eff3.png" src="../_images/d8553f1d1cb1cbdb7ac575fa6ef38ab4502f8e9a982a9003631f52ccba63eff3.png" />
<img alt="../_images/59d15a747a6b613ac8f5843eb2f2006a0b86e321f4307ec4a3e64d1f3ecfd5cd.png" src="../_images/59d15a747a6b613ac8f5843eb2f2006a0b86e321f4307ec4a3e64d1f3ecfd5cd.png" />
</div>
</div>
<div class="cell docutils container">
Expand All @@ -724,10 +724,10 @@ <h2><span class="section-number">5.8. </span>Emissions by type<a class="headerli
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;seaborn.axisgrid.FacetGrid at 0x7f7f42906d90&gt;
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;seaborn.axisgrid.FacetGrid at 0x7fc6d44d86d0&gt;
</pre></div>
</div>
<img alt="../_images/010d89ff8bd6ef5ec37c57872f951edeab870c1bf9709c68e5cc6dcc64672b8b.png" src="../_images/010d89ff8bd6ef5ec37c57872f951edeab870c1bf9709c68e5cc6dcc64672b8b.png" />
<img alt="../_images/fce62066c3db9c53cd03287e1243409b03943763f2514dc0162427b085ecc165.png" src="../_images/fce62066c3db9c53cd03287e1243409b03943763f2514dc0162427b085ecc165.png" />
</div>
</div>
<div class="cell docutils container">
Expand All @@ -738,10 +738,10 @@ <h2><span class="section-number">5.8. </span>Emissions by type<a class="headerli
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;seaborn.axisgrid.FacetGrid at 0x7f7f44e66580&gt;
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;seaborn.axisgrid.FacetGrid at 0x7fc6d2096490&gt;
</pre></div>
</div>
<img alt="../_images/efa5e892f653cd8ae3c68af7d322cfa8e68f349a3b3661283fda277c7fc46ae9.png" src="../_images/efa5e892f653cd8ae3c68af7d322cfa8e68f349a3b3661283fda277c7fc46ae9.png" />
<img alt="../_images/825221cc653ab068a4c8df4ff9faca5d5a5896f224f37f8ead8dbdcd24d00e86.png" src="../_images/825221cc653ab068a4c8df4ff9faca5d5a5896f224f37f8ead8dbdcd24d00e86.png" />
</div>
</div>
<p>Example okay questions:</p>
Expand All @@ -764,7 +764,7 @@ <h2><span class="section-number">5.9. </span>Emissions over time?<a class="heade
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;seaborn.axisgrid.FacetGrid at 0x7f7f422b6ca0&gt;
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;seaborn.axisgrid.FacetGrid at 0x7fc6d2106ee0&gt;
</pre></div>
</div>
<img alt="../_images/ec4bdfdbb84e45f3ba73c0394aa651e29c627e83aa50e02df833dab1767490c9.png" src="../_images/ec4bdfdbb84e45f3ba73c0394aa651e29c627e83aa50e02df833dab1767490c9.png" />
Expand Down
2 changes: 1 addition & 1 deletion notes/2024-09-24.html
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,7 @@ <h1><span class="section-number">7. </span>Transforming the Coffee data<a class=
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;seaborn.axisgrid.FacetGrid at 0x7fcbb7e89ee0&gt;
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;seaborn.axisgrid.FacetGrid at 0x7fed404ae2e0&gt;
</pre></div>
</div>
<img alt="../_images/676006e745ab971e76123035435acc4fbdf1dc410f310127d29f6d6b7e4efb05.png" src="../_images/676006e745ab971e76123035435acc4fbdf1dc410f310127d29f6d6b7e4efb05.png" />
Expand Down
20 changes: 10 additions & 10 deletions notes/2024-09-26.html
Original file line number Diff line number Diff line change
Expand Up @@ -1920,16 +1920,16 @@ <h2><span class="section-number">8.7. </span>Combining parts of dataframes<a cla
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>341 (-1.062, 354.0]
94 (354.0, 708.0]
1097 (-1.062, 354.0]
1212 (-1.062, 354.0]
745 (-1.062, 354.0]
244 (-1.062, 354.0]
636 (-1.062, 354.0]
653 (-1.062, 354.0]
850 (-1.062, 354.0]
442 (-1.062, 354.0]
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>256 (-1.062, 354.0]
414 (-1.062, 354.0]
1052 (-1.062, 354.0]
1148 (-1.062, 354.0]
836 (-1.062, 354.0]
662 (-1.062, 354.0]
1200 (-1.062, 354.0]
419 (-1.062, 354.0]
1124 (-1.062, 354.0]
178 (354.0, 708.0]
Name: Number.of.Bags, dtype: category
Categories (3, interval[float64, right]): [(-1.062, 354.0] &lt; (354.0, 708.0] &lt; (708.0, 1062.0]]
</pre></div>
Expand Down
4 changes: 2 additions & 2 deletions notes/2024-10-03.html
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ <h3><span class="section-number">10.2.2. </span>Accessing a Database from Python
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>(&#39;nba1819.db&#39;, &lt;http.client.HTTPMessage at 0x7fd6e2c69400&gt;)
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>(&#39;nba1819.db&#39;, &lt;http.client.HTTPMessage at 0x7f9ee829fd30&gt;)
</pre></div>
</div>
</div>
Expand All @@ -1095,7 +1095,7 @@ <h3><span class="section-number">10.2.2. </span>Accessing a Database from Python
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;sqlite3.Cursor at 0x7fd6e2c4ace0&gt;
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;sqlite3.Cursor at 0x7f9ee827fd50&gt;
</pre></div>
</div>
</div>
Expand Down
Loading

0 comments on commit 01020d4

Please sign in to comment.