LabeledPoint

class pyspark.mllib.regression.LabeledPoint(label: float, features: Iterable[float])

Class that represents the features and labels of a data point.

Parameters
labelint

Label for this data point.

featurespyspark.mllib.linalg.Vector or convertible

Vector of features for this point (NumPy array, list, pyspark.mllib.linalg.SparseVector, or scipy.sparse column matrix).

Notes

‘label’ and ‘features’ are accessible as class attributes.