I'm new to spark,trying to generate the decision tree model in scala and use that model in java to predict.How to load that model in java? -
i have saved model generated in scala disc.
val model = decisiontree.trainclassifier(trainingdata, numclasses, categoricalfeaturesinfo, impurity, maxdepth, maxbins) model.save(sc, "c:\model")
using same imports java in order load model:
decisiontreemodel model = decisiontreemodel.load(sc, "c:\\model");
Comments
Post a Comment