public class AssociationRule
extends java.lang.Object
It is used for representing and handling an Association Rule
Constructor and Description |
---|
AssociationRule(short[] antecedent,
short[] consequent,
double ruleSupport,
double antecedentSupport,
double confidence,
int clases)
It creates a new association rule by setting up its properties
|
AssociationRule(short[] antecedent,
short[] consequent,
double ruleSupport,
double antecedentSupport,
double confidence,
int clases,
int[] dist)
It creates a new association rule by setting up its properties
|
Modifier and Type | Method and Description |
---|---|
void |
adjustDistrib()
Convert the distribution between 0 and 1
|
void |
deleteDistrib()
Reset the value of the distribution
|
short[] |
getAntecedent()
It retrieves the antecedent part of an association rule
|
double |
getAntecedentSupport()
It returns the antecedent support of an association rule
|
double |
getConfidence()
It returns the confidence of an association rule
|
short[] |
getConsequent()
It retrieves the consequent part of an association rule
|
double[] |
getDistrib()
Return the value of the complete distribution
|
double |
getDistribClass(int value)
Return the value of a distribution
|
int |
getDistribClassEx(int value)
Return the value of the distribution for the example of a class
|
int[] |
getDistribEx()
Return the value of the complete distribution for the example of a class
|
double |
getRuleSupport()
It returns the support of an association rule
|
void |
incrementDistrib(int value)
Increments the number of example for the class cover for the complex
|
java.lang.String |
printDistribucionString()
Print in a string the distribution values of the class
|
java.lang.String |
toString()
It returns a raw string representation of an association rule
|
public AssociationRule(short[] antecedent, short[] consequent, double ruleSupport, double antecedentSupport, double confidence, int clases)
It creates a new association rule by setting up its properties
antecedent
- The antecedent part of the ruleconsequent
- The consequent part of the ruleruleSupport
- The value representing the rule supportantecedentSupport
- The value representing the antecedent supportconfidence
- The value representing the rule confidenceclases
- Values of the target variablepublic AssociationRule(short[] antecedent, short[] consequent, double ruleSupport, double antecedentSupport, double confidence, int clases, int[] dist)
It creates a new association rule by setting up its properties
antecedent
- The antecedent part of the ruleconsequent
- The consequent part of the ruleruleSupport
- The value representing the rule supportantecedentSupport
- The value representing the antecedent supportconfidence
- The value representing the rule confidenceclases
- Values of the target variabledist
- Distribution values of the classpublic short[] getAntecedent()
It retrieves the antecedent part of an association rule
public short[] getConsequent()
It retrieves the consequent part of an association rule
public double getRuleSupport()
It returns the support of an association rule
public double getAntecedentSupport()
It returns the antecedent support of an association rule
public double getConfidence()
It returns the confidence of an association rule
public void deleteDistrib()
Reset the value of the distribution
public void incrementDistrib(int value)
Increments the number of example for the class cover for the complex
value
- The value of the classpublic void adjustDistrib()
Convert the distribution between 0 and 1
public double getDistribClass(int value)
Return the value of a distribution
value
- Index of the classpublic double[] getDistrib()
Return the value of the complete distribution
public int getDistribClassEx(int value)
Return the value of the distribution for the example of a class
value
- Index of the classpublic int[] getDistribEx()
Return the value of the complete distribution for the example of a class
public java.lang.String printDistribucionString()
Print in a string the distribution values of the class
public java.lang.String toString()
It returns a raw string representation of an association rule
toString
in class java.lang.Object