-
Notifications
You must be signed in to change notification settings - Fork 92
Add a model for bagged neural networks #815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The model spec print method will need a new row in this table to describe this model.🙂 Lines 39 to 40 in 3c0a0e2
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! A few small changes in the PR, and 2 questions:
-
Why is
epochs
a tunable parameter formlp
but not forbag_mlp
? -
If I mistakenly try to tune
epochs
, I get the parsnip error about guarded arguments:
# pak::pak("tidymodels/baguette#64")
library(baguette)
#> Loading required package: parsnip
bm <-
bag_mlp(epochs = tune()) %>%
set_engine("nnet") %>%
set_mode("regression")
bm_tune <-
tune::tune_grid(
bm,
mpg ~ .,
rsample::bootstraps(mtcars, 2),
grid = 2
)
#> ! Bootstrap1: preprocessor 1/1, model 1/2: The following arguments cannot be manually modified and were removed: ma...
#> ! Bootstrap1: preprocessor 1/1, model 2/2: The following arguments cannot be manually modified and were removed: ma...
#> ! Bootstrap2: preprocessor 1/1, model 1/2: The following arguments cannot be manually modified and were removed: ma...
#> ! Bootstrap2: preprocessor 1/1, model 2/2: The following arguments cannot be manually modified and were removed: ma...
tune::show_notes(bm_tune)
#> unique notes:
#> ────────────────────────────────────────────────────────────────────────────
#> The following arguments cannot be manually modified and were removed: maxit.
Created on 2022-09-22 by the reprex package (v2.0.1)
Is this the usual error when tune()
is mistakenly supplied to a main model org that isn't tunable?
Co-authored-by: Simon P. Couch <simonpatrickcouch@gmail.com>
The epoch issue was hard to track down but fixed in baguette. |
Running the tests in 'tests/testthat.R' failed. 111 Last 13 lines of output: 112 113 * Run `snapshot_accept('boost_tree_xgboost')` to accept the change 114 * Run `snapshot_review('boost_tree_xgboost')` to interactively review the change 115 ── Failure (test_boost_tree_xgboost.R:674:3): interface to param arguments ───── 116 Snapshot of `fit_6 <- spec_6 %>% fit(mpg ~ ., data = mtcars)` has changed: 117 old vs new 118 - "! The arguments `watchlist` and `data` are guarded by parsnip and will not be passed to `xgb.train()`." 119 + "! The arguments `watchlist` and `data` are guarded by parsnip and will not be passed to `xgb.train()`."
This pull request 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. |
Engines in tidymodels/baguette#64