Is it possible to access individual predictions from each tree in the ensemble for xgboost4j ? From what i can tell, _booster.predict(data = dm) returns the entire vector of predictions, but the predict
function only allows us to access the very first element of the vector.
/**
* Single instance prediction.
* Note: The performance is not ideal, use it carefully!
*/
override def predict(features: Vector): Double = {
import DataUtils._
val dm = new DMatrix(XGBoost.processMissingValues(Iterator(features.asXGB), $(missing)))
_booster.predict(data = dm)(0)(0)
}