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

c# SetCompatibleTextRenderingDefault must be called before the first -

c++ - Fill runtime data at compile time with templates -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -