public class Complejo
extends java.lang.Object
implements java.lang.Comparable
Define a complex or a rule, stores selectors
Constructor and Description |
---|
Complejo()
Default constructor.
|
Complejo(int nClas)
Constructor for the complex
|
Modifier and Type | Method and Description |
---|---|
void |
addSelector(Selector s)
Add the selector to the list
|
void |
adjuntaNombreAtributos(java.lang.String[] atributos)
Do a local copy of the name of the in-put variables
|
void |
borraDistrib()
Reset the value of the distribution for the complex
|
void |
calculaLaplaciano()
Calculate the LaPlaces's value for a complex
|
void |
clear()
Leaves the list empty
|
int |
compareTo(java.lang.Object o)
Compare two objects of the Complex class
|
boolean |
cubre(Muestra m)
Check if the complex gets the given data
|
boolean |
esIgual(Complejo c)
Check is two complex are equals
|
int |
getClase()
Returns the class that defines the comples
|
int[] |
getDistribucion()
Returns the value of the distribution
|
int |
getDistribucionClase(int clase)
Returns the value of the distribution for a given class
|
double |
getHeuristica()
Returns the heuristic value if the complex
|
int |
getNClases()
Returns the number of classes of the problem
|
Selector |
getSelector(int indice)
Returns the selector in a position given the complex
|
void |
incrementaDistrib(int clase)
Adds 1 to the n of the example for the class 'clase' matched for the example
|
void |
print()
Prints on the screen the content of the complex(Lista -> Attribute operator value)
|
void |
printDistribucion()
Prints on screen the distribution of the classes for the complex
|
java.lang.String |
printDistribucionString()
prints on a string the distribution of the classes for the complex
|
java.lang.String |
printString()
Prints on a string the content of the complex(List -> Attribute operator value)
|
boolean |
reglaCubreInstancia(Instance instancia)
Checks if the rule gets the parameter instance
|
void |
removeSelector(Selector s)
Remove the selector from the list
|
void |
removeSelectorAtributo(int atributo)
Remove the selectors from the list of the selectors that have the parameter attribute
o
|
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()
Returns the size of the complex
|
public Complejo()
public Complejo(int nClas)
Constructor for the complex
nClas
- int Number of classespublic int compareTo(java.lang.Object o)
Compare two objects of the Complex class
compareTo
in interface java.lang.Comparable
o
- Object Complex to comparepublic boolean esIgual(Complejo c)
Check is two complex are equals
c
- Complejo the complex to comparepublic void addSelector(Selector s)
Add the selector to the list
s
- Selector the selectorpublic void removeSelector(Selector s)
Remove the selector from the list
s
- Selector The selectorpublic void removeSelectorAtributo(int atributo)
Remove the selectors from the list of the selectors that have the parameter attribute
oatributo
- the attributepublic void clear()
Leaves the list empty
public Selector getSelector(int indice)
Returns the selector in a position given the complex
indice
- int Podition inside the complexpublic int size()
Returns the size of the complex
public int getNClases()
Returns the number of classes of the problem
public int getClase()
Returns the class that defines the comples
public void setClase(int clase)
Gives the value of the class to the complex
clase
- int the classpublic void calculaLaplaciano()
Calculate the LaPlaces's value for a complex
public boolean reglaCubreInstancia(Instance instancia)
Checks if the rule gets the parameter instance
instancia
- the instancepublic boolean cubre(Muestra m)
Check if the complex gets the given data
m
- Muestra The examplepublic double getHeuristica()
Returns the heuristic value if the complex
public void setHeuristica(double heu)
Assign a heuristic value(Wracc) to the complex
heu
- double the heuristic valuepublic void borraDistrib()
Reset the value of the distribution for the complex
public void incrementaDistrib(int clase)
Adds 1 to the n of the example for the class 'clase' matched for the example
clase
- int El valor de la clasepublic int getDistribucionClase(int clase)
Returns the value of the distribution for a given class
clase
- int The index of the classpublic int[] getDistribucion()
Returns the value of the distribution
public void print()
Prints on the screen the content of the complex(Lista -> Attribute operator value)
public java.lang.String printString()
Prints on a string the content of the complex(List -> Attribute operator value)
public void printDistribucion()
Prints on screen the distribution of the classes for the complex
public java.lang.String printDistribucionString()
prints on a string the distribution of the classes for the complex
public void adjuntaNombreAtributos(java.lang.String[] atributos)
Do a local copy of the name of the in-put variables
atributos
- String[] Stores the name of the variables