public class GiniIndex extends WeightedFilterApproach
This java class is used to implement the Gini index method.
Author:
Sina Tabakhi
See Also:
  • Constructor Details

    • GiniIndex

      public GiniIndex(Object... arguments)
      Initializes the parameters
      Parameters:
      arguments - array of parameters contains (sizeSelectedFeatureSubset) in which sizeSelectedFeatureSubset 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 dataset
      indexEnd - 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 class FeatureSelection