Class WrapperApproach

java.lang.Object
unifeat.featureSelection.FeatureSelection
unifeat.featureSelection.wrapper.WrapperApproach
Direct Known Subclasses:
BasicACO, BasicGA, BasicPSO

public abstract class WrapperApproach extends FeatureSelection
The abstract class contains the main methods and fields that are used in all wrapper-based feature selection methods.
Author:
Sina Tabakhi
See Also:
  • Field Details

    • nameFeatures

      protected String[] nameFeatures
    • classLabel

      protected String[] classLabel
    • PROJECT_PATH

      protected final String PROJECT_PATH
    • TEMP_PATH

      protected final String TEMP_PATH
  • Constructor Details

    • WrapperApproach

      public WrapperApproach(String path)
      Initializes the parameters
      Parameters:
      path - the path of the project
  • Method Details

    • loadDataSet

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

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

      protected int[] originalFeatureSet()
      This method creates an array of indices of features and returns it.
      Returns:
      an array of features indices
    • newMethod

      public static WrapperApproach newMethod(WrapperType type, Object... arguments)
      This method creates new object from one of the classes that has been inherited from the WrapperApproach class according to type of the feature selection method.
      Parameters:
      type - type of the wrapper feature selection method
      arguments - a list of arguments that is applied in the feature selection method
      Returns:
      the created object that has been inherited from the WrapperApproach class