You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2016/02/29 15:52:18 UTC
[jira] [Resolved] (SPARK-13506) Fix the wrong parameter in R code
comment in AssociationRulesSuite
[ https://issues.apache.org/jira/browse/SPARK-13506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Owen resolved SPARK-13506.
-------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
Issue resolved by pull request 11387
[https://github.com/apache/spark/pull/11387]
> Fix the wrong parameter in R code comment in AssociationRulesSuite
> -------------------------------------------------------------------
>
> Key: SPARK-13506
> URL: https://issues.apache.org/jira/browse/SPARK-13506
> Project: Spark
> Issue Type: Bug
> Components: MLlib
> Reporter: zhengruifeng
> Priority: Trivial
> Fix For: 2.0.0
>
>
> The following R Snippet in AssociationRulesSuite is wrong:
> /* Verify results using the `R` code:
> transactions = as(sapply(
> list("r z h k p",
> "z y x w v u t s",
> "s x o n r",
> "x z y m t s q e",
> "z",
> "x z y r q t p"),
> FUN=function(x) strsplit(x," ",fixed=TRUE)),
> "transactions")
> ars = apriori(transactions,
> parameter = list(support = 0.0, confidence = 0.5, target="rules", minlen=2))
> arsDF = as(ars, "data.frame")
> arsDF$support = arsDF$support * length(transactions)
> names(arsDF)[names(arsDF) == "support"] = "freq"
> > nrow(arsDF)
> [1] 23
> > sum(arsDF$confidence == 1)
> [1] 23
> */
> The real outputs are:
> > nrow(arsDF)
> [1] 441838
> > sum(arsDF$confidence == 1)
> [1] 441592
> It is found that the parameters in apriori function were wrong.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org