public class HeterDisc extends Discretizer
This class implements the Heter-Disc discretizer
Modifier and Type | Class and Description |
---|---|
class |
HeterDisc.DiscretizationScheme
This class lets to manipulate discretization schemes
|
classOfInstances, cutPoints, iClassIndex, realAttributes, realValues
Constructor and Description |
---|
HeterDisc()
Constructor of the class
|
Modifier and Type | Method and Description |
---|---|
double |
computeCriterionFuction(int[] selectedp,
int ni,
int attribute)
It computes and returns the value of criterion function of the discretization scheme build with selectedp cutpoints
|
double |
computeHeterCCPV(double[] ccpv)
It computes the heterogeneity for a conditional class probability vector given needed for compute
the heterogeneity of a discretization scheme in criterion fuction calculus
|
void |
CreateQuantaMatrix(int ni,
int attribute,
int[] selected)
It creates the quanta matrix basis of selected cutpoints array
|
protected java.util.Vector |
discretizeAttribute(int attribute,
int[] values,
int begin,
int end)
Returns a vector with the discretized values
|
void |
generateNeighborhood(HeterDisc.DiscretizationScheme ds,
int ni,
int attribute,
double GlobalOpt)
It generates the neighborhood of ds scheme discretization and adds each neighbor to variable GD
|
applyDiscretization, buildCutPoints, discretize, getCutPoint, getNumIntervals, sortValues
protected java.util.Vector discretizeAttribute(int attribute, int[] values, int begin, int end)
Returns a vector with the discretized values
discretizeAttribute
in class Discretizer
attribute
- index of the attribute to discretizevalues
- vector of indexes of the instances sorted from lowest to highest value of attributebegin
- index of the instance with the lowest value of attributeend
- index of the instance with the highest value of attributepublic void generateNeighborhood(HeterDisc.DiscretizationScheme ds, int ni, int attribute, double GlobalOpt)
It generates the neighborhood of ds scheme discretization and adds each neighbor to variable GD
ds
- discretization scheme to generate its neighborhoodni
- number of intervals of the neighbors discretizationsattribute
- index of the attribute to discretizeGlobalOpt
- fitness of the best discretization scheme foundpublic double computeCriterionFuction(int[] selectedp, int ni, int attribute)
It computes and returns the value of criterion function of the discretization scheme build with selectedp cutpoints
selectedp
- indexes of selected cutpointsni
- number of intervalsattribute
- index of the attributepublic double computeHeterCCPV(double[] ccpv)
It computes the heterogeneity for a conditional class probability vector given needed for compute the heterogeneity of a discretization scheme in criterion fuction calculus
ccpv
- conditional class probability vectorpublic void CreateQuantaMatrix(int ni, int attribute, int[] selected)
It creates the quanta matrix basis of selected cutpoints array
ni
- number of intervalsattribute
- index of the attributeselected
- vector with indexes of selected cut-points