public class MRMR extends FilterApproach
This java class is used to implement the minimal redundancy maximal relevance (mRMR) method.
Author:
Sina Tabakhi
See Also:
  • Field Details

    • probFeature

      private double[][] probFeature
    • valuesFeature

      private double[][] valuesFeature
  • Constructor Details

    • MRMR

      public MRMR(Object... arguments)
      Initializes the parameters
      Parameters:
      arguments - array of parameters contains (sizeSelectedFeatureSubset) in which sizeSelectedFeatureSubset is the number of selected features
    • MRMR

      public MRMR(int sizeSelectedFeatureSubset)
      Initializes the parameters
      Parameters:
      sizeSelectedFeatureSubset - the number of selected features
  • Method Details

    • computeNumValue

      private int computeNumValue(int index)
      Computes the number of different values of each feature
      Parameters:
      index - the index of the feature
      Returns:
      the number of different values
    • computeDifferentValue

      private void computeDifferentValue(int index)
      Saves the different values of each feature
      Parameters:
      index - the index of the feature
    • computeProbFeat

      private void computeProbFeat(int index)
      Computes the probabilities values of each feature
      Parameters:
      index - the index of the feature
    • computeJointProb

      private double[] computeJointProb(int indexFeat2, int indexStartData, int indexEndData)
      Computes the joint probabilities values between two features
      Parameters:
      indexFeat2 - the index of the second feature
      indexStartData - the start index of the dataset
      indexEndData - the end index of the dataset
      Returns:
      an array of the joint probabilities values
    • computeMutualInfo

      private double computeMutualInfo(int index1, int index2)
      Computes the mutual information values between two features
      Parameters:
      index1 - the index of the first feature
      index2 - the index of the second feature
      Returns:
      the mutual information value
    • findMaxWithIndex

      private int findMaxWithIndex(double[] array)
      Finds the maximum value in the array and returns its index
      Parameters:
      array - the input array
      Returns:
      the index of the maximum value in the array
    • isSelectedFeature

      private boolean isSelectedFeature(int index, int currentSize)
      Checks that is the current feature (index) available in the subset of selected feature
      Parameters:
      index - the index of the feature
      currentSize - the current size of the selected features subset
      Returns:
      true if the current feature has been selected
    • evaluateFeatures

      public void evaluateFeatures()
      Starts the feature selection process by minimal redundancy maximal relevance (mRMR) method
      Specified by:
      evaluateFeatures in class FeatureSelection