AssociationRule

class AssociationRule(val antecedent: String, val consequent: String, val support: Double, val confidence: Double, val lift: Option[Double], val leverage: Option[Double], val affinity: Option[Double], val id: Option[String]) extends HasPredictedValue with HasEntityId with HasConfidence with PmmlElement

We consider association rules of the form " => " next:

Value parameters:
affinity

Also known as Jaccard Similarity, affinity is a measure of the transactions that contain both the antecedent and consequent (intersect) compared to those that contain the antecedent or the consequent (union): affinity(A->C) = support(A+C) / [ support(A) + support(C) - support(A+C)]

antecedent

The id value of the itemset which is the antecedent of the rule. We represent the itemset by the letter A.

confidence

The confidence of the rule: confidence(A->C) = support(A+C) / support(A)

consequent

The id value of the itemset which is the consequent of the rule. We represent the itemset by the letter C.

id

An identification to uniquely identify an association rule.

leverage

Another measure of interestingness is leverage. An association with higher frequency and lower lift may be more interesting than an alternative rule with lower frequency and higher lift. The former can be more important in practice because it applies to more cases. The value is the difference between the observed frequency of A+C and the frequency that would be expected if A and C were independent: leverage(A->C) = support(A->C) - support(A)*support(C)

lift

A very popular measure of interestingness of a rule is lift. Lift values greater than 1.0 indicate that transactions containing A tend to contain C more often than transactions that do not contain A: lift(A->C) = confidence(A->C) / support(C)

support

The support of the rule, that is, the relative frequency of transactions that contain A and C: support(A->C) = support(A+C)

trait Serializable
class Object
trait Matchable
class Any

Value members

Concrete methods

override def entityId: String
Definition Classes
def fire(itemset: Set[String], algorithm: Algorithm): Boolean
def init(idToItemset: Map[String, Set[String]], index: Int): Unit
override def predictedValue: Any
Definition Classes

Inherited methods

Inherited from:
HasExtensions
def hasExtensions: Boolean
Inherited from:
HasExtensions

Concrete fields

val affinity: Option[Double]
val antecedent: String
var antecedentItemset: Set[String]
lazy val antecedentRule: String
val confidence: Double
val consequent: String
var consequentItemset: Set[String]
lazy val consequentRule: String
val id: Option[String]
var indexId: String
val leverage: Option[Double]
val lift: Option[Double]
lazy val rule: String
val support: Double