ca.pfv.spmf.patterns.rule_itemset_array_integer_with_count
Class Rule
- java.lang.Object
-
- ca.pfv.spmf.patterns.rule_itemset_array_integer_with_count.Rule
-
-
Constructor Summary
Constructors Constructor and Description Rule(int[] itemset1, int[] itemset2, int coverage, int transactionCount, double confidence)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetAbsoluteSupport()Get the absolute support of this rule (integer).doublegetConfidence()Get the confidence of this rule.intgetCoverage()Get the coverage of the rule (the support of the rule antecedent) as a number of transactionsint[]getItemset1()Get the left itemset of this rule (antecedent).int[]getItemset2()Get the right itemset of this rule (consequent).doublegetRelativeSupport(int databaseSize)Get the relative support of the rule (percentage)voidprint()Print this rule to System.out.java.lang.StringtoString()Return a String representation of this rule
-
-
-
Constructor Detail
-
Rule
public Rule(int[] itemset1, int[] itemset2, int coverage, int transactionCount, double confidence)Constructor- Parameters:
itemset1- the antecedent of the rule (an itemset)itemset2- the consequent of the rule (an itemset)coverage- the support of the antecedent as a number of transactionstransactionCount- the absolute support of the rule (integer - a number of transactions)confidence- the confidence of the rule
-
-
Method Detail
-
getRelativeSupport
public double getRelativeSupport(int databaseSize)
Get the relative support of the rule (percentage)- Parameters:
databaseSize- the number of transactions in the database where this rule was found.- Returns:
- the support (double)
-
getAbsoluteSupport
public int getAbsoluteSupport()
Get the absolute support of this rule (integer).- Returns:
- the absolute support.
-
getConfidence
public double getConfidence()
Get the confidence of this rule.- Returns:
- the confidence
-
getCoverage
public int getCoverage()
Get the coverage of the rule (the support of the rule antecedent) as a number of transactions- Returns:
- the coverage (int)
-
print
public void print()
Print this rule to System.out.
-
toString
public java.lang.String toString()
Return a String representation of this rule- Overrides:
toStringin classjava.lang.Object- Returns:
- a String
-
getItemset1
public int[] getItemset1()
Get the left itemset of this rule (antecedent).- Returns:
- an itemset.
-
getItemset2
public int[] getItemset2()
Get the right itemset of this rule (consequent).- Returns:
- an itemset.
-
-
DMelt 3.0 © DataMelt by jWork.ORG