public class HyperrectangleSet
extends java.lang.Object
Structure to store a set of hyperrectangle.
| Constructor and Description |
|---|
HyperrectangleSet(Hyperrectangle[] setv,
int atributos,
int ndatos,
int utiles,
double delta)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
adjustFeatureWeights(double[] example,
int H)
Adjust the weights of the attributes
|
int[] |
distance(double[] example)
Calculates the two lowest distances of the example to two hyperrectangles
|
Hyperrectangle |
getHyperrectangle(int indice)
Returns a hyperrectangles of the set
|
double[] |
getWeightAttributes()
Return the weight for each attribute
|
java.lang.String |
printWeightsAtributes(java.lang.String[] nombreAtributos)
Returns on a string the name and its weight of each attribute
|
void |
setWeightAtrib(double[] weight) |
void |
store_in_memory(Hyperrectangle H)
Stores in memory the new hyperrectangle
|
public HyperrectangleSet(Hyperrectangle[] setv, int atributos, int ndatos, int utiles, double delta)
Constructor
setv - a vector that contains the hyperrectanglesatributos - the number of attributes of the set of datandatos - the number of data of train setutiles - the actual number of hyperrectanglesdelta - parameter to adjust the weight of the attributespublic void setWeightAtrib(double[] weight)
public double[] getWeightAttributes()
Return the weight for each attribute
public void store_in_memory(Hyperrectangle H)
Stores in memory the new hyperrectangle
public void adjustFeatureWeights(double[] example,
int H)
Adjust the weights of the attributes
example - the associated instanceH - the index in the set of the hyperrectangle associatedpublic int[] distance(double[] example)
Calculates the two lowest distances of the example to two hyperrectangles
example - the instancepublic Hyperrectangle getHyperrectangle(int indice)
Returns a hyperrectangles of the set
indice - position in the setpublic java.lang.String printWeightsAtributes(java.lang.String[] nombreAtributos)
Returns on a string the name and its weight of each attribute