Actually it's unnecessary to convert csv row to LabeledPoint, because we
use DataFrame as the standard data format when training a model by Spark ML.
What you should do is converting double attributes to Vector named
"feature". Then you can train the ML model by specifying the featureCol and
labelCol.

Thanks
Yanbo

2016-03-16 13:41 GMT+08:00 Dharmin Siddesh J <siddeshjdhar...@gmail.com>:

> Hi
>
> I am trying to read a csv with few double attributes and String Label .
> How can i convert it to labelpoint RDD so that i can run it with spark
> mllib classification algorithms.
>
> I have tried
> The LabelPoint Constructor (is available only for Regression ) but it
> accepts only double format label. Is there any other way to point out the
> string label and convert it into RDD<labelpoint .>
>
> Regards
> Siddesh
>
>
>

Reply via email to