diff --git a/.Rbuildignore b/.Rbuildignore index 203884b..3884fb3 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -12,4 +12,5 @@ inst/figs/ ^README\.Rmd$ ^[\.]?air\.toml$ ^\.vscode$ -^revdep$ \ No newline at end of file +^revdep$ +^train_dir$ diff --git a/.gitignore b/.gitignore index d58484e..91bb958 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ revdep/library.noindex revdep/data.sqlite .httr-oauth revdep/cloud.noindex/* +train_dir/ \ No newline at end of file diff --git a/DESCRIPTION b/DESCRIPTION index ad01d66..87e25f4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -26,7 +26,7 @@ License: MIT + file LICENSE URL: https://bonsai.tidymodels.org/, https://github.com/tidymodels/bonsai BugReports: https://github.com/tidymodels/bonsai/issues Depends: - parsnip (>= 1.0.1), + parsnip (>= 1.3.3.9000), R (>= 4.1) Imports: cli, @@ -52,9 +52,11 @@ Suggests: tune VignetteBuilder: knitr +Remotes: + tidymodels/parsnip Config/Needs/website: tidyverse/tidytemplate Config/testthat/edition: 3 Config/usethis/last-upkeep: 2025-04-25 Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.2 +RoxygenNote: 7.3.3 diff --git a/NEWS.md b/NEWS.md index 3cf46dd..cafc0f3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # bonsai (development version) +* catboost tuning parameters were updates: (#119) + - Fixed a bug in `mtry`; it used the parsnip name `mtry_prop`. + - Enabled model arguments for `min_n`, `sample_size`, and `stop_iter`. `min_n` is only enabled for GPU computations. + # bonsai 0.4.0 ## New Engines diff --git a/R/catboost_data.R b/R/catboost_data.R index 7c87e2b..6d77281 100644 --- a/R/catboost_data.R +++ b/R/catboost_data.R @@ -184,11 +184,38 @@ make_boost_tree_catboost <- function() { parsnip::set_model_arg( model = "boost_tree", eng = "catboost", - parsnip = "mtry_prop", + parsnip = "mtry", original = "rsm", func = list(pkg = "dials", fun = "mtry_prop"), has_submodel = FALSE ) + + parsnip::set_model_arg( + model = "boost_tree", + eng = "catboost", + parsnip = "min_n", + original = "min_data_in_leaf", + func = list(pkg = "dials", fun = "min_n"), + has_submodel = FALSE + ) + + parsnip::set_model_arg( + model = "boost_tree", + eng = "catboost", + parsnip = "sample_size", + original = "subsample", + func = list(pkg = "dials", fun = "sample_prop"), + has_submodel = FALSE + ) + + parsnip::set_model_arg( + model = "boost_tree", + eng = "catboost", + parsnip = "stop_iter", + original = "early_stopping_rounds", + func = list(pkg = "dials", fun = "stop_iter"), + has_submodel = FALSE + ) } # nocov end diff --git a/man/bonsai-package.Rd b/man/bonsai-package.Rd index f6a21f1..496b9fd 100644 --- a/man/bonsai-package.Rd +++ b/man/bonsai-package.Rd @@ -33,7 +33,7 @@ Authors: Other contributors: \itemize{ - \item Posit Software, PBC (03wc8by49) [copyright holder, funder] + \item Posit Software, PBC (\href{https://ror.org/03wc8by49}{ROR}) [copyright holder, funder] } }