xgboost to predict unseen outcome variable

Hello,

how do I predict in a binary classification context when it is not possible to know the values of the target or outcome variable in a forecasting scenario?

I already have a trained xgboost model (package xgboost) and need to forecast a result using a new dataset without the response variable, I mean, I dont know if a student will be admitted or not, but need to make a prediction using xgboost. I tried to do this by setting in the test data (the new dataset without the response variable) an outcome or target variable with a fixed value 0 for instance to be able to run the xgboost, however the prediction is pretty unaccurate.

Thanks in advance

In almost all R packages, there is a predict function that just takes the predictors as inputs and produces predictions for the outcome. You don't need a placeholder for the outcome column.

See this page for documentation for xgboost.

2 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.