diff --git a/examples/linear-regression/src/main/scala/org/apache/spark/examples/ml/LinearRegressionExample.scala b/examples/linear-regression/src/main/scala/org/apache/spark/examples/ml/LinearRegressionExample.scala index 3561e536c..48e3b2c40 100644 --- a/examples/linear-regression/src/main/scala/org/apache/spark/examples/ml/LinearRegressionExample.scala +++ b/examples/linear-regression/src/main/scala/org/apache/spark/examples/ml/LinearRegressionExample.scala @@ -115,7 +115,7 @@ object LinearRegressionExample { training.select("label", "features").printSchema() val featuresRDD = training .select("label", "features").rdd.map{ - case Row(label:Double, feature:Vector) => new LabeledPoint(label, feature.toDense) + case Row(label: Double, feature: Vector) => new LabeledPoint(label, feature.toDense) } import spark.implicits._ val df = featuresRDD.toDF("label", "features")