Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

predictor-spark work with model built from scala libs #18

Open
shaowei-su opened this issue Jul 26, 2017 · 1 comment
Open

predictor-spark work with model built from scala libs #18

shaowei-su opened this issue Jul 26, 2017 · 1 comment

Comments

@shaowei-su
Copy link

hi Komiya,
This is a very interesting project you've built!
I have one question: is it possible to load model built from "ml.dmlc.xgboost4j.scala.{XGBoost, DMatrix}" libraries with the predictor-spark package?

I was able to do this without error but the model looks strange to me:
scala> model.numFeatures
res15: Int = -1

and the prediction results are completely wrong.

Thanks.

@shaowei-su
Copy link
Author

basically it can not load spark model info correctly:

scala> pred.getSparkModelParam
res28: biz.k11i.xgboost.spark.SparkModelParam = null

then the model can not be reconstructed

      xgboostPredictor.getSparkModelParam match {
        case param: SparkModelParam =>
          val model = param.getModelType match {
            case "_cls_" => loadClassificationModel(xgboostPredictor, param)
            case "_reg_" => loadRegressionModel(xgboostPredictor, param)
          }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant