I have trained a GBTClassifier in Spark 1.6 with the Pipeline abstraction and I am kind of confused on how to save it.
If I do:
GBTClassificationModel gbt = trainClassifierGBT(data);
Model Accuracy = 0.8306451612903226
Test Error = 0.16935483870967738
GradientBoostedTreesModel oldGBT = gbt.toOld();
oldGBT.save(jsc.sc(), "data/gbtModel");
I get:
java.lang.NullPointerException
If I do:
PipelineModel pipeModel = pipeline.fit(training);
pipeline.save("data/gbtModel");
I get:
Exception in thread "main" java.lang.UnsupportedOperationException: Pipeline write will fail on this Pipeline because it contains a stage which does not implement Writable.
I will test this solution but wonder if it can be solved another way. Spark ML Pipeline api save not working