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

Popular posts from this blog

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

iOS: Performance of reloading UIImage(name:...) -