Class GiniIndex
java.lang.Object
unifeat.featureSelection.FeatureSelection
unifeat.featureSelection.FeatureWeighting
unifeat.featureSelection.filter.WeightedFilterApproach
unifeat.featureSelection.filter.supervised.GiniIndex
This java class is used to implement the Gini index method.
- Author:
- Sina Tabakhi
- See Also:
-
Field Summary
Fields inherited from class unifeat.featureSelection.FeatureWeighting
featureValues
Fields inherited from class unifeat.featureSelection.FeatureSelection
numClass, numFeatures, numSelectedFeature, selectedFeatureSubset, trainSet
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate double
computeGini
(int indexStart, int indexEnd) Computes the gini value of the data given by start and end indicesvoid
Starts the feature selection process by Gini index(GI) methodMethods inherited from class unifeat.featureSelection.filter.WeightedFilterApproach
newMethod
Methods inherited from class unifeat.featureSelection.FeatureWeighting
getFeatureValues
Methods inherited from class unifeat.featureSelection.FeatureSelection
getSelectedFeatureSubset, loadDataSet, loadDataSet, setNumSelectedFeature, validate
-
Constructor Details
-
GiniIndex
Initializes the parameters- Parameters:
arguments
- array of parameters contains (sizeSelectedFeatureSubset
) in whichsizeSelectedFeatureSubset
is the number of selected features
-
GiniIndex
public GiniIndex(int sizeSelectedFeatureSubset) Initializes the parameters- Parameters:
sizeSelectedFeatureSubset
- the number of selected features
-
-
Method Details
-
computeGini
private double computeGini(int indexStart, int indexEnd) Computes the gini value of the data given by start and end indices- Parameters:
indexStart
- the start index of the datasetindexEnd
- the end index of the dataset- Returns:
- the gini value
-
evaluateFeatures
public void evaluateFeatures()Starts the feature selection process by Gini index(GI) method- Specified by:
evaluateFeatures
in classFeatureSelection
-