diff options
author | Jeff Lam <sha0lin@alumni.carnegiemellon.edu> | 2016-01-16 10:41:40 +0000 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-01-16 10:41:40 +0000 |
commit | 86972fa52152d2149b88ba75be048a6986006285 (patch) | |
tree | 7b5751d993a78b01c884ada8fd50a4ef7b808b87 /docs | |
parent | 2f7d0b68a29de9755fc9fafd9a52c048981ad880 (diff) | |
download | spark-86972fa52152d2149b88ba75be048a6986006285.tar.gz spark-86972fa52152d2149b88ba75be048a6986006285.tar.bz2 spark-86972fa52152d2149b88ba75be048a6986006285.zip |
[SPARK-12722][DOCS] Fixed typo in Pipeline example
http://spark.apache.org/docs/latest/ml-guide.html#example-pipeline
```
val sameModel = Pipeline.load("/tmp/spark-logistic-regression-model")
```
should be
```
val sameModel = PipelineModel.load("/tmp/spark-logistic-regression-model")
```
cc: jkbradley
Author: Jeff Lam <sha0lin@alumni.carnegiemellon.edu>
Closes #10769 from Agent007/SPARK-12722.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/ml-guide.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/ml-guide.md b/docs/ml-guide.md index 1343753bce..5aafd53b58 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 <div data-lang="scala"> {% 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( |