aboutsummaryrefslogtreecommitdiff
path: root/mllib/src/test
diff options
context:
space:
mode:
authorZheng RuiFeng <ruifengz@foxmail.com>2016-02-29 14:51:27 +0000
committerSean Owen <sowen@cloudera.com>2016-02-29 14:51:27 +0000
commitac5c635281aa796547e31e20c10d2483469294ee (patch)
treec283298c7f4bd2b6da051fb0c16c025297c03b73 /mllib/src/test
parent2f91f5ac0d2a5932169b245e3ef3e19849131277 (diff)
downloadspark-ac5c635281aa796547e31e20c10d2483469294ee.tar.gz
spark-ac5c635281aa796547e31e20c10d2483469294ee.tar.bz2
spark-ac5c635281aa796547e31e20c10d2483469294ee.zip
[SPARK-13506][MLLIB] Fix the wrong parameter in R code comment in AssociationRulesSuite
JIRA: https://issues.apache.org/jira/browse/SPARK-13506 ## What changes were proposed in this pull request? just chang R Snippet Comment in AssociationRulesSuite ## How was this patch tested? unit test passsed Author: Zheng RuiFeng <ruifengz@foxmail.com> Closes #11387 from zhengruifeng/ars.
Diffstat (limited to 'mllib/src/test')
-rw-r--r--mllib/src/test/scala/org/apache/spark/mllib/fpm/AssociationRulesSuite.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/mllib/src/test/scala/org/apache/spark/mllib/fpm/AssociationRulesSuite.scala b/mllib/src/test/scala/org/apache/spark/mllib/fpm/AssociationRulesSuite.scala
index 77a2773c36..dcb1f398b0 100644
--- a/mllib/src/test/scala/org/apache/spark/mllib/fpm/AssociationRulesSuite.scala
+++ b/mllib/src/test/scala/org/apache/spark/mllib/fpm/AssociationRulesSuite.scala
@@ -42,6 +42,7 @@ class AssociationRulesSuite extends SparkFunSuite with MLlibTestSparkContext {
.collect()
/* Verify results using the `R` code:
+ library(arules)
transactions = as(sapply(
list("r z h k p",
"z y x w v u t s",
@@ -52,7 +53,7 @@ class AssociationRulesSuite extends SparkFunSuite with MLlibTestSparkContext {
FUN=function(x) strsplit(x," ",fixed=TRUE)),
"transactions")
ars = apriori(transactions,
- parameter = list(support = 0.0, confidence = 0.5, target="rules", minlen=2))
+ parameter = list(support = 0.5, confidence = 0.9, target="rules", minlen=2))
arsDF = as(ars, "data.frame")
arsDF$support = arsDF$support * length(transactions)
names(arsDF)[names(arsDF) == "support"] = "freq"