public class AprioriProcess
extends java.lang.Object
It provides the implementation of the Apriori algorithm to be run in a process
Constructor and Description |
---|
AprioriProcess(myDataset dataset,
double minSupport,
double minConfidence)
It creates a new process for the algorithm by setting up its parameters
|
Modifier and Type | Method and Description |
---|---|
java.util.ArrayList<AssociationRule> |
generateRulesSet()
It constructs a rules set once the algorithm has been carried out
|
void |
printReport(java.util.ArrayList<AssociationRule> rules)
It prints out on screen relevant information regarding the mined association rules
|
static double |
roundDouble(double number,
int decimalPlace)
Rounds the number applying the
BigDecimal rounding mode given. |
void |
run()
It runs the algorithm for mining association rules
|
void |
saveReport(java.util.ArrayList<AssociationRule> rules,
java.io.PrintWriter w)
It prints out on the given
PrintWriter object. relevant information regarding the mined association rules
|
public AprioriProcess(myDataset dataset, double minSupport, double minConfidence)
It creates a new process for the algorithm by setting up its parameters
dataset
- The instance of the dataset for dealing with its recordsminSupport
- The user-specified minimum support for the mined association rulesminConfidence
- The user-specified minimum confidence for the mined association rulespublic void run()
It runs the algorithm for mining association rules
public java.util.ArrayList<AssociationRule> generateRulesSet()
It constructs a rules set once the algorithm has been carried out
public void printReport(java.util.ArrayList<AssociationRule> rules)
It prints out on screen relevant information regarding the mined association rules
rules
- The array of association rules from which gathering relevant informationpublic void saveReport(java.util.ArrayList<AssociationRule> rules, java.io.PrintWriter w)
It prints out on the given PrintWriter
object. relevant information regarding the mined association rules
rules
- The array of association rules from which gathering relevant informationw
- given PrintWriter object to write on.public static double roundDouble(double number, int decimalPlace)
BigDecimal
rounding mode given.number
- number to be rounded.decimalPlace
- given rounding mode.