T - The type of items.public class AssociationRule<T> extends Object
| Constructor and Description |
|---|
AssociationRule()
Creates a new empty association rule.
|
AssociationRule(Collection<T> premise,
Collection<T> conclusion)
Creates a new association rule with the given premise
and conclusion
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addToConclusion(T t)
Adds the given object to the conclusion.
|
boolean |
addToPremise(T t)
Adds the given object to the premise.
|
double |
confidence(Collection<Collection<T>> database)
Returns the confidence of this rule wrt.
|
Collection<T> |
getConclusion()
Returns the conclusion of this rule.
|
Collection<T> |
getPremise()
Returns the premise of this rule.
|
double |
support(Collection<Collection<T>> database)
Returns the support of this rule wrt.
|
static <S> double |
support(Collection<S> itemset,
Collection<Collection<S>> database)
Returns the support of the given itemset wrt.
|
static <S> double |
support(S item,
Collection<Collection<S>> database)
Returns the support of the given item wrt.
|
String |
toString() |
public AssociationRule()
public AssociationRule(Collection<T> premise, Collection<T> conclusion)
premise - some set of objects for the premise.conclusion - some set of objects for the conclusion.public boolean addToPremise(T t)
t - some objectpublic boolean addToConclusion(T t)
t - some objectpublic Collection<T> getPremise()
public Collection<T> getConclusion()
public static <S> double support(S item,
Collection<Collection<S>> database)
item - some objectdatabase - a database (set of sets of objects)public static <S> double support(Collection<S> itemset, Collection<Collection<S>> database)
itemset - some set of objectsdatabase - a database (set of sets of objects)public double support(Collection<Collection<T>> database)
database - some set of transactions.public double confidence(Collection<Collection<T>> database)
database - some set of transactions.Copyright © 2018. All rights reserved.