Class LabeledPoint

Object
org.apache.spark.mllib.regression.LabeledPoint
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product

public class LabeledPoint extends Object implements scala.Product, Serializable
Class that represents the features and labels of a data point.

param: label Label for this data point. param: features List of features for this data point.

See Also:
  • Constructor Details

    • LabeledPoint

      public LabeledPoint(double label, Vector features)
  • Method Details

    • parse

      public static LabeledPoint parse(String s)
      Parses a string resulted from LabeledPoint#toString into an LabeledPoint.

      Parameters:
      s - (undocumented)
      Returns:
      (undocumented)
    • label

      public double label()
    • features

      public Vector features()
    • getLabel

      public double getLabel()
    • getFeatures

      public Vector getFeatures()
    • toString

      public String toString()
      Overrides:
      toString in class Object