Skip to content

Commit cd7575a

Browse files
first draft tidymodels Q3 (#768)
Co-authored-by: Max Kuhn <[email protected]>
1 parent ed6b702 commit cd7575a

File tree

4 files changed

+239
-0
lines changed

4 files changed

+239
-0
lines changed
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
output: hugodown::hugo_document
3+
4+
slug: tidymodels-2025-q3
5+
title: Q3 2025 tidymodels digest
6+
date: 2025-11-18
7+
author: Emil Hvitfeldt
8+
description: >
9+
A summary of what has been going on for the tidymodels group in the mid 2025.
10+
11+
photo:
12+
url: https://unsplash.com/photos/autumn-trees-with-colorful-leaves-in-a-park-Qx6Ojv9WPo8
13+
author: Anurag Jamwal
14+
15+
# one of: "deep-dive", "learn", "package", "programming", "roundup", or "other"
16+
categories: [roundup]
17+
tags: [tidymodels]
18+
---
19+
20+
<!--
21+
TODO:
22+
* [x] Look over / edit the post's title in the yaml
23+
* [x] Edit (or delete) the description; note this appears in the Twitter card
24+
* [x] Pick category and tags (see existing with `hugodown::tidy_show_meta()`)
25+
* [x] Find photo & update yaml metadata
26+
* [x] Create `thumbnail-sq.jpg`; height and width should be equal
27+
* [x] Create `thumbnail-wd.jpg`; width should be >5x height
28+
* [x] `hugodown::use_tidy_thumbnails()`
29+
* [x] Add intro sentence, e.g. the standard tagline for the package
30+
* [x] `usethis::use_tidy_thanks()`
31+
-->
32+
33+
The tidymodels framework is a collection of R packages for modeling and machine learning using tidyverse principles.
34+
35+
Since the beginning of 2021, we have been publishing quarterly updates here on the tidyverse blog summarizing what’s new in the tidymodels ecosystem. The purpose of these regular posts is to share useful new features and any updates you may have missed. You can check out the tidymodels tag to find all tidymodels blog posts here, including our roundup posts as well as those that are more focused.
36+
37+
Since our last update we have had some larger releases that you can read about in these posts.
38+
39+
- [tune 2.0.0](https://tidyverse.org/blog/2025/11/tune-2/)
40+
- [recipes 1.3.0](https://tidyverse.org/blog/2025/04/recipes-1-3-0/)
41+
- [rsample 1.3.0](https://tidyverse.org/blog/2025/04/rsample-1-3-0/)
42+
- [improved sparsity support in tidymodels](https://tidyverse.org/blog/2025/03/tidymodels-sparsity/)
43+
44+
The post will update, you on which packages have changed and the improvements you should know about that haven't been covered in the above posts.
45+
46+
Here's a list of the packages and their News sections:
47+
48+
- [dials](https://dials.tidymodels.org/news/index.html)
49+
- [parsnip](https://parsnip.tidymodels.org/news/index.html)
50+
- [rsample](https://rsample.tidymodels.org/news/index.html)
51+
- [recipes](https://recipes.tidymodels.org/news/index.html)
52+
- [probably](https://probably.tidymodels.org/news/index.html)
53+
- [brulee](https://brulee.tidymodels.org/news/index.html)
54+
55+
Let's look at a few specific updates.
56+
57+
## Quiet linear svm models
58+
59+
When you used to fit a linear SVM model, you would get a message that you were not able to avoid.
60+
61+
```r
62+
library(parsnip)
63+
library(modeldata)
64+
65+
res <-
66+
svm_linear(mode = "classification", engine = "kernlab") |>
67+
fit(Class ~ ., data = two_class_dat)
68+
#> Setting default kernel parameters
69+
```
70+
71+
This message by itself was not that useful and was unable to turn off in a reasonable way.
72+
We have silenced this message to hopefully alleviate some of the noise that came from using this method.
73+
74+
```{r}
75+
library(parsnip)
76+
library(modeldata)
77+
78+
res <-
79+
svm_linear(mode = "classification", engine = "kernlab") |>
80+
fit(Class ~ ., data = two_class_dat)
81+
res
82+
```
83+
84+
## Fewer numeric overflow issues in brulee
85+
86+
The brulee package has been improved to try to help avoid numeric overflow in the loss functions. The following things have been done to help deal with this type of issue.
87+
88+
* Starting values were transitioned to using Gaussian distribution (instead of uniform) with a smaller standard deviation.
89+
90+
* The results always contain the initial results to use as a fallback if there is overflow during the first epoch.
91+
92+
* `brulee_mlp()` has two additional parameters, `grad_value_clip` and `grad_value_clip`, that prevent issues.
93+
94+
* The warning was changed to "Early stopping occurred at epoch {X} due to numerical overflow of the loss function."
95+
96+
## Additional torch optimizers in brulee
97+
98+
Several additional optimizers have been added: `"ADAMw"`, `"Adadelta"`, `"Adagrad"`, and `"RMSprop"`. Previously, the options were `"SGD"` and `LBFGS"`.
99+
## Acknowledgements
100+
101+
We want to sincerely thank everyone who contributed to these packages since their previous versions:
102+
103+
- dials: [&#x0040;brendad8](https://github.com/brendad8), [&#x0040;hfrick](https://github.com/hfrick), [&#x0040;topepo](https://github.com/topepo), and [&#x0040;Wander03](https://github.com/Wander03).
104+
- parsnip: [&#x0040;chillerb](https://github.com/chillerb), [&#x0040;EmilHvitfeldt](https://github.com/EmilHvitfeldt), [&#x0040;jmgirard](https://github.com/jmgirard), [&#x0040;topepo](https://github.com/topepo), and [&#x0040;ZWael](https://github.com/ZWael).
105+
- rsample: [&#x0040;abichat](https://github.com/abichat), [&#x0040;hfrick](https://github.com/hfrick), [&#x0040;mkiang](https://github.com/mkiang), and [&#x0040;vincentarelbundock](https://github.com/vincentarelbundock).
106+
- recipes: [&#x0040;EmilHvitfeldt](https://github.com/EmilHvitfeldt), [&#x0040;SimonDedman](https://github.com/SimonDedman), and [&#x0040;topepo](https://github.com/topepo).
107+
- probably: [&#x0040;abichat](https://github.com/abichat), [&#x0040;ayueme](https://github.com/ayueme), [&#x0040;dchiu911](https://github.com/dchiu911), [&#x0040;EmilHvitfeldt](https://github.com/EmilHvitfeldt), [&#x0040;frankiethull](https://github.com/frankiethull), [&#x0040;gaborcsardi](https://github.com/gaborcsardi), [&#x0040;hfrick](https://github.com/hfrick), [&#x0040;Jeffrothschild](https://github.com/Jeffrothschild), [&#x0040;jgaeb](https://github.com/jgaeb), [&#x0040;jrwinget](https://github.com/jrwinget), [&#x0040;mark-burdon](https://github.com/mark-burdon), [&#x0040;martinhulin](https://github.com/martinhulin), [&#x0040;simonpcouch](https://github.com/simonpcouch), [&#x0040;teunbrand](https://github.com/teunbrand), [&#x0040;topepo](https://github.com/topepo), [&#x0040;wjakethompson](https://github.com/wjakethompson), and [&#x0040;yellowbridge](https://github.com/yellowbridge).
108+
- brulee: [&#x0040;genec1](https://github.com/genec1), [&#x0040;talegari](https://github.com/talegari), and [&#x0040;topepo](https://github.com/topepo).
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
---
2+
output: hugodown::hugo_document
3+
4+
slug: tidymodels-2025-q3
5+
title: Q3 2025 tidymodels digest
6+
date: 2025-11-18
7+
author: Emil Hvitfeldt
8+
description: >
9+
A summary of what has been going on for the tidymodels group in the mid 2025.
10+
11+
photo:
12+
url: https://unsplash.com/photos/autumn-trees-with-colorful-leaves-in-a-park-Qx6Ojv9WPo8
13+
author: Anurag Jamwal
14+
15+
# one of: "deep-dive", "learn", "package", "programming", "roundup", or "other"
16+
categories: [roundup]
17+
tags: [tidymodels]
18+
rmd_hash: 0cc22455fc61a268
19+
20+
---
21+
22+
<!--
23+
TODO:
24+
* [x] Look over / edit the post's title in the yaml
25+
* [x] Edit (or delete) the description; note this appears in the Twitter card
26+
* [x] Pick category and tags (see existing with [`hugodown::tidy_show_meta()`](https://rdrr.io/pkg/hugodown/man/use_tidy_post.html))
27+
* [x] Find photo & update yaml metadata
28+
* [x] Create `thumbnail-sq.jpg`; height and width should be equal
29+
* [x] Create `thumbnail-wd.jpg`; width should be >5x height
30+
* [x] [`hugodown::use_tidy_thumbnails()`](https://rdrr.io/pkg/hugodown/man/use_tidy_post.html)
31+
* [x] Add intro sentence, e.g. the standard tagline for the package
32+
* [x] [`usethis::use_tidy_thanks()`](https://usethis.r-lib.org/reference/use_tidy_thanks.html)
33+
-->
34+
35+
The tidymodels framework is a collection of R packages for modeling and machine learning using tidyverse principles.
36+
37+
Since the beginning of 2021, we have been publishing quarterly updates here on the tidyverse blog summarizing what's new in the tidymodels ecosystem. The purpose of these regular posts is to share useful new features and any updates you may have missed. You can check out the tidymodels tag to find all tidymodels blog posts here, including our roundup posts as well as those that are more focused.
38+
39+
Since our last update we have had some larger releases that you can read about in these posts.
40+
41+
- [tune 2.0.0](https://tidyverse.org/blog/2025/11/tune-2/)
42+
- [recipes 1.3.0](https://tidyverse.org/blog/2025/04/recipes-1-3-0/)
43+
- [rsample 1.3.0](https://tidyverse.org/blog/2025/04/rsample-1-3-0/)
44+
- [improved sparsity support in tidymodels](https://tidyverse.org/blog/2025/03/tidymodels-sparsity/)
45+
46+
The post will update, you on which packages have changed and the improvements you should know about that haven't been covered in the above posts.
47+
48+
Here's a list of the packages and their News sections:
49+
50+
- [dials](https://dials.tidymodels.org/news/index.html)
51+
- [parsnip](https://parsnip.tidymodels.org/news/index.html)
52+
- [rsample](https://rsample.tidymodels.org/news/index.html)
53+
- [recipes](https://recipes.tidymodels.org/news/index.html)
54+
- [probably](https://probably.tidymodels.org/news/index.html)
55+
- [brulee](https://brulee.tidymodels.org/news/index.html)
56+
57+
Let's look at a few specific updates.
58+
59+
## Quiet linear svm models
60+
61+
When you used to fit a linear SVM model, you would get a message that you were not able to avoid.
62+
63+
``` r
64+
library(parsnip)
65+
library(modeldata)
66+
67+
res <-
68+
svm_linear(mode = "classification", engine = "kernlab") |>
69+
fit(Class ~ ., data = two_class_dat)
70+
#> Setting default kernel parameters
71+
```
72+
73+
This message by itself was not that useful and was unable to turn off in a reasonable way. We have silenced this message to hopefully alleviate some of the noise that came from using this method.
74+
75+
<div class="highlight">
76+
77+
<pre class='chroma'><code class='language-r' data-lang='r'><span><span class='kr'><a href='https://rdrr.io/r/base/library.html'>library</a></span><span class='o'>(</span><span class='nv'><a href='https://github.com/tidymodels/parsnip'>parsnip</a></span><span class='o'>)</span></span>
78+
<span><span class='kr'><a href='https://rdrr.io/r/base/library.html'>library</a></span><span class='o'>(</span><span class='nv'><a href='https://modeldata.tidymodels.org'>modeldata</a></span><span class='o'>)</span></span>
79+
<span><span class='c'>#&gt; </span></span>
80+
<span><span class='c'>#&gt; Attaching package: 'modeldata'</span></span>
81+
<span></span><span><span class='c'>#&gt; The following object is masked from 'package:datasets':</span></span>
82+
<span><span class='c'>#&gt; </span></span>
83+
<span><span class='c'>#&gt; penguins</span></span>
84+
<span></span><span></span>
85+
<span><span class='nv'>res</span> <span class='o'>&lt;-</span> </span>
86+
<span> <span class='nf'><a href='https://parsnip.tidymodels.org/reference/svm_linear.html'>svm_linear</a></span><span class='o'>(</span>mode <span class='o'>=</span> <span class='s'>"classification"</span>, engine <span class='o'>=</span> <span class='s'>"kernlab"</span><span class='o'>)</span> <span class='o'>|&gt;</span> </span>
87+
<span> <span class='nf'><a href='https://generics.r-lib.org/reference/fit.html'>fit</a></span><span class='o'>(</span><span class='nv'>Class</span> <span class='o'>~</span> <span class='nv'>.</span>, data <span class='o'>=</span> <span class='nv'>two_class_dat</span><span class='o'>)</span></span>
88+
<span><span class='nv'>res</span></span>
89+
<span><span class='c'>#&gt; parsnip model object</span></span>
90+
<span><span class='c'>#&gt; </span></span>
91+
<span><span class='c'>#&gt; Support Vector Machine object of class "ksvm" </span></span>
92+
<span><span class='c'>#&gt; </span></span>
93+
<span><span class='c'>#&gt; SV type: C-svc (classification) </span></span>
94+
<span><span class='c'>#&gt; parameter : cost C = 1 </span></span>
95+
<span><span class='c'>#&gt; </span></span>
96+
<span><span class='c'>#&gt; Linear (vanilla) kernel function. </span></span>
97+
<span><span class='c'>#&gt; </span></span>
98+
<span><span class='c'>#&gt; Number of Support Vectors : 361 </span></span>
99+
<span><span class='c'>#&gt; </span></span>
100+
<span><span class='c'>#&gt; Objective Function Value : -357.1487 </span></span>
101+
<span><span class='c'>#&gt; Training error : 0.178255 </span></span>
102+
<span><span class='c'>#&gt; Probability model included.</span></span>
103+
<span></span></code></pre>
104+
105+
</div>
106+
107+
## Fewer numeric overflow issues in brulee
108+
109+
The brulee package has been improved to try to help avoid numeric overflow in the loss functions. The following things have been done to help deal with this type of issue.
110+
111+
- Starting values were transitioned to using Gaussian distribution (instead of uniform) with a smaller standard deviation.
112+
113+
- The results always contain the initial results to use as a fallback if there is overflow during the first epoch.
114+
115+
- `brulee_mlp()` has two additional parameters, `grad_value_clip` and `grad_value_clip`, that prevent issues.
116+
117+
- The warning was changed to "Early stopping occurred at epoch {X} due to numerical overflow of the loss function."
118+
119+
## Additional torch optimizers in brulee
120+
121+
Several additional optimizers have been added: `"ADAMw"`, `"Adadelta"`, `"Adagrad"`, and `"RMSprop"`. Previously, the options were `"SGD"` and `LBFGS"`. \## Acknowledgements
122+
123+
We want to sincerely thank everyone who contributed to these packages since their previous versions:
124+
125+
- dials: [@brendad8](https://github.com/brendad8), [@hfrick](https://github.com/hfrick), [@topepo](https://github.com/topepo), and [@Wander03](https://github.com/Wander03).
126+
- parsnip: [@chillerb](https://github.com/chillerb), [@EmilHvitfeldt](https://github.com/EmilHvitfeldt), [@jmgirard](https://github.com/jmgirard), [@topepo](https://github.com/topepo), and [@ZWael](https://github.com/ZWael).
127+
- rsample: [@abichat](https://github.com/abichat), [@hfrick](https://github.com/hfrick), [@mkiang](https://github.com/mkiang), and [@vincentarelbundock](https://github.com/vincentarelbundock).
128+
- recipes: [@EmilHvitfeldt](https://github.com/EmilHvitfeldt), [@SimonDedman](https://github.com/SimonDedman), and [@topepo](https://github.com/topepo).
129+
- probably: [@abichat](https://github.com/abichat), [@ayueme](https://github.com/ayueme), [@dchiu911](https://github.com/dchiu911), [@EmilHvitfeldt](https://github.com/EmilHvitfeldt), [@frankiethull](https://github.com/frankiethull), [@gaborcsardi](https://github.com/gaborcsardi), [@hfrick](https://github.com/hfrick), [@Jeffrothschild](https://github.com/Jeffrothschild), [@jgaeb](https://github.com/jgaeb), [@jrwinget](https://github.com/jrwinget), [@mark-burdon](https://github.com/mark-burdon), [@martinhulin](https://github.com/martinhulin), [@simonpcouch](https://github.com/simonpcouch), [@teunbrand](https://github.com/teunbrand), [@topepo](https://github.com/topepo), [@wjakethompson](https://github.com/wjakethompson), and [@yellowbridge](https://github.com/yellowbridge).
130+
- brulee: [@genec1](https://github.com/genec1), [@talegari](https://github.com/talegari), and [@topepo](https://github.com/topepo).
131+
42.7 KB
Loading
93.4 KB
Loading

0 commit comments

Comments
 (0)