from pyspark.sql.functions import col
transformed.select(col('outcome_column').alias('label'), col('features')
    ).rdd.map(lambda row: LabeledPoint(row.label, row.features))
Create labeledPoints from Spark DataFrame in Python