Jump to content

XGBoost not executing to predict unseen data

Matt Hemenway

Recommended Posts

I've downloaded the XGBoost template and have begun inserting my own user table and prediction data sets. After selecting predictors and response variables, I'm able to create the model but receive the following error when I select "True" for "Predict unseen data" in the tuning parameters:

TIBCO Enterprise Runtime for R returned an error

The data function '[TERR] XGBoost' could not be executed.

Error in out[, obsLevels, drop = FALSE] : undefined columns selected

eval(script, envir = .GlobalEnv)

eval(script, envir = .GlobalEnv)


NewData(prediction, xgb_train)

predict(model, prediction, type = "prob")

predict.train(model, prediction, type = "prob")

out[, obsLevels, drop = FALSE]

I've tried simplifying both my training and prediction datasets (eliminate missing data, select only a few high confidence variables) but I'm still unable to predict unseen data. I noticed in the template the prediction dataset does not contain a column for the response variable (status). I've tried executing the model on a prediction dataset with and without a column for the response variable.

Thanks in advance.



Link to comment
Share on other sites

Can you check the following:


The columns names in the training and prediction datasets are both the same (aside from the response variable)

The response variable has the same data type in the prediction dataset as the training dataset (is it the right data type for the task:classification or regression)

Categorical variables in the prediction dataset have no unseen values (i.e. check the unique values in the prediction dataset and make sure they appear in the training dataset)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...