Hi,
I use sparse vector for XGBoost4J-Spark. fit() threw “java.lang.RuntimeException: you can only specify missing value as 0.0 (the currently set value NaN) when you have SparseVector or Empty vector as your feature format”. By adding ‘missing’ 0.0 to parameters, fit() is now happy.
transform() still threw “ERROR ml.dmlc.xgboost4j.java.DataBatch - java.lang.RuntimeException: you can only specify missing value as 0.0 (the currently set value NaN) when you have SparseVector or Empty vector as your feature format”. model.getMissing() shows nan. Looking at the code, both XGBoostClassifier and XGBoostRegressor have setMissing(). However, XGBoostRegressionModel/XGBoostClassificationModel does not.
Did I miss anything? Is there a way to set missing in model to make transform() happy? Thank you!