Skip to content

Commit

Permalink
fixing sql 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ishani07 committed Apr 12, 2024
1 parent b4953c4 commit 6ec9844
Show file tree
Hide file tree
Showing 19 changed files with 1,339 additions and 4,899 deletions.
16 changes: 8 additions & 8 deletions docs/gradient_descent/gradient_descent.html

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<meta name="author" content="Bella Crouch">
<meta name="author" content="Yash Dave">
<meta name="author" content="Ian Dong">
<meta name="author" content="Kanu Grover">
<meta name="author" content="Ishani Gupta">
<meta name="author" content="Sakshi Kolli">
Expand Down Expand Up @@ -294,6 +295,7 @@ <h1 class="title">Principles and Techniques of Data Science</h1>
<div class="quarto-title-meta-contents">
<p>Bella Crouch </p>
<p>Yash Dave </p>
<p>Ian Dong </p>
<p>Kanu Grover </p>
<p>Ishani Gupta </p>
<p>Sakshi Kolli </p>
Expand Down
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.
72 changes: 36 additions & 36 deletions docs/pandas_2/pandas_2.html
Original file line number Diff line number Diff line change
Expand Up @@ -1668,12 +1668,12 @@ <h3 data-number="3.3.4" class="anchored" data-anchor-id="sample"><span class="he
</thead>
<tbody>
<tr class="odd">
<td data-quarto-table-cell-role="th">79462</td>
<td data-quarto-table-cell-role="th">331926</td>
<td>CA</td>
<td>F</td>
<td>1978</td>
<td>Rosalind</td>
<td>13</td>
<td>M</td>
<td>1995</td>
<td>Kohl</td>
<td>7</td>
</tr>
</tbody>
</table>
Expand All @@ -1700,34 +1700,34 @@ <h3 data-number="3.3.4" class="anchored" data-anchor-id="sample"><span class="he
</thead>
<tbody>
<tr class="odd">
<td data-quarto-table-cell-role="th">160002</td>
<td>2002</td>
<td>Brieana</td>
<td data-quarto-table-cell-role="th">51257</td>
<td>1964</td>
<td>Tonie</td>
<td>5</td>
</tr>
<tr class="even">
<td data-quarto-table-cell-role="th">81577</td>
<td>1979</td>
<td>Lucinda</td>
<td>21</td>
<td data-quarto-table-cell-role="th">137876</td>
<td>1996</td>
<td>Saki</td>
<td>6</td>
</tr>
<tr class="odd">
<td data-quarto-table-cell-role="th">98007</td>
<td>1985</td>
<td>Tammie</td>
<td>15</td>
<td data-quarto-table-cell-role="th">366718</td>
<td>2008</td>
<td>Keita</td>
<td>5</td>
</tr>
<tr class="even">
<td data-quarto-table-cell-role="th">267649</td>
<td>1956</td>
<td>Debra</td>
<td>11</td>
<td data-quarto-table-cell-role="th">369863</td>
<td>2010</td>
<td>Carlos</td>
<td>1133</td>
</tr>
<tr class="odd">
<td data-quarto-table-cell-role="th">316403</td>
<td>1989</td>
<td>Esai</td>
<td>9</td>
<td data-quarto-table-cell-role="th">403962</td>
<td>2021</td>
<td>Heber</td>
<td>6</td>
</tr>
</tbody>
</table>
Expand All @@ -1753,28 +1753,28 @@ <h3 data-number="3.3.4" class="anchored" data-anchor-id="sample"><span class="he
</thead>
<tbody>
<tr class="odd">
<td data-quarto-table-cell-role="th">152740</td>
<td data-quarto-table-cell-role="th">150028</td>
<td>2000</td>
<td>Shaniya</td>
<td>5</td>
<td>Mara</td>
<td>31</td>
</tr>
<tr class="even">
<td data-quarto-table-cell-role="th">152430</td>
<td data-quarto-table-cell-role="th">151231</td>
<td>2000</td>
<td>Diva</td>
<td>5</td>
<td>Alexcia</td>
<td>9</td>
</tr>
<tr class="odd">
<td data-quarto-table-cell-role="th">344434</td>
<td data-quarto-table-cell-role="th">149360</td>
<td>2000</td>
<td>Eriq</td>
<td>6</td>
<td>Sarai</td>
<td>146</td>
</tr>
<tr class="even">
<td data-quarto-table-cell-role="th">342872</td>
<td data-quarto-table-cell-role="th">343226</td>
<td>2000</td>
<td>Justice</td>
<td>65</td>
<td>Kurtis</td>
<td>24</td>
</tr>
</tbody>
</table>
Expand Down
14 changes: 7 additions & 7 deletions docs/pandas_3/pandas_3.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/regex/regex.html
Original file line number Diff line number Diff line change
Expand Up @@ -704,11 +704,11 @@ <h4 data-number="6.2.1.2" class="anchored" data-anchor-id="canonicalization-with
<span id="cb6-13"><a href="#cb6-13" aria-hidden="true" tabindex="-1"></a>county_and_state[<span class="st">'clean_county_pandas'</span>] <span class="op">=</span> canonicalize_county_series(county_and_state[<span class="st">'County'</span>])</span>
<span id="cb6-14"><a href="#cb6-14" aria-hidden="true" tabindex="-1"></a>display(county_and_pop), display(county_and_state)<span class="op">;</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stderr">
<pre><code>/var/folders/7t/zbwy02ts2m7cn64fvwjqb8xw0000gp/T/ipykernel_49409/2523629438.py:3: FutureWarning:
<pre><code>/var/folders/7t/zbwy02ts2m7cn64fvwjqb8xw0000gp/T/ipykernel_61725/2523629438.py:3: FutureWarning:

The default value of regex will change from True to False in a future version. In addition, single character regular expressions will *not* be treated as literal strings when regex=True.

/var/folders/7t/zbwy02ts2m7cn64fvwjqb8xw0000gp/T/ipykernel_49409/2523629438.py:3: FutureWarning:
/var/folders/7t/zbwy02ts2m7cn64fvwjqb8xw0000gp/T/ipykernel_61725/2523629438.py:3: FutureWarning:

The default value of regex will change from True to False in a future version. In addition, single character regular expressions will *not* be treated as literal strings when regex=True.
</code></pre>
Expand Down
6 changes: 3 additions & 3 deletions docs/sampling/sampling.html
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ <h4 data-number="9.3.3.3" class="anchored" data-anchor-id="simple-random-sample"
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a>random_sample <span class="op">=</span> movie.sample(n, replace <span class="op">=</span> <span class="va">False</span>) <span class="co">## By default, replace = False</span></span>
<span id="cb13-3"><a href="#cb13-3" aria-hidden="true" tabindex="-1"></a>np.mean(random_sample[<span class="st">"barbie"</span>])</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-display" data-execution_count="9">
<pre><code>0.5311745261494285</code></pre>
<pre><code>0.5301227615221094</code></pre>
</div>
</div>
<p>This is very close to the actual vote of 0.5302792307692308!</p>
Expand All @@ -740,7 +740,7 @@ <h4 data-number="9.3.3.3" class="anchored" data-anchor-id="simple-random-sample"
<span id="cb15-10"><a href="#cb15-10" aria-hidden="true" tabindex="-1"></a>Markdown(<span class="ss">f"**Actual** = </span><span class="sc">{</span>actual_barbie<span class="sc">:.4f}</span><span class="ss">, **Sample** = </span><span class="sc">{</span>sample_barbie<span class="sc">:.4f}</span><span class="ss">, "</span></span>
<span id="cb15-11"><a href="#cb15-11" aria-hidden="true" tabindex="-1"></a> <span class="ss">f"**Err** = </span><span class="sc">{</span><span class="dv">100</span><span class="op">*</span>err<span class="sc">:.2f}</span><span class="ss">%."</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-display" data-execution_count="10">
<p><strong>Actual</strong> = 0.5303, <strong>Sample</strong> = 0.5450, <strong>Err</strong> = 2.78%.</p>
<p><strong>Actual</strong> = 0.5303, <strong>Sample</strong> = 0.5225, <strong>Err</strong> = 1.47%.</p>
</div>
</div>
<p>We’ll learn how to choose this number when we (re)learn the Central Limit Theorem later in the semester.</p>
Expand Down Expand Up @@ -773,7 +773,7 @@ <h4 data-number="9.3.3.4" class="anchored" data-anchor-id="quantifying-chance-er
<div class="sourceCode cell-code" id="cb18"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a>poll_result <span class="op">=</span> pd.Series(poll_result)</span>
<span id="cb18-2"><a href="#cb18-2" aria-hidden="true" tabindex="-1"></a>np.<span class="bu">sum</span>(poll_result <span class="op">&gt;</span> <span class="fl">0.5</span>)<span class="op">/</span><span class="dv">1000</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-display" data-execution_count="13">
<pre><code>0.956</code></pre>
<pre><code>0.936</code></pre>
</div>
</div>
<p>You can see the curve looks roughly Gaussian/normal. Using KDE:</p>
Expand Down
Binary file modified docs/sampling/sampling_files/figure-html/cell-13-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sampling/sampling_files/figure-html/cell-15-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6ec9844

Please sign in to comment.