Skip to content
Snippets Groups Projects
Commit 86972fa5 authored by Jeff Lam's avatar Jeff Lam Committed by Sean Owen
Browse files

[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.
parent 2f7d0b68
No related branches found
No related tags found
No related merge requests found
...@@ -428,7 +428,7 @@ This example follows the simple text document `Pipeline` illustrated in the figu ...@@ -428,7 +428,7 @@ This example follows the simple text document `Pipeline` illustrated in the figu
<div data-lang="scala"> <div data-lang="scala">
{% highlight 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.classification.LogisticRegression
import org.apache.spark.ml.feature.{HashingTF, Tokenizer} import org.apache.spark.ml.feature.{HashingTF, Tokenizer}
import org.apache.spark.mllib.linalg.Vector import org.apache.spark.mllib.linalg.Vector
...@@ -466,7 +466,7 @@ model.save("/tmp/spark-logistic-regression-model") ...@@ -466,7 +466,7 @@ model.save("/tmp/spark-logistic-regression-model")
pipeline.save("/tmp/unfit-lr-model") pipeline.save("/tmp/unfit-lr-model")
// and load it back in during production // 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. // Prepare test documents, which are unlabeled (id, text) tuples.
val test = sqlContext.createDataFrame(Seq( val test = sqlContext.createDataFrame(Seq(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment