public class AlatasetalProcess
extends java.lang.Object
It provides the implementation of the algorithm to be run in a process
Constructor and Description |
---|
AlatasetalProcess(myDataset dataset,
int nTrials,
int randomChromosomes,
int r,
int tournamentSize,
double pc,
double pmMin,
double pmMax,
double a1,
double a2,
double a3,
double a4,
double a5,
double af)
It creates a new process for the algorithm by setting up its parameters
|
Modifier and Type | Method and Description |
---|---|
java.util.ArrayList<AssociationRule> |
generateRulesSet(double minSupport)
It constructs a rules set once the whole evolutionary learning has been carried out.
|
void |
printReport(java.util.ArrayList<AssociationRule> rules)
It prints out on screen relevant information regarding the mined association rules
|
java.lang.String |
printRules(java.util.ArrayList<AssociationRule> rules)
Returns a String with relevant information regarding the mined association rules
|
void |
removeRedundant(java.util.ArrayList<Chromosome> upop)
Removes the redundant chromosomes of the population given.
|
static double |
roundDouble(double number,
int decimalPlace)
Rounds the number applying the
BigDecimal rounding mode given. |
void |
run()
It runs the evolutionary learning 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
|
void |
sortByAmplitude(java.util.ArrayList<Chromosome> pop)
Sorts the population given by their amplitude values.
|
public AlatasetalProcess(myDataset dataset, int nTrials, int randomChromosomes, int r, int tournamentSize, double pc, double pmMin, double pmMax, double a1, double a2, double a3, double a4, double a5, double af)
It creates a new process for the algorithm by setting up its parameters
dataset
- The instance of the dataset for dealing with its recordsnTrials
- The maximum number of generations to reach before completing the whole evolutionary learningrandomChromosomes
- The number of initial random chromosomesr
- The number of parts in which each random chromosome is divided to generate the others by doing inversionstournamentSize
- The size of tournament to select the fittest chromosome in the current populationpc
- The probability for the crossover operatorpmMin
- The minimum probability for the adaptive mutation operatorpmMax
- The maximum probability for the adaptive mutation operatora1
- The factor determining the importance of the rules supporta2
- The factor determining the importance of the rules confidencea3
- The factor determining the importance of the number of involved attributesa4
- The factor determining the importance of the amplitude of intervalsa5
- The factor determining the importance of the number of rules already coveredaf
- The factor of amplitude for each of the dataset attributepublic void run()
It runs the evolutionary learning for mining association rules
public void removeRedundant(java.util.ArrayList<Chromosome> upop)
upop
- given population.public void sortByAmplitude(java.util.ArrayList<Chromosome> pop)
pop
- given population.public java.util.ArrayList<AssociationRule> generateRulesSet(double minSupport)
It constructs a rules set once the whole evolutionary learning has been carried out. From the last population it filters those chromosomes which satisfy both confidence and support thresholds
minSupport
- The user-specified minimum support for the mined association rulespublic 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 static double roundDouble(double number, int decimalPlace)
BigDecimal
rounding mode given.number
- number to be rounded.decimalPlace
- given rounding mode.public java.lang.String printRules(java.util.ArrayList<AssociationRule> rules)
Returns a String with 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.