From 9d0b955d0eb8587a1738c7754a163053a394713b Mon Sep 17 00:00:00 2001 From: Jeff Lam Date: Fri, 15 Jan 2016 00:09:59 -0800 Subject: [PATCH] [SPARK-12722] [DOCS] Fixed typo in Pipeline example (http://spark.apache.org/docs/latest/ml-guide.html#example-pipeline) cc: @jkbradley val sameModel = Pipeline.load("/tmp/spark-logistic-regression-model") should be val sameModel = PipelineModel.load("/tmp/spark-logistic-regression-model") --- docs/ml-guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ml-guide.md b/docs/ml-guide.md index 1343753bce24..5aafd53b584e 100644 --- a/docs/ml-guide.md +++ b/docs/ml-guide.md @@ -428,7 +428,7 @@ This example follows the simple text document `Pipeline` illustrated in the figu
{% highlight scala %} -import org.apache.spark.ml.Pipeline +import org.apache.spark.ml.{Pipeline, PipelineModel} import org.apache.spark.ml.classification.LogisticRegression import org.apache.spark.ml.feature.{HashingTF, Tokenizer} import org.apache.spark.mllib.linalg.Vector @@ -466,7 +466,7 @@ model.save("/tmp/spark-logistic-regression-model") pipeline.save("/tmp/unfit-lr-model") // and load it back in during production -val sameModel = Pipeline.load("/tmp/spark-logistic-regression-model") +val sameModel = PipelineModel.load("/tmp/spark-logistic-regression-model") // Prepare test documents, which are unlabeled (id, text) tuples. val test = sqlContext.createDataFrame(Seq(