Example from https://xgboost.readthedocs.io/en/latest/jvm/java_intro.html says that you train your model with:
Booster booster = XGBoost.train(trainMat, params, nround, watches, null, null);
But I cannot understand where is your y_train (response / explained variable) used? trainMat containes variables that explain the response (X_train), but from where model even knows the correct values it should learn from?
In python implementation, we have .fit() for that: xgb.fit(X_train,y_train) where we give both explaining and explained values.
xgb.fit(X_train,y_train)
How give response values to xgBoost training in java? Should it be in DMatrix?
1.4m articles
1.4m replys
5 comments
56.9k users