public class Complejo
extends java.lang.Object
implements java.lang.Comparable
Stores conjunctions of selectors
Constructor and Description |
---|
Complejo()
Default constructor.
|
Complejo(int nClas)
Constructor for Complex
|
Modifier and Type | Method and Description |
---|---|
void |
addSelector(Selector s)
Add the selector into the selector list
|
void |
adjuntaNombreAtributos(java.lang.String[] atributos)
Local copy of the name of variables
|
void |
borraDistrib()
reset the distribution value for the complex
|
void |
calculaLaplaciano()
Computes the laplacian value of the complex.
|
void |
clear()
Cleans the list
|
int |
compareTo(java.lang.Object o)
Compare two objects of the class
|
boolean |
cubre(Muestra m)
Checks if the complex covers the given sample.
|
boolean |
esIgual(Complejo c)
Check if two complex are equals (represent the same)
|
int |
getClase()
Return the class that define the complex
|
int[] |
getDistribucion()
Return the value of the distribution
|
int |
getDistribucionClase(int clase)
Return the value of the distribution
|
double |
getHeuristica()
return the heuristic value of the complex
|
int |
getNClases()
Return the number of classes
|
Selector |
getSelector(int indice)
Return a selector in one position by giving a complex
|
void |
incrementaDistrib(int clase)
Add one to the n of the complex for the class
|
void |
print(int nominal)
Print the content of the complex (List->Attribute operator value)
|
void |
printDistribucion()
Print the classes distribution for the complex
|
java.lang.String |
printDistribucionString()
Print the classes distribution for the complex
|
java.lang.String |
printString(int nominal,
double inf,
double sup,
boolean ultima)
Returns a string with the complex contents (List -> Attribute operator value).
|
boolean |
reglaCubreInstancia(Instance instancia)
Checks if the rule covers the given instance.
|
void |
removeSelector(Selector s)
Drop the selector of the list selectors
|
void |
removeSelectorAtributo(int atributo)
Removes the selectors that have the attribute given as argument from the proper list
|
void |
setClase(int clase)
Gives the value of the class to the complex
|
void |
setHeuristica(double heu)
Assign a heuristic value (Wracc) to the complex
|
int |
size()
Return the size complex
|
public Complejo()
public Complejo(int nClas)
nClas
- int number of classespublic int compareTo(java.lang.Object o)
Compare two objects of the class
compareTo
in interface java.lang.Comparable
o
- complex to comparepublic boolean esIgual(Complejo c)
Check if two complex are equals (represent the same)
c
- El complex to comparepublic void addSelector(Selector s)
Add the selector into the selector list
s
- the selector (set atr. op. value)public void removeSelector(Selector s)
Drop the selector of the list selectors
s
- the selector (set atr. op. value)public void removeSelectorAtributo(int atributo)
Removes the selectors that have the attribute given as argument from the proper list
atributo
- given attribute.public void clear()
Cleans the list
public Selector getSelector(int indice)
Return a selector in one position by giving a complex
indice
- Position inside the complexpublic int size()
Return the size complex
public int getNClases()
Return the number of classes
public int getClase()
Return the class that define the complex
public void setClase(int clase)
Gives the value of the class to the complex
clase
- int The classpublic void calculaLaplaciano()
public boolean reglaCubreInstancia(Instance instancia)
instancia
- given instance.public boolean cubre(Muestra m)
m
- given sample.public double getHeuristica()
return the heuristic value of the complex
public void setHeuristica(double heu)
Assign a heuristic value (Wracc) to the complex
heu
- heuristic valuepublic void borraDistrib()
reset the distribution value for the complex
public void incrementaDistrib(int clase)
Add one to the n of the complex for the class
clase
- int value of the classpublic int getDistribucionClase(int clase)
Return the value of the distribution
clase
- int index of the classpublic int[] getDistribucion()
Return the value of the distribution
public void print(int nominal)
Print the content of the complex (List->Attribute operator value)
nominal
- if 0 is nominal.public java.lang.String printString(int nominal, double inf, double sup, boolean ultima)
nominal
- indicate if the attribute is nominal(0) or numeric(1).inf
- initial value of the intervalsup
- end value of the intervalultima
- indicates if it is the last rule of the set.public void printDistribucion()
Print the classes distribution for the complex
public java.lang.String printDistribucionString()
Print the classes distribution for the complex
public void adjuntaNombreAtributos(java.lang.String[] atributos)
Local copy of the name of variables
atributos
- String[] stores the name of the variables