Skip to content

Commit

Permalink
Adding missing figures.
Browse files Browse the repository at this point in the history
Renaming cross-validation file to resampline-methods.
  • Loading branch information
rafalab committed Jan 4, 2024
1 parent f1bd97c commit 057a9c4
Show file tree
Hide file tree
Showing 74 changed files with 315 additions and 363 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
.RData
.Ruserdata
*_cache
*_files
highdim/*_files
inference/*_files
linear-models/*_files
ml/*_files
prob/*_files
summaries/*_files
.DS_Store
copy-qmds.R
crossref.sh
Expand Down
2 changes: 1 addition & 1 deletion _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ book:
- ml/evaluation-metrics.qmd
- ml/conditionals.qmd
- ml/smoothing.qmd
- ml/cross-validation.qmd
- ml/resampling-methods.qmd
- ml/algorithms.qmd
- ml/ml-in-practice.qmd
- ml/clustering.qmd
Expand Down
66 changes: 33 additions & 33 deletions docs/highdim/dimension-reduction.html

Large diffs are not rendered by default.

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.
2 changes: 1 addition & 1 deletion docs/highdim/intro-highdim.html
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../ml/cross-validation.html" class="sidebar-item-text sidebar-link">
<a href="../ml/resampling-methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">29</span>&nbsp; <span class="chapter-title">Resampling methods</span></span></a>
</div>
</li>
Expand Down
30 changes: 15 additions & 15 deletions docs/highdim/linear-algebra.html

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/highdim/matrices-in-R.html
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../ml/cross-validation.html" class="sidebar-item-text sidebar-link">
<a href="../ml/resampling-methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">29</span>&nbsp; <span class="chapter-title">Resampling methods</span></span></a>
</div>
</li>
Expand Down
72 changes: 36 additions & 36 deletions docs/highdim/matrix-factorization.html

Large diffs are not rendered by default.

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.
6 changes: 3 additions & 3 deletions docs/highdim/regularization.html
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../ml/cross-validation.html" class="sidebar-item-text sidebar-link">
<a href="../ml/resampling-methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">29</span>&nbsp; <span class="chapter-title">Resampling methods</span></span></a>
</div>
</li>
Expand Down Expand Up @@ -599,7 +599,7 @@ <h1 class="title">
<i class="callout-icon"></i>
</div>
<div class="callout-body-container">
<p>In <a href="../ml/cross-validation.html"><span>Chapter&nbsp;29</span></a>, we provide a formal discussion of the mean squared error.</p>
<p>In <a href="../ml/resampling-methods.html"><span>Chapter&nbsp;29</span></a>, we provide a formal discussion of the mean squared error.</p>
</div>
</div>
</div>
Expand Down Expand Up @@ -735,7 +735,7 @@ <h1 class="title">
</div>
</div>
<p>This approach will have our desired effect: when our sample size <span class="math inline">\(n_j\)</span> is very large, we obtain a stable estimate and the penalty <span class="math inline">\(\lambda\)</span> is effectively ignored since <span class="math inline">\(n_j+\lambda \approx n_j\)</span>. Yet when the <span class="math inline">\(n_j\)</span> is small, then the estimate <span class="math inline">\(\hat{\beta}_i(\lambda)\)</span> is shrunken towards 0. The larger the <span class="math inline">\(\lambda\)</span>, the more we shrink.</p>
<p>But how do we select <span class="math inline">\(\lambda\)</span>? In <a href="../ml/cross-validation.html"><span>Chapter&nbsp;29</span></a>, we describe an approach to do this. Here we will simply compute the RMSE we for different values of <span class="math inline">\(\lambda\)</span> to illustrate the effect:</p>
<p>But how do we select <span class="math inline">\(\lambda\)</span>? In <a href="../ml/resampling-methods.html"><span>Chapter&nbsp;29</span></a>, we describe an approach to do this. Here we will simply compute the RMSE we for different values of <span class="math inline">\(\lambda\)</span> to illustrate the effect:</p>
<div class="cell" data-layout-align="center" data-hash="regularization_cache/html/unnamed-chunk-26_b9a1a97986e3cbf4854587c4d64238bb">
<div class="sourceCode" id="cb23"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va">n</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/colSums.html">colSums</a></span><span class="op">(</span><span class="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/NA.html">is.na</a></span><span class="op">(</span><span class="va">y</span><span class="op">)</span><span class="op">)</span></span>
<span><span class="va">sums</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/colSums.html">colSums</a></span><span class="op">(</span><span class="va">y</span> <span class="op">-</span> <span class="va">mu</span> <span class="op">-</span> <span class="va">a</span>, na.rm <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ml/cross-validation.html" class="sidebar-item-text sidebar-link">
<a href="./ml/resampling-methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">29</span>&nbsp; <span class="chapter-title">Resampling methods</span></span></a>
</div>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/inference/bayes.html
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../ml/cross-validation.html" class="sidebar-item-text sidebar-link">
<a href="../ml/resampling-methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">29</span>&nbsp; <span class="chapter-title">Resampling methods</span></span></a>
</div>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/inference/bootstrap.html
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../ml/cross-validation.html" class="sidebar-item-text sidebar-link">
<a href="../ml/resampling-methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">29</span>&nbsp; <span class="chapter-title">Resampling methods</span></span></a>
</div>
</li>
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.
2 changes: 1 addition & 1 deletion docs/inference/clt.html
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../ml/cross-validation.html" class="sidebar-item-text sidebar-link">
<a href="../ml/resampling-methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">29</span>&nbsp; <span class="chapter-title">Resampling methods</span></span></a>
</div>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/inference/confidence-intervals.html
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../ml/cross-validation.html" class="sidebar-item-text sidebar-link">
<a href="../ml/resampling-methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">29</span>&nbsp; <span class="chapter-title">Resampling methods</span></span></a>
</div>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/inference/hierarchical-models.html
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../ml/cross-validation.html" class="sidebar-item-text sidebar-link">
<a href="../ml/resampling-methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">29</span>&nbsp; <span class="chapter-title">Resampling methods</span></span></a>
</div>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/inference/hypothesis-testing.html
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../ml/cross-validation.html" class="sidebar-item-text sidebar-link">
<a href="../ml/resampling-methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">29</span>&nbsp; <span class="chapter-title">Resampling methods</span></span></a>
</div>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/inference/intro-inference.html
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../ml/cross-validation.html" class="sidebar-item-text sidebar-link">
<a href="../ml/resampling-methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">29</span>&nbsp; <span class="chapter-title">Resampling methods</span></span></a>
</div>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/inference/models.html
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../ml/cross-validation.html" class="sidebar-item-text sidebar-link">
<a href="../ml/resampling-methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">29</span>&nbsp; <span class="chapter-title">Resampling methods</span></span></a>
</div>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/inference/parameters-estimates.html
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../ml/cross-validation.html" class="sidebar-item-text sidebar-link">
<a href="../ml/resampling-methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">29</span>&nbsp; <span class="chapter-title">Resampling methods</span></span></a>
</div>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ml/cross-validation.html" class="sidebar-item-text sidebar-link">
<a href="./ml/resampling-methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">29</span>&nbsp; <span class="chapter-title">Resampling methods</span></span></a>
</div>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/linear-models/association-not-causation.html
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../ml/cross-validation.html" class="sidebar-item-text sidebar-link">
<a href="../ml/resampling-methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">29</span>&nbsp; <span class="chapter-title">Resampling methods</span></span></a>
</div>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/linear-models/association-tests.html
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../ml/cross-validation.html" class="sidebar-item-text sidebar-link">
<a href="../ml/resampling-methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">29</span>&nbsp; <span class="chapter-title">Resampling methods</span></span></a>
</div>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/linear-models/intro-to-linear-models.html
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../ml/cross-validation.html" class="sidebar-item-text sidebar-link">
<a href="../ml/resampling-methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">29</span>&nbsp; <span class="chapter-title">Resampling methods</span></span></a>
</div>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/linear-models/measurement-error-models.html
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../ml/cross-validation.html" class="sidebar-item-text sidebar-link">
<a href="../ml/resampling-methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">29</span>&nbsp; <span class="chapter-title">Resampling methods</span></span></a>
</div>
</li>
Expand Down
Loading

0 comments on commit 057a9c4

Please sign in to comment.