public class example_set
extends java.lang.Object
Encodes a set of examples (including information about if the example is covered by a rule, the coverage degree, ...).
Modifier and Type | Field and Description |
---|---|
static double |
MISSING
Encodes a set of examples (including information about if the example is covered by a rule, the coverage degree, ...)
|
Modifier and Type | Method and Description |
---|---|
double |
CoverageDegree(int i)
Returns the coverage degree for the example in position "i" of the set
|
vectordouble |
Data(int ejemplo)
Returns the values for all the variables in the example in position "ejemplo" in the set of examples
|
double |
Data(int ejemplo,
int variable)
Returns the value for variable "variable" in the example in position "ejemplo" in the set of examples
|
void |
Examples_per_Class(int VarClass,
int particion,
int nclasses,
int[] n_examples_in_class)
Calculates the number of examples per class in the problem
|
example_set |
Extract_Test_Set(int particion)
Returns the subset of examples belonging to the partition "particion"
|
example_set |
Extract_Training_Set(int particion)
Returns the subset of examples belonging to the partition "particion"
|
boolean |
Is_Covered(int i)
Returns if the example in position "i" is covered
|
boolean |
Is_Test_Example(int ejemplo,
int particion)
Returns if the example in position "ejemplo" belongs to the partition "particion"
|
boolean |
Is_Training_Example(int ejemplo,
int particion)
Returns if the example in position "ejemplo" belongs to the partition "particion"
|
void |
Mark(int[] v,
int tama)
Marks the examples in "v" as covered and set their coverage degree to 1
|
void |
Mark(int[] v,
int tama,
double[] grado)
Marks the examples in "v" as covered and set their coverage degree to the one in "grado"
|
int |
N_Examples()
Returns the number of examples in the set
|
int |
N_Partitions()
Returns the number of partitions forming the set of examples
|
int |
N_Variables()
Returns the number of variables of the problem
|
int |
Not_Covered_Examples()
Returns the number of examples not covered
|
int |
Not_Covered_Training_Example(int particion)
Returns the number of examples not covered belonging to the partition "particion"
|
void |
Remove(int[] v,
int tama)
Removes the examples in "v" from the set of examples
|
int |
Test_Example(int particion)
Returns the number of examples belonging to the partition "particion"
|
int |
Training_Example(int particion)
Returns the number of examples belonging to the partition "particion"
|
void |
UnMark(int[] v,
int tama)
Marks the examples in "v" as uncovered and set their coverage degree to -1
|
void |
UnMark(int[] v,
int tama,
double[] grado)
Marks the examples in "v" as uncovered and set their coverage degree to the negative value for the one in "grado"
|
void |
UnMarkAll()
Marks all the examples as uncovered and set their coverage degree to 0
|
public static final double MISSING
Encodes a set of examples (including information about if the example is covered by a rule, the coverage degree, ...)
public double Data(int ejemplo, int variable)
Returns the value for variable "variable" in the example in position "ejemplo" in the set of examples
ejemplo
- int The position of the example in the set of examplesvariable
- int The variable of the examplepublic vectordouble Data(int ejemplo)
Returns the values for all the variables in the example in position "ejemplo" in the set of examples
ejemplo
- int The position of the example in the set of examplespublic int N_Examples()
Returns the number of examples in the set
public int N_Partitions()
Returns the number of partitions forming the set of examples
public boolean Is_Training_Example(int ejemplo, int particion)
Returns if the example in position "ejemplo" belongs to the partition "particion"
ejemplo
- int The position of the exampleparticion
- int The number of partitionpublic boolean Is_Test_Example(int ejemplo, int particion)
Returns if the example in position "ejemplo" belongs to the partition "particion"
ejemplo
- int The position of the exampleparticion
- int The number of partitionpublic int Training_Example(int particion)
Returns the number of examples belonging to the partition "particion"
particion
- int The number of partitionpublic int Test_Example(int particion)
Returns the number of examples belonging to the partition "particion"
particion
- int The number of partitionpublic int Not_Covered_Training_Example(int particion)
Returns the number of examples not covered belonging to the partition "particion"
particion
- int The number of partitionpublic int Not_Covered_Examples()
Returns the number of examples not covered
public void Examples_per_Class(int VarClass, int particion, int nclasses, int[] n_examples_in_class)
Calculates the number of examples per class in the problem
VarClass
- int The number of classes in the rule setparticion
- int The partition numbernclasses
- int The number of clasess in the problemn_examples_in_class
- int[] Keeps the number of examples per classpublic int N_Variables()
Returns the number of variables of the problem
public void Remove(int[] v, int tama)
Removes the examples in "v" from the set of examples
v
- int[] Positions of the examples to be removed from the set of examplestama
- int Number of examples to be removedpublic void Mark(int[] v, int tama)
Marks the examples in "v" as covered and set their coverage degree to 1
v
- int[] Positions of the examples to be marked in the set of examplestama
- int Number of examples to be markedpublic void Mark(int[] v, int tama, double[] grado)
Marks the examples in "v" as covered and set their coverage degree to the one in "grado"
v
- int[] Positions of the examples to be marked in the set of examplestama
- int Number of examples to be markedgrado
- double[] The coverage degrees for the examples to be markedpublic void UnMark(int[] v, int tama)
Marks the examples in "v" as uncovered and set their coverage degree to -1
v
- int[] Positions of the examples to be marked in the set of examplestama
- int Number of examples to be markedpublic void UnMark(int[] v, int tama, double[] grado)
Marks the examples in "v" as uncovered and set their coverage degree to the negative value for the one in "grado"
v
- int[] Positions of the examples to be marked in the set of examplestama
- int Number of examples to be markedgrado
- double[] The coverage degrees for the examples to be markedpublic void UnMarkAll()
Marks all the examples as uncovered and set their coverage degree to 0
public boolean Is_Covered(int i)
Returns if the example in position "i" is covered
i
- int The position of the example in the setpublic double CoverageDegree(int i)
Returns the coverage degree for the example in position "i" of the set
i
- int The position of the example in the setpublic example_set Extract_Training_Set(int particion)
Returns the subset of examples belonging to the partition "particion"
particion
- int The number of partitionpublic example_set Extract_Test_Set(int particion)
Returns the subset of examples belonging to the partition "particion"
particion
- int The number of partition