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

php - How to add and update images or image url in Volusion using Volusion API -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

c# SetCompatibleTextRenderingDefault must be called before the first -