Skip to content

Commit

Permalink
rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorcampbell committed Jul 5, 2022
1 parent 40741b6 commit a54663b
Show file tree
Hide file tree
Showing 117 changed files with 197 additions and 190 deletions.
2 changes: 1 addition & 1 deletion docs/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<meta name="author" content="Tiffany Timbers, Trevor Campbell, and Melissa Lee Foreword by Roger Peng" />


<meta name="date" content="2022-03-02" />
<meta name="date" content="2022-07-05" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
8 changes: 4 additions & 4 deletions docs/Getting-started-with-version-control.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<meta name="author" content="Tiffany Timbers, Trevor Campbell, and Melissa Lee Foreword by Roger Peng" />


<meta name="date" content="2022-03-02" />
<meta name="date" content="2022-07-05" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down Expand Up @@ -739,7 +739,7 @@ <h3><span class="header-section-number">12.5.1</span> Committing changes to a lo
your work you should make sure to replace this with an
informative message about what changed. It is also important to note here that
these changes are only being committed to the local repository’s history. The
remote repository on GitHub has not changed, and collaborators would not yet be
remote repository on GitHub has not changed, and collaborators are not yet
able to see your new changes.</p>
<div class="figure" style="text-align: center"><span style="display:block;" id="fig:vc-ba3-commit"></span>
<img src="_main_files/figure-html/vc-ba3-commit-1.png" alt="Committing the modified files in the staging area to the local repository history, with an informative message about what changed." width="100%" />
Expand Down Expand Up @@ -1396,9 +1396,9 @@ <h3><span class="header-section-number">12.8.4</span> Communicating using GitHub
<p>Next click the “New issue” button (Figure <a href="Getting-started-with-version-control.html#fig:issue-02">12.51</a>).</p>

<div class="figure" style="text-align: center"><span style="display:block;" id="fig:issue-02"></span>
<img src="_main_files/figure-html/issue-02-1.png" alt="The “New issues” button on the GitHub web interface." width="100%" />
<img src="_main_files/figure-html/issue-02-1.png" alt="The “New issue” button on the GitHub web interface." width="100%" />
<p class="caption">
Figure 12.51: The “New issues” button on the GitHub web interface.
Figure 12.51: The “New issue” button on the GitHub web interface.
</p>
</div>
<p>Add an issue title (which acts like an email subject line), and then put the
Expand Down
Binary file modified docs/_main_files/figure-html/01-ref-vs-tibble-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/_main_files/figure-html/02-dataframe-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/_main_files/figure-html/02-obs-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/_main_files/figure-html/02-tidy-image-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/_main_files/figure-html/02-vec-vs-list-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/_main_files/figure-html/02-vector-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/_main_files/figure-html/02-vectors-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/_main_files/figure-html/03-ggplot-function-scatter-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/_main_files/figure-html/08-lm-multicol-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/_main_files/figure-html/activate-and-run-button-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/_main_files/figure-html/add-collab-01-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/_main_files/figure-html/add-collab-02-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/_main_files/figure-html/add-collab-03-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/_main_files/figure-html/add-collab-04-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/_main_files/figure-html/add-collab-05-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/_main_files/figure-html/barplot-mother-tongue-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/_main_files/figure-html/clone-01-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/_main_files/figure-html/clone-02-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/_main_files/figure-html/clone-03-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/_main_files/figure-html/clone-04-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/_main_files/figure-html/code-cell-not-run-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/_main_files/figure-html/code-cell-run-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/_main_files/figure-html/convert-to-markdown-cell-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/_main_files/figure-html/create-new-code-cell-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/_main_files/figure-html/create-new-file-01-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/_main_files/figure-html/create-new-file-02-1.png
Binary file modified docs/_main_files/figure-html/create-new-file-03-1.png
Binary file modified docs/_main_files/figure-html/generate-pat-01-1.png
Binary file modified docs/_main_files/figure-html/generate-pat-02-1.png
Binary file modified docs/_main_files/figure-html/generate-pat-03-1.png
Binary file modified docs/_main_files/figure-html/git-add-01-1.png
Binary file modified docs/_main_files/figure-html/git-add-02-1.png
Binary file modified docs/_main_files/figure-html/git-add-03-1.png
Binary file modified docs/_main_files/figure-html/git-commit-01-1.png
Binary file modified docs/_main_files/figure-html/git-commit-03-1.png
Binary file modified docs/_main_files/figure-html/git-pull-00-1.png
Binary file modified docs/_main_files/figure-html/git-pull-01-1.png
Binary file modified docs/_main_files/figure-html/git-pull-02-1.png
Binary file modified docs/_main_files/figure-html/git-pull-03-1.png
Binary file modified docs/_main_files/figure-html/git-pull-04-1.png
Binary file modified docs/_main_files/figure-html/git-push-01-1.png
Binary file modified docs/_main_files/figure-html/git-push-02-1.png
Binary file modified docs/_main_files/figure-html/git-push-03-1.png
Binary file modified docs/_main_files/figure-html/git-push-04-1.png
Binary file modified docs/_main_files/figure-html/img-arrange-1.png
Binary file modified docs/_main_files/figure-html/img-filter-1.png
Binary file modified docs/_main_files/figure-html/img-ggplot-1.png
Binary file modified docs/_main_files/figure-html/img-mutate-1.png
Binary file modified docs/_main_files/figure-html/img-pivot-longer-1.png
Binary file modified docs/_main_files/figure-html/img-pivot-wider-1.png
Binary file modified docs/_main_files/figure-html/img-read-csv-1.png
Binary file modified docs/_main_files/figure-html/img-select-1.png
Binary file modified docs/_main_files/figure-html/img-separate-1.png
Binary file modified docs/_main_files/figure-html/issue-01-1.png
Binary file modified docs/_main_files/figure-html/issue-02-1.png
Binary file modified docs/_main_files/figure-html/issue-03-1.png
Binary file modified docs/_main_files/figure-html/issue-04-1.png
Binary file modified docs/_main_files/figure-html/issue-06-1.png
Binary file modified docs/_main_files/figure-html/launcher-1.png
Binary file modified docs/_main_files/figure-html/markdown-cell-not-run-1.png
Binary file modified docs/_main_files/figure-html/markdown-cell-run-1.png
Binary file modified docs/_main_files/figure-html/merge-conflict-01-1.png
Binary file modified docs/_main_files/figure-html/merge-conflict-03-1.png
Binary file modified docs/_main_files/figure-html/merge-conflict-04-1.png
Binary file modified docs/_main_files/figure-html/merge-conflict-05-1.png
Binary file modified docs/_main_files/figure-html/merge-conflict-06-1.png
Binary file modified docs/_main_files/figure-html/mutate-across-1.png
Binary file modified docs/_main_files/figure-html/new-repository-01-1.png
Binary file modified docs/_main_files/figure-html/new-repository-02-1.png
Binary file modified docs/_main_files/figure-html/new-repository-03-1.png
Binary file modified docs/_main_files/figure-html/open-data-w-editor-1-1.png
Binary file modified docs/_main_files/figure-html/open-data-w-editor-2-1.png
Binary file modified docs/_main_files/figure-html/out-of-order-1-1.png
Binary file modified docs/_main_files/figure-html/out-of-order-2-1.png
Binary file modified docs/_main_files/figure-html/out-of-order-3-1.png
Binary file modified docs/_main_files/figure-html/pen-tool-01-1.png
Binary file modified docs/_main_files/figure-html/pen-tool-02-1.png
Binary file modified docs/_main_files/figure-html/pen-tool-03-1.png
Binary file modified docs/_main_files/figure-html/restart-kernel-run-all-1.png
Binary file modified docs/_main_files/figure-html/rowwise-1.png
Binary file modified docs/_main_files/figure-html/summarize-1.png
Binary file modified docs/_main_files/figure-html/summarize-across-1.png
Binary file modified docs/_main_files/figure-html/summarize-groupby-1.png
Binary file modified docs/_main_files/figure-html/upload-files-01-1.png
Binary file modified docs/_main_files/figure-html/upload-files-02-1.png
Binary file modified docs/_main_files/figure-html/vc-ba2-add-1.png
Binary file modified docs/_main_files/figure-html/vc-ba3-commit-1.png
Binary file modified docs/_main_files/figure-html/vc1-no-changes-1.png
Binary file modified docs/_main_files/figure-html/vc2-changes-1.png
Binary file modified docs/_main_files/figure-html/vc5-5-nachos-to-cheesecake-1.png
Binary file modified docs/_main_files/figure-html/vc5-push-1.png
Binary file modified docs/_main_files/figure-html/vc6-remote-changes-1.png
Binary file modified docs/_main_files/figure-html/vc7-pull-1.png
2 changes: 1 addition & 1 deletion docs/about-the-authors.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<meta name="author" content="Tiffany Timbers, Trevor Campbell, and Melissa Lee Foreword by Roger Peng" />


<meta name="date" content="2022-03-02" />
<meta name="date" content="2022-07-05" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
2 changes: 1 addition & 1 deletion docs/acknowledgments.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<meta name="author" content="Tiffany Timbers, Trevor Campbell, and Melissa Lee Foreword by Roger Peng" />


<meta name="date" content="2022-03-02" />
<meta name="date" content="2022-07-05" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
2 changes: 1 addition & 1 deletion docs/appendixA.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<meta name="author" content="Tiffany Timbers, Trevor Campbell, and Melissa Lee Foreword by Roger Peng" />


<meta name="date" content="2022-03-02" />
<meta name="date" content="2022-07-05" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
31 changes: 16 additions & 15 deletions docs/classification.html

Large diffs are not rendered by default.

35 changes: 17 additions & 18 deletions docs/classification2.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<meta name="author" content="Tiffany Timbers, Trevor Campbell, and Melissa Lee Foreword by Roger Peng" />


<meta name="date" content="2022-03-02" />
<meta name="date" content="2022-07-05" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down Expand Up @@ -623,7 +623,7 @@ <h2><span class="header-section-number">6.4</span> Randomness and seeds</h2>
The trick is that in R—and other programming languages—randomness
is not actually random! Instead, R uses a <em>random number generator</em> that
produces a sequence of numbers that
are completely determined by a
are completely determined by a
<em>seed value</em>. Once you set the seed value
using the <code>set.seed</code> function, everything after that point may <em>look</em> random,
but is actually totally reproducible. As long as you pick the same seed
Expand All @@ -634,27 +634,27 @@ <h2><span class="header-section-number">6.4</span> Randomness and seeds</h2>
we call <code>set.seed</code>, and pass it any integer as an argument.
Here, we pass in the number <code>1</code>.</p>
<div class="sourceCode" id="cb300"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb300-1"><a href="classification2.html#cb300-1" aria-hidden="true" tabindex="-1"></a><span class="fu">set.seed</span>(<span class="dv">1</span>)</span>
<span id="cb300-2"><a href="classification2.html#cb300-2" aria-hidden="true" tabindex="-1"></a>random_numbers <span class="ot">&lt;-</span> <span class="fu">sample</span>(<span class="dv">0</span><span class="sc">:</span><span class="dv">9</span>, <span class="dv">10</span>, <span class="at">replace=</span><span class="cn">TRUE</span>)</span>
<span id="cb300-3"><a href="classification2.html#cb300-3" aria-hidden="true" tabindex="-1"></a>random_numbers</span></code></pre></div>
<span id="cb300-2"><a href="classification2.html#cb300-2" aria-hidden="true" tabindex="-1"></a>random_numbers1 <span class="ot">&lt;-</span> <span class="fu">sample</span>(<span class="dv">0</span><span class="sc">:</span><span class="dv">9</span>, <span class="dv">10</span>, <span class="at">replace=</span><span class="cn">TRUE</span>)</span>
<span id="cb300-3"><a href="classification2.html#cb300-3" aria-hidden="true" tabindex="-1"></a>random_numbers1</span></code></pre></div>
<pre><code>## [1] 8 3 6 0 1 6 1 2 0 4</code></pre>
<p>You can see that <code>random_numbers</code> is a list of 10 numbers
<p>You can see that <code>random_numbers1</code> is a list of 10 numbers
from 0 to 9 that, from all appearances, looks random. If
we run the <code>sample</code> function again, we will
get a fresh batch of 10 numbers that also look random.</p>
<div class="sourceCode" id="cb302"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb302-1"><a href="classification2.html#cb302-1" aria-hidden="true" tabindex="-1"></a>random_numbers <span class="ot">&lt;-</span> <span class="fu">sample</span>(<span class="dv">0</span><span class="sc">:</span><span class="dv">9</span>, <span class="dv">10</span>, <span class="at">replace=</span><span class="cn">TRUE</span>)</span>
<span id="cb302-2"><a href="classification2.html#cb302-2" aria-hidden="true" tabindex="-1"></a>random_numbers</span></code></pre></div>
<div class="sourceCode" id="cb302"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb302-1"><a href="classification2.html#cb302-1" aria-hidden="true" tabindex="-1"></a>random_numbers2 <span class="ot">&lt;-</span> <span class="fu">sample</span>(<span class="dv">0</span><span class="sc">:</span><span class="dv">9</span>, <span class="dv">10</span>, <span class="at">replace=</span><span class="cn">TRUE</span>)</span>
<span id="cb302-2"><a href="classification2.html#cb302-2" aria-hidden="true" tabindex="-1"></a>random_numbers2</span></code></pre></div>
<pre><code>## [1] 4 9 5 9 6 8 4 4 8 8</code></pre>
<p>If we want to force R to produce the same sequences of random numbers,
we can simply call the <code>set.seed</code> function again with the same argument
value.</p>
<div class="sourceCode" id="cb304"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb304-1"><a href="classification2.html#cb304-1" aria-hidden="true" tabindex="-1"></a><span class="fu">set.seed</span>(<span class="dv">1</span>)</span>
<span id="cb304-2"><a href="classification2.html#cb304-2" aria-hidden="true" tabindex="-1"></a>random_numbers <span class="ot">&lt;-</span> <span class="fu">sample</span>(<span class="dv">0</span><span class="sc">:</span><span class="dv">9</span>, <span class="dv">10</span>, <span class="at">replace=</span><span class="cn">TRUE</span>)</span>
<span id="cb304-3"><a href="classification2.html#cb304-3" aria-hidden="true" tabindex="-1"></a>random_numbers</span></code></pre></div>
<span id="cb304-2"><a href="classification2.html#cb304-2" aria-hidden="true" tabindex="-1"></a>random_numbers1_again <span class="ot">&lt;-</span> <span class="fu">sample</span>(<span class="dv">0</span><span class="sc">:</span><span class="dv">9</span>, <span class="dv">10</span>, <span class="at">replace=</span><span class="cn">TRUE</span>)</span>
<span id="cb304-3"><a href="classification2.html#cb304-3" aria-hidden="true" tabindex="-1"></a>random_numbers1_again</span></code></pre></div>
<pre><code>## [1] 8 3 6 0 1 6 1 2 0 4</code></pre>
<div class="sourceCode" id="cb306"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb306-1"><a href="classification2.html#cb306-1" aria-hidden="true" tabindex="-1"></a>random_numbers <span class="ot">&lt;-</span> <span class="fu">sample</span>(<span class="dv">0</span><span class="sc">:</span><span class="dv">9</span>, <span class="dv">10</span>, <span class="at">replace=</span><span class="cn">TRUE</span>)</span>
<span id="cb306-2"><a href="classification2.html#cb306-2" aria-hidden="true" tabindex="-1"></a>random_numbers</span></code></pre></div>
<div class="sourceCode" id="cb306"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb306-1"><a href="classification2.html#cb306-1" aria-hidden="true" tabindex="-1"></a>random_numbers2_again <span class="ot">&lt;-</span> <span class="fu">sample</span>(<span class="dv">0</span><span class="sc">:</span><span class="dv">9</span>, <span class="dv">10</span>, <span class="at">replace=</span><span class="cn">TRUE</span>)</span>
<span id="cb306-2"><a href="classification2.html#cb306-2" aria-hidden="true" tabindex="-1"></a>random_numbers2_again</span></code></pre></div>
<pre><code>## [1] 4 9 5 9 6 8 4 4 8 8</code></pre>
<p>And if we choose
<p>Notice that after setting the seed, we get the same two sequences of numbers in the same order. <code>random_numbers1</code> and <code>random_numbers1_again</code> produce the same sequence of numbers, and the same can be said about <code>random_numbers2</code> and <code>random_numbers2_again</code>. And if we choose
a different value for the seed—say, 4235—we
obtain a different sequence of random numbers.</p>
<div class="sourceCode" id="cb308"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb308-1"><a href="classification2.html#cb308-1" aria-hidden="true" tabindex="-1"></a><span class="fu">set.seed</span>(<span class="dv">4235</span>)</span>
Expand Down Expand Up @@ -822,7 +822,7 @@ <h3><span class="header-section-number">6.5.2</span> Preprocess the data</h3>
our test data does not influence any aspect of our model training. Once we have
created the standardization preprocessor, we can then apply it separately to both the
training and test data sets.</p>
<p>Fortunately, the <code>recipe</code> framework from <code>tidymodels</code> helps us handle
<p>Fortunately, the <code>recipe</code> framework from <code>tidymodels</code> helps us handle
this properly. Below we construct and prepare the recipe using only the training
data (due to <code>data = cancer_train</code> in the first line).</p>
<div class="sourceCode" id="cb320"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb320-1"><a href="classification2.html#cb320-1" aria-hidden="true" tabindex="-1"></a>cancer_recipe <span class="ot">&lt;-</span> <span class="fu">recipe</span>(Class <span class="sc">~</span> Smoothness <span class="sc">+</span> Concavity, <span class="at">data =</span> cancer_train) <span class="sc">|&gt;</span></span>
Expand Down Expand Up @@ -918,8 +918,7 @@ <h3><span class="header-section-number">6.5.5</span> Compute the accuracy</h3>
the table of predicted labels and correct labels, using the <code>conf_mat</code> function:</p>
<div class="sourceCode" id="cb327"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb327-1"><a href="classification2.html#cb327-1" aria-hidden="true" tabindex="-1"></a>confusion <span class="ot">&lt;-</span> cancer_test_predictions <span class="sc">|&gt;</span></span>
<span id="cb327-2"><a href="classification2.html#cb327-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">conf_mat</span>(<span class="at">truth =</span> Class, <span class="at">estimate =</span> .pred_class)</span>
<span id="cb327-3"><a href="classification2.html#cb327-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb327-4"><a href="classification2.html#cb327-4" aria-hidden="true" tabindex="-1"></a>confusion</span></code></pre></div>
<span id="cb327-3"><a href="classification2.html#cb327-3" aria-hidden="true" tabindex="-1"></a>confusion</span></code></pre></div>
<pre><code>## Truth
## Prediction M B
## M 39 6
Expand Down Expand Up @@ -991,7 +990,7 @@ <h3><span class="header-section-number">6.5.6</span> Critically analyze performa
<div id="tuning-the-classifier" class="section level2" number="6.6">
<h2><span class="header-section-number">6.6</span> Tuning the classifier</h2>
<p>The vast majority of predictive models in statistics and machine learning have
<em>parameters</em>. A <em>parameter</em>
<em>parameters</em>. A <em>parameter</em>
is a number you have to pick in advance that determines
some aspect of how the model behaves. For example, in the <span class="math inline">\(K\)</span>-nearest neighbors
classification algorithm, <span class="math inline">\(K\)</span> is a parameter that we have to pick
Expand Down Expand Up @@ -1107,7 +1106,7 @@ <h3><span class="header-section-number">6.6.1</span> Cross-validation</h3>
## 3 &lt;split [341/85]&gt; Fold3
## 4 &lt;split [341/85]&gt; Fold4
## 5 &lt;split [342/84]&gt; Fold5</code></pre>
<p>Then, when we create our data analysis workflow, we use the <code>fit_resamples</code> function
<p>Then, when we create our data analysis workflow, we use the <code>fit_resamples</code> function
instead of the <code>fit</code> function for training. This runs cross-validation on each
train/validation split.</p>
<div class="sourceCode" id="cb335"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb335-1"><a href="classification2.html#cb335-1" aria-hidden="true" tabindex="-1"></a><span class="co"># recreate the standardization recipe from before </span></span>
Expand All @@ -1134,7 +1133,7 @@ <h3><span class="header-section-number">6.6.1</span> Cross-validation</h3>
## 3 &lt;split [341/85]&gt; Fold3 &lt;tibble [2 × 4]&gt; &lt;tibble [0 × 1]&gt;
## 4 &lt;split [341/85]&gt; Fold4 &lt;tibble [2 × 4]&gt; &lt;tibble [0 × 1]&gt;
## 5 &lt;split [342/84]&gt; Fold5 &lt;tibble [2 × 4]&gt; &lt;tibble [0 × 1]&gt;</code></pre>
<p>The <code>collect_metrics</code> function is used to aggregate the <em>mean</em> and <em>standard error</em>
<p>The <code>collect_metrics</code> function is used to aggregate the <em>mean</em> and <em>standard error</em>
of the classifier’s validation accuracy across the folds. You will find results
related to the accuracy in the row with <code>accuracy</code> listed under the <code>.metric</code> column.
You should consider the mean (<code>mean</code>) to be the estimated accuracy, while the standard
Expand Down
Loading

0 comments on commit a54663b

Please sign in to comment.