Which version you are use?
data.features(1) is OK for spark 1.0

2014-08-01 10:01 GMT+08:00 SK <skrishna...@gmail.com>:

>
> Hi,
>
> I want to extract the individual elements of a feature vector that is part
> of a LabeledPoint. I tried the following:
>
> data.features._1
> data.features(1)
> data.features.map(_.1)
>
>
> data is a LabeledPoint with a feature vector containing 3 features. All of
> the above resulted in  compilation errors. What is the right way to extract
> the elements of the feature vector?
>
> thanks
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/Extracting-an-element-from-the-feature-vector-in-LabeledPoint-tp11110.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>

Reply via email to