aboutsummaryrefslogtreecommitdiff
path: root/docs/mllib-collaborative-filtering.md
diff options
context:
space:
mode:
authorYuhao Yang <hhbyyh@gmail.com>2015-07-01 11:17:56 -0700
committerJoseph K. Bradley <joseph@databricks.com>2015-07-01 11:17:56 -0700
commit2012913355993e6516e4c81dbc92e579977131da (patch)
treeebb302ea581314397e679ba5d8733465d5f03272 /docs/mllib-collaborative-filtering.md
parent184de91d15a4bfc5c014e8cf86211874bba4593f (diff)
downloadspark-2012913355993e6516e4c81dbc92e579977131da.tar.gz
spark-2012913355993e6516e4c81dbc92e579977131da.tar.bz2
spark-2012913355993e6516e4c81dbc92e579977131da.zip
[SPARK-8308] [MLLIB] add missing save load for python example
jira: https://issues.apache.org/jira/browse/SPARK-8308 1. add some missing save/load in python examples. , LogisticRegression, LinearRegression and NaiveBayes 2. tune down iterations for MatrixFactorization, since current number will trigger StackOverflow for default java configuration (>1M) Author: Yuhao Yang <hhbyyh@gmail.com> Closes #6760 from hhbyyh/docUpdate and squashes the following commits: 9bd3383 [Yuhao Yang] update scala example 8a44692 [Yuhao Yang] Merge remote-tracking branch 'upstream/master' into docUpdate 077cbb8 [Yuhao Yang] Merge remote-tracking branch 'upstream/master' into docUpdate 3e948dc [Yuhao Yang] add missing save load for python example
Diffstat (limited to 'docs/mllib-collaborative-filtering.md')
-rw-r--r--docs/mllib-collaborative-filtering.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/mllib-collaborative-filtering.md b/docs/mllib-collaborative-filtering.md
index dfdf6216b2..eedc23424a 100644
--- a/docs/mllib-collaborative-filtering.md
+++ b/docs/mllib-collaborative-filtering.md
@@ -77,7 +77,7 @@ val ratings = data.map(_.split(',') match { case Array(user, item, rate) =>
// Build the recommendation model using ALS
val rank = 10
-val numIterations = 20
+val numIterations = 10
val model = ALS.train(ratings, rank, numIterations, 0.01)
// Evaluate the model on rating data
@@ -149,7 +149,7 @@ public class CollaborativeFiltering {
// Build the recommendation model using ALS
int rank = 10;
- int numIterations = 20;
+ int numIterations = 10;
MatrixFactorizationModel model = ALS.train(JavaRDD.toRDD(ratings), rank, numIterations, 0.01);
// Evaluate the model on rating data
@@ -210,7 +210,7 @@ ratings = data.map(lambda l: l.split(',')).map(lambda l: Rating(int(l[0]), int(l
# Build the recommendation model using Alternating Least Squares
rank = 10
-numIterations = 20
+numIterations = 10
model = ALS.train(ratings, rank, numIterations)
# Evaluate the model on training data