Re: Flink ML 1.0.0 - Saving and Loading Models to Score a Single Feature Vector

2016-04-18 Thread KirstiLaurila
Answering to myself if someone is having similar problems. So already saved matrices can be read and used in als like this: // Setup the ALS learnerd val als = ALS() val users = env.readFile(new TypeSerializerInputFormat[Factors](createTypeInformation[Factors]),"path") val

Re: Flink ML 1.0.0 - Saving and Loading Models to Score a Single Feature Vector

2016-04-12 Thread KirstiLaurila
Hi, those parts were examples how I had tried. I tried with your suggestions, but still no success. Additionally, there were some problems: val (userFactorsOpt, itemFactorsOpt) = als.factorsOption If I had just this, userFactorsOpt And itemFactorsOpt did not have write method. So I added

Re: Flink ML 1.0.0 - Saving and Loading Models to Score a Single Feature Vector

2016-04-12 Thread Till Rohrmann
Hi Kirsti, I think you attached some images to your file which show the code. Unfortunately this is not supported by the mailing list. So maybe you could resend what you’ve already tried. In order to access the ALS model, you can do the following: val als = ALS() als.fit(input) val

Re: Flink ML 1.0.0 - Saving and Loading Models to Score a Single Feature Vector

2016-04-12 Thread KirstiLaurila
How should this be done for the recommendation engine (that is ALS, example here https://ci.apache.org/projects/flink/flink-docs-release-1.0/apis/batch/libs/ml/als.html ). I am able to run the example

Re: Flink ML 1.0.0 - Saving and Loading Models to Score a Single Feature Vector

2016-04-08 Thread Trevor Grant
I'm just about to open an issue / PR solution for 'warm-starts' Once this is in, we could just add a setter for the weight vector (and what ever iteration you're on if you're going to do more partial fits). Then all you need to save if your weight vector (and iter number). Trevor Grant Data

Re: Flink ML 1.0.0 - Saving and Loading Models to Score a Single Feature Vector

2016-04-08 Thread Behrouz Derakhshan
Is there a reasons the Predictor or Estimator class don't have read and write methods for saving and retrieving the model? I couldn't find Jira issues for it. Does it make sense to create one ? BR, Behrouz On Wed, Mar 30, 2016 at 4:40 PM, Till Rohrmann wrote: > Yes Suneel

Re: Flink ML 1.0.0 - Saving and Loading Models to Score a Single Feature Vector

2016-03-30 Thread Till Rohrmann
Yes Suneel is completely wright. If the data does not implement IOReadableWritable it is probably easier to use the TypeSerializerOutputFormat. What you need here to seralize the data is a TypeSerializer. You can obtain it the following way: val model = mlr.weightsOption.get val

Re: Flink ML 1.0.0 - Saving and Loading Models to Score a Single Feature Vector

2016-03-29 Thread Suneel Marthi
U may want to use FlinkMLTools.persist() methods which use TypeSerializerFormat and don't enforce IOReadableWritable. On Tue, Mar 29, 2016 at 2:12 PM, Sourigna Phetsarath < gna.phetsar...@teamaol.com> wrote: > Till, > > Thank you for your reply. > > Having this issue though, WeightVector does

Re: Flink ML 1.0.0 - Saving and Loading Models to Score a Single Feature Vector

2016-03-29 Thread Sourigna Phetsarath
Till, Thank you for your reply. Having this issue though, WeightVector does not extend IOReadWriteable: *public* *class* SerializedOutputFormat<*T* *extends* IOReadableWritable> *case* *class* WeightVector(weights: Vector, intercept: Double) *extends* Serializable {} However, I will use the

Re: Flink ML 1.0.0 - Saving and Loading Models to Score a Single Feature Vector

2016-03-29 Thread Till Rohrmann
Hi Gna, there are no utilities yet to do that but you can do it manually. In the end, a model is simply a Flink DataSet which you can serialize to some file. Upon reading this DataSet you simply have to give it to your algorithm to be used as the model. The following code snippet illustrates this

Re: Flink ML 1.0.0 - Saving and Loading Models to Score a Single Feature Vector

2016-03-29 Thread Simone Robutti
To my knowledge there is nothing like that. PMML is not supported in any form and there's no custom saving format yet. If you really need a quick and dirty solution, it's not that hard to serialize the model into a file. 2016-03-28 17:59 GMT+02:00 Sourigna Phetsarath :

Flink ML 1.0.0 - Saving and Loading Models to Score a Single Feature Vector

2016-03-28 Thread Sourigna Phetsarath
Flinksters, Is there an example of saving a Trained Model, loading a Trained Model and then scoring one or more feature vectors using Flink ML? All of the examples I've seen have shown only sequential fit and predict. Thank you. -Gna -- *Gna Phetsarath*System Architect // AOL Platforms //