-
Notifications
You must be signed in to change notification settings - Fork 88
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
when mtry =1
all predictors are used in xgboost engine
#461
Comments
I think the problem is here: Lines 366 to 371 in 30dc026
It doesn't convert the
|
This problem will now apply to both |
Results now: library(tidymodels)
#> Registered S3 method overwritten by 'tune':
#> method from
#> required_pkgs.model_spec parsnip
library(mlbench)
data("PimaIndiansDiabetes")
df <- PimaIndiansDiabetes %>%
mutate(diabetes = forcats::fct_relevel(diabetes, 'pos'))
tidy_model <-
boost_tree(trees = 10,
mtry = 1,
tree_depth = 3) %>%
set_engine('xgboost',
eval_metric = 'auc',
event_level = "first",
verbose = 1) %>%
set_mode('classification')
set.seed(24)
tidy_model_fitted <- tidy_model %>%
fit(diabetes ~ . , data = df)
#> [1] training-auc:0.731097
#> [2] training-auc:0.821153
#> [3] training-auc:0.836787
#> [4] training-auc:0.854131
#> [5] training-auc:0.866493
#> [6] training-auc:0.876743
#> [7] training-auc:0.878963
#> [8] training-auc:0.879940
#> [9] training-auc:0.884306
#> [10] training-auc:0.887933
# col_sample by node should be 1/8 = 0.125
tidy_model_fitted$fit$call$params$colsample_bynode
#> [1] 0.125 Created on 2021-05-21 by the reprex package (v2.0.0) |
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. |
Whenever
mtry = 1
in the model spec the corresponding value ofcolsample_bytree
is not converted to proportion correctly.example: when
mtry = 1
,colsample_bytree = 1
when it should be 0.125.Created on 2021-04-06 by the reprex package (v1.0.0)
The text was updated successfully, but these errors were encountered: