Skip to content

Commit

Permalink
Merge pull request #250 from NBISweden/olga-tidymodels
Browse files Browse the repository at this point in the history
Update tidymodels
  • Loading branch information
olgadet authored Apr 22, 2024
2 parents 3cea7f3 + 16c828d commit c49f2bd
Show file tree
Hide file tree
Showing 15 changed files with 842 additions and 24 deletions.
3 changes: 1 addition & 2 deletions session-tidymodels/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ book:
- index.qmd
- intro.qmd
- case-study.qmd
- exercises.qmd
#- exercises.qmd

bibliography: references.bib


format:
html:
theme: spacebar
Expand Down
4 changes: 2 additions & 2 deletions session-tidymodels/case-study.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ hist(data_diabetes$BMI, xlab = "", main = "BMI: all", 50)
hist(data_other$BMI, xlab = "", main = "BMI: non-test", 50)
hist(data_test$BMI, xlab = "", main = "BMI: test", 50)
```

## Feature engineering
Expand Down Expand Up @@ -236,7 +235,8 @@ model_tune %>%
# best lambda value (min. RMSE)
model_best <- model_tune %>%
select_best("rmse")
select_best(metric = "rmse")
print(model_best)
# finalize workflow with tuned model
Expand Down
785 changes: 785 additions & 0 deletions session-tidymodels/docs/case-study.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.
11 changes: 3 additions & 8 deletions session-tidymodels/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,14 @@
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./intro.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Tidymodels</span></span></a>
<span class="menu-text"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Introduction to Tidymodels</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./case-study.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Demo: a predictive modelling case study</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./exercises.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Exercises</span></a>
</div>
</li>
</ul>
</div>
Expand Down Expand Up @@ -168,6 +162,7 @@ <h1 class="unnumbered">Preface</h1>
<p><strong>Aims</strong></p>
<ul>
<li>to introduce <code>tidymodels</code> framework for predictive modelling studies</li>
<li>and show how to put all the common steps for building predictive model</li>
</ul>
<p><strong>Learning outcomes</strong></p>
<ul>
Expand Down Expand Up @@ -418,7 +413,7 @@ <h1 class="unnumbered">Preface</h1>
</div>
<div class="nav-page nav-page-next">
<a href="./intro.html" class="pagination-link">
<span class="nav-page-text"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Tidymodels</span></span> <i class="bi bi-arrow-right-short"></i>
<span class="nav-page-text"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Introduction to Tidymodels</span></span> <i class="bi bi-arrow-right-short"></i>
</a>
</div>
</nav>
Expand Down
16 changes: 5 additions & 11 deletions session-tidymodels/docs/intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">


<title>Tidymodels - 1&nbsp; Tidymodels</title>
<title>Tidymodels - 1&nbsp; Introduction to Tidymodels</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
Expand Down Expand Up @@ -93,7 +93,7 @@
<button type="button" class="quarto-btn-toggle btn" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar,#quarto-sidebar-glass" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<i class="bi bi-layout-text-sidebar-reverse"></i>
</button>
<nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./intro.html"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Tidymodels</span></a></li></ol></nav>
<nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./intro.html"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Introduction to Tidymodels</span></a></li></ol></nav>
<a class="flex-grow-1" role="button" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar,#quarto-sidebar-glass" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
</a>
<button type="button" class="btn quarto-search-button" aria-label="" onclick="window.quartoOpenSearch();">
Expand Down Expand Up @@ -127,20 +127,14 @@
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./intro.html" class="sidebar-item-text sidebar-link active">
<span class="menu-text"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Tidymodels</span></span></a>
<span class="menu-text"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Introduction to Tidymodels</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./case-study.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Demo: a predictive modelling case study</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./exercises.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Exercises</span></a>
</div>
</li>
</ul>
</div>
Expand All @@ -161,7 +155,7 @@ <h2 id="toc-title">Table of contents</h2>

<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Tidymodels</span></h1>
<h1 class="title"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Introduction to Tidymodels</span></h1>
</div>


Expand Down Expand Up @@ -218,7 +212,7 @@ <h1 class="title"><span class="chapter-number">1</span>&nbsp; <span class="chapt
</table>
<section id="references" class="level2 unnumbered">
<h2 class="unnumbered anchored" data-anchor-id="references">References</h2>
<div id="refs" role="list">
<div id="refs" role="list" style="display: none">

</div>
<!-- filtering non-informative features (variance threshold, univariate etc.) -->
Expand Down
Loading

0 comments on commit c49f2bd

Please sign in to comment.