Xgboost Predictor In R Predicts The Same Value For All Rows
I looked into the the post on the same thing in Python, but I want a solution in R. I'm working on the Titanic dataset from Kaggle, and it looks like this: 'data.frame': 891
Solution 1:
You must remove the Survived
variable in your test set in order to use xgboost, since this is the variable you want to predict.
trmat = data.matrix(train[, colnames(train) != "Survived"])
It should solve your problem.
Post a Comment for "Xgboost Predictor In R Predicts The Same Value For All Rows"