spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xi Shen <davidshe...@gmail.com>
Subject How to reuse a ML trained model?
Date Sat, 07 Mar 2015 10:10:45 GMT
Hi,

I checked a few ML algorithms in MLLib.

https://spark.apache.org/docs/0.8.1/api/mllib/index.html#org.apache.spark.mllib.classification.LogisticRegressionModel

I could not find a way to save the trained model. Does this means I have to
train my model every time? Is there a more economic way to do this?

I am thinking about something like:

model.run(...)
model.save("hdfs://path/to/hdfs")

Then, next I can do:

val model = Model.createFrom("hdfs://...")
model.predict(vector)

I am new to spark, maybe there are other ways to persistent the model?


Thanks,
David

Mime
View raw message