LabeledPoint

There's also a LabeledPoint data type that comes up, and that's just what it sounds like, a point that has some sort of label associated with it that conveys the meaning of this data in human readable terms.

A dense or sparse local vector having a label or a response value is called a labeled point. They are used in supervised learning more prominently in classification and regression-based algorithms. Labeled point values are stored in a double datatype.

From https://medium.com/@rickynguyen/getting-started-with-spark-day-5-36b62a6d13bf

A labeled point is a local vector, either dense or sparse, associated with a label/response

Spark In Action

First you have to put each example in the dataset in a structure called a LabeledPoint , which is used in most of Spark’s machine-learning algorithms . It contains the target value and the vector with the features.

Last updated

Was this helpful?