Repository: spark Updated Branches: refs/heads/master 84f81e035 -> 558e9c7e6
[SPARK-10663] Removed unnecessary invocation of DataFrame.toDF method. The Scala example under the "Example: Pipeline" heading in this document initializes the "test" variable to a DataFrame. Because test is already a DF, there is not need to call test.toDF as the example does in a subsequent line: model.transform(test.toDF). So, I removed the extraneous toDF invocation. Author: Matt Hagen <[email protected]> Closes #8875 from hagenhaus/SPARK-10663. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/558e9c7e Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/558e9c7e Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/558e9c7e Branch: refs/heads/master Commit: 558e9c7e60a7c0d85ba26634e97562ad2163e91d Parents: 84f81e0 Author: Matt Hagen <[email protected]> Authored: Tue Sep 22 21:14:25 2015 -0700 Committer: Xiangrui Meng <[email protected]> Committed: Tue Sep 22 21:14:25 2015 -0700 ---------------------------------------------------------------------- docs/ml-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/558e9c7e/docs/ml-guide.md ---------------------------------------------------------------------- diff --git a/docs/ml-guide.md b/docs/ml-guide.md index 0427ac6..fd3a616 100644 --- a/docs/ml-guide.md +++ b/docs/ml-guide.md @@ -475,7 +475,7 @@ val test = sqlContext.createDataFrame(Seq( )).toDF("id", "text") // Make predictions on test documents. -model.transform(test.toDF) +model.transform(test) .select("id", "text", "probability", "prediction") .collect() .foreach { case Row(id: Long, text: String, prob: Vector, prediction: Double) => --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
