Skip to content
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

Benchmarking kNN, random forest, and XGBoost #1

Open
kamaulindhardt opened this issue Jun 10, 2021 · 1 comment
Open

Benchmarking kNN, random forest, and XGBoost #1

kamaulindhardt opened this issue Jun 10, 2021 · 1 comment

Comments

@kamaulindhardt
Copy link

I get the following error:

**Error in benchmark(learners, fuelTask, holdout) : Assertion on 'design' failed: Must be of type 'data.frame', not 'list'.**

When trying to benchmark the kNN, Random Forest and XGBoost models in chapter 12

kknnWrapper <- makeTuneWrapper(kknn, resampling = kFold,
                                par.set = kknnParamSpace,
                                control = gridSearch)


forestWrapper <- makeTuneWrapper(forest, resampling = kFold,
                                par.set = forestParamSpace,
                                control = randSearch)

xgbWrapper <- makeTuneWrapper(xgb, resampling = kFold,
                                  par.set = xgbParamSpace,
                                  control = randSearch)


learners = list(kknnWrapper, forestWrapper, xgbWrapper)

holdout <- makeResampleDesc("Holdout")

bench <- benchmark(learners, fuelTask, holdout)

Should I update mlr package or is there a way around it?

@kamaulindhardt
Copy link
Author

SOLVED:

I solved it by simply specifying the package, like this:

bench <- mlr::benchmark(learners, fuelTask, holdout)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant