Skip to content

Instantly share code, notes, and snippets.

@lakshay-arora
Created October 15, 2019 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lakshay-arora/a7e8c31744a4eb220ab8c2580e530959 to your computer and use it in GitHub Desktop.
Save lakshay-arora/a7e8c31744a4eb220ab8c2580e530959 to your computer and use it in GitHub Desktop.
from pyspark.mllib.regression import LabeledPoint
# set a Label against a Dense Vector
point_1 = LabeledPoint(1,Vectors.dense([1,2,3,4,5]))
# Features
print(point_1.features)
# Label
print(point_1.label)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment