public class Complex
extends java.lang.Object
implements java.lang.Comparable
This class has the different selectors for the dataset
Constructor and Description |
---|
Complex()
Default constructor.
|
Complex(int nClas)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addSelector(Selector s)
Add the selector to the complex
|
void |
adjuntaNombreAtributos(java.lang.String[] attrib)
Copy the name of the attributes
|
void |
adjustDistrib()
Convert the distribution between 0 and 1
|
int |
compareTo(java.lang.Object o)
Compare two objects
|
boolean |
cover(Instance m)
Check if the complex covers to the example
|
void |
deleteDistrib()
Reset the value of the distribution
|
int |
getClas()
Return the class of the complex
|
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 |
getFP()
Return the value of FP
|
int |
getNClass()
Return the number of classes
|
double |
getQg()
Return the value of Qg
|
Selector |
getSelector(int index)
Get a selector
|
double |
getSup()
Return the value of Sup
|
double |
getTP()
Return the value of TP
|
void |
incrementDistrib(int value)
Increments the number of example for the class cover for the complex
|
boolean |
isEqual(Complex c)
Check if two complex are equal
|
void |
print()
Print the content of the complex
|
void |
printDistrib()
Print the distribution
|
java.lang.String |
printDistribucionString()
Print a String with the distribution
|
java.lang.String |
printString()
Print a String the content of the complex
|
void |
setClas(int value)
Asigne the class to the complex
|
void |
setFP(double heu)
Set the value of FP
|
void |
setQg(double heu)
Set the value of Qg
|
void |
setSup(double heu)
Set the value of Sup
|
void |
setTP(double heu)
Set the value of TP
|
int |
size()
Return the size of the complex
|
public Complex()
public Complex(int nClas)
Constructor
nClas
- Number of classespublic int compareTo(java.lang.Object o)
Compare two objects
compareTo
in interface java.lang.Comparable
o
- Complex to comparepublic boolean isEqual(Complex c)
Check if two complex are equal
c
- Complex to comparepublic void addSelector(Selector s)
Add the selector to the complex
s
- The selector to addpublic Selector getSelector(int index)
Get a selector
index
- Position of the selectorpublic int size()
Return the size of the complex
public int getNClass()
Return the number of classes
public int getClas()
Return the class of the complex
public void setClas(int value)
Asigne the class to the complex
value
- Class for the complexpublic boolean cover(Instance m)
Check if the complex covers to the example
m
- Instance to studypublic double getQg()
Return the value of Qg
public double getSup()
Return the value of Sup
public double getTP()
Return the value of TP
public double getFP()
Return the value of FP
public void setQg(double heu)
Set the value of Qg
heu
- The value of Qgpublic void setTP(double heu)
Set the value of TP
heu
- The value of TPpublic void setFP(double heu)
Set the value of FP
heu
- The value of FPpublic void setSup(double heu)
Set the value of Sup
heu
- The value of Suppublic 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 void print()
Print the content of the complex
public java.lang.String printString()
Print a String the content of the complex
public void printDistrib()
Print the distribution
public java.lang.String printDistribucionString()
Print a String with the distribution
public void adjuntaNombreAtributos(java.lang.String[] attrib)
Copy the name of the attributes
attrib
- Array with the name of the attributes