Re: Equivalent of "predict" function from LogisticRegressionWithLBFGS in OneVsRest with LogisticRegression classifier (Spark 2.0)
Try this: val df = spark.createDataFrame(Seq(Vectors.dense(Array(10, 590, 190, 700))).map(Tuple1.apply)).toDF("features") On Sun, 28 Aug 2016 at 11:06 yaroslavwrote: > Hi, > > We use such kind of logic for training our model > > val model = new
Equivalent of "predict" function from LogisticRegressionWithLBFGS in OneVsRest with LogisticRegression classifier (Spark 2.0)
Hi, We use such kind of logic for training our model val model = new LogisticRegressionWithLBFGS() .setNumClasses(3) .run(train) Next, during spark streaming, we load model and apply incoming data to this model to get specific class, for example: