Class FeatureSelection

java.lang.Object
unifeat.featureSelection.FeatureSelection
Direct Known Subclasses:
EmbeddedApproach, FeatureWeighting, FilterApproach, HybridApproach, WrapperApproach

public abstract class FeatureSelection extends Object
The abstract class contains the main methods and fields that are used in all feature selection methods.
Author:
Sina Tabakhi
  • Field Details

    • trainSet

      protected double[][] trainSet
    • numFeatures

      protected int numFeatures
    • numClass

      protected int numClass
    • selectedFeatureSubset

      protected int[] selectedFeatureSubset
    • numSelectedFeature

      protected int numSelectedFeature
  • Constructor Details

    • FeatureSelection

      public FeatureSelection()
      Initializes the parameters
  • Method Details

    • loadDataSet

      public void loadDataSet(DatasetInfo ob)
      Loads the dataset
      Parameters:
      ob - an object of the DatasetInfo class
    • loadDataSet

      public void loadDataSet(double[][] data, int numFeat, int numClasses)
      Loads the dataset
      Parameters:
      data - the input dataset values
      numFeat - the number of features in the dataset
      numClasses - the number of classes in the dataset
    • evaluateFeatures

      public abstract void evaluateFeatures()
      Starts the feature selection process by a given method
    • validate

      public String validate()
      This method returns the potential errors in the input parameters.
      Returns:
      a string contains the information about incorrect parameters
    • setNumSelectedFeature

      public void setNumSelectedFeature(int numSelectedFeature)
      This method sets the number of features that should be selected by a given feature selection method.
      Parameters:
      numSelectedFeature - the number of selected features
    • getSelectedFeatureSubset

      public int[] getSelectedFeatureSubset()
      This method returns the subset of selected features by a given feature selection method.
      Returns:
      an array of subset of selected features