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

get_task fails in certain situations for xgboost #114

Open
bgreenwell opened this issue Dec 13, 2020 · 1 comment
Open

get_task fails in certain situations for xgboost #114

bgreenwell opened this issue Dec 13, 2020 · 1 comment

Comments

@bgreenwell
Copy link
Owner

bgreenwell commented Dec 13, 2020

Seems like it will fail whever an xgboost model is fit without a params argument:

library(pdp)
library(xgboost)

boston <- pdp::boston
X <- data.matrix(subset(boston, select = -cmedv))
y <- boston$cmedv

set.seed(1612)
bst <- xgboost(X, label = y, nrounds = 100, verbose = 0)

partial(bst, pred.var = "chas", train = X)  # will fail
partial(bst, pred.var = "chas", train = X, type = "regression") 
@bgreenwell
Copy link
Owner Author

Need to check if bst$params$objective is NULL first.

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