Closed amin0511ss closed 1 year ago
Hi @amin0511ss, Thanks for reporting this! Could you post a reproducible example, please? I can't run your example because I'm missing a lot of elements you're using, such as the workflow object and the grid object.
The reprex makes it easy to ensure that your example code is indeed reproducible and has helpful tips for do's and don'ts.
And a sorta wild guess which may also be a red herring: The error says "! The parameter object contains unknowns." Are you trying to tune over the mtry
parameter? That, per default, contains an unknown in the range of possible values because the upper limit depends on how many predictors are in the model/data. This parameter needs to be finalized (i.e., the upper limit set) before it can be used to tune.
I'm going to close this now, assuming it has been resolved. If not, please open another issue!
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.
I did a tune_grid to find the best parameters setup for a light GBM fit (bonsai package). I then try to improve upon it by using tune_bayes command and set initial to "tune_grid". the code is below and then the error message is shown further down.
code: lgbm_tuned <- tune_grid(object = lgbm_workflow, resamples = IndividualData_cv_folds, grid = lgbm_grid, metrics = metric_set(yardstick::rmse), control_grid(verbose = F) )
set.seed(1432) lgbm_bayes <- tune_bayes(lgbm_workflow, IndividualData_cv_folds, initial = lgbm_tuned, iter = 6)
The error message: Gaussian process model: Error in
.f()
: ! The parameter object contains unknowns. ℹ This is an internal error that was detected in the dials package. Please report it at https://github.com/tidymodels/dials/issues with a [reprex](https://https:/... Error incheck_gp_failure()
: ! Gaussian process model was not fit. Runrlang::last_error()
to see where the error occurred. ✖ Optimization stopped prematurely; returning current results.