spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject spark git commit: [SPARK-13312][MLLIB] Update java train-validation-split example in ml-guide
Date Mon, 15 Feb 2016 09:25:14 GMT
Repository: spark
Updated Branches:
  refs/heads/master 56d49397e -> adb548365


[SPARK-13312][MLLIB] Update java train-validation-split example in ml-guide

Response to JIRA https://issues.apache.org/jira/browse/SPARK-13312.

This contribution is my original work and I license the work to this project.

Author: JeremyNixon <jnixon2@gmail.com>

Closes #11199 from JeremyNixon/update_train_val_split_example.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/adb54836
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/adb54836
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/adb54836

Branch: refs/heads/master
Commit: adb548365012552e991d51740bfd3c25abf0adec
Parents: 56d4939
Author: JeremyNixon <jnixon2@gmail.com>
Authored: Mon Feb 15 09:25:13 2016 +0000
Committer: Sean Owen <sowen@cloudera.com>
Committed: Mon Feb 15 09:25:13 2016 +0000

----------------------------------------------------------------------
 docs/ml-guide.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/adb54836/docs/ml-guide.md
----------------------------------------------------------------------
diff --git a/docs/ml-guide.md b/docs/ml-guide.md
index f827926..1770aab 100644
--- a/docs/ml-guide.md
+++ b/docs/ml-guide.md
@@ -870,7 +870,7 @@ import org.apache.spark.ml.regression.LinearRegression
 import org.apache.spark.ml.tuning.{ParamGridBuilder, TrainValidationSplit}
 
 // Prepare training and test data.
-val data = sqlContext.read.format("libsvm").load("data/mllib/sample_libsvm_data.txt")
+val data = sqlContext.read.format("libsvm").load("data/mllib/sample_linear_regression_data.txt")
 val Array(training, test) = data.randomSplit(Array(0.9, 0.1), seed = 12345)
 
 val lr = new LinearRegression()
@@ -913,7 +913,7 @@ import org.apache.spark.ml.regression.LinearRegression;
 import org.apache.spark.ml.tuning.*;
 import org.apache.spark.sql.DataFrame;
 
-DataFrame data = jsql.read().format("libsvm").load("data/mllib/sample_libsvm_data.txt");
+DataFrame data = jsql.read().format("libsvm").load("data/mllib/sample_linear_regression_data.txt");
 
 // Prepare training and test data.
 DataFrame[] splits = data.randomSplit(new double[] {0.9, 0.1}, 12345);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message