tidymodels / parsnip

A tidy unified interface to models
https://parsnip.tidymodels.org
Other
597 stars 89 forks source link

setting stop_iter with brulee model #1050

Closed topepo closed 9 months ago

topepo commented 9 months ago
library(tidymodels)
# requires brulee; make sure to load it after install to get extra downloads
set.seed(1)
mlp(hidden_units = 5, epochs = 100) %>% 
  set_engine("brulee", stop_iter = 5)  %>% 
  set_mode("regression") %>% 
  fit(price ~ latitude + longitude, data = Sacramento)
#> Warning: The following arguments cannot be manually modified and were removed:
#> stop_iter.
#> parsnip model object
#> 
#> Multilayer perceptron
#> 
#> relu activation
#> 5 hidden units,  21 model parameters
#> 932 samples, 2 features, numeric outcome 
#> weight decay: 0.001 
#> dropout proportion: 0 
#> batch size: 839 
#> learn rate: 0.01 
#> scaled validation loss after 8 epochs: 1.03

# based on "loss after X epochs" it is actually working

Created on 2024-01-16 with reprex v2.0.2

github-actions[bot] commented 9 months ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.