We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent baa3e63 commit 60efd05Copy full SHA for 60efd05
mllib/src/main/scala/org/apache/spark/mllib/fpm/AssociationRules.scala
@@ -120,6 +120,13 @@ object AssociationRules {
120
@Since("1.5.0")
121
def confidence: Double = freqUnion.toDouble / freqAntecedent
122
123
+ /**
124
+ * Returns the support of the rule. Current implementation would return the number of
125
+ * co-occurrence of antecedent and consequent.
126
+ */
127
+ @Since("2.1.0")
128
+ def support: Double = freqUnion.toDouble
129
+
130
require(antecedent.toSet.intersect(consequent.toSet).isEmpty, {
131
val sharedItems = antecedent.toSet.intersect(consequent.toSet)
132
s"A valid association rule must have disjoint antecedent and " +
0 commit comments