Skip to content

get_task fails in certain situations for xgboost #114

@bgreenwell

Description

@bgreenwell

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") 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions