spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abhishek Anand <>
Subject Change spark dataframe to LabeledPoint in Java
Date Thu, 30 Jun 2016 07:29:33 GMT
Hi ,

I have a dataframe which i want to convert to labeled point.

DataFrame labeleddf = model.transform(newdf).select("label","features");

How can I convert this to a LabeledPoint to use in my Logistic Regression

I could do this in scala using
val trainData = =>
LabeledPoint(row.getDouble(0), row(1).asInstanceOf[Vector])).cache()

How to achieve the same in Java,


View raw message