feature_filtering
Class AbstractFeatureFiltering

java.lang.Object
  extended by feature_filtering.AbstractFeatureFiltering
Direct Known Subclasses:
EntropyBasedFiltering, RandomFiltering, VarianceBasedFiltering

public abstract class AbstractFeatureFiltering
extends java.lang.Object

This abstract class is extended by all feature filtering methods that are based on the intrinsic feature structure.

Author:
Eleftherios Spyromitros-Xioufis

Constructor Summary
AbstractFeatureFiltering()
           
 
Method Summary
static double[] calculatePercentileValuesEntropy(double[] percentiles, java.lang.String dataset)
          Given an arff formatted dataset of !
static double[] calculatePercentileValuesVariance(double[] percentiles, java.lang.String dataset, boolean powerNormalization, boolean l2Normalization)
          Given an arff formatted dataset of continuous image features and a double array containing the desired percentiles, this method calculates an returns the variance values corresponding to these percentiles.
static double entropyCalculation(int[] values)
          Calculates and returns the entropy of the given feature (each value is considered an observation of the same discrete random variable).
 java.util.ArrayList<double[]> filter(java.util.ArrayList<double[]> features)
          Applies filtering and returns the filtered features.
 double[][] filter(double[][] features)
          Applies filtering and returns the filtered features as a 2-dimensional array.
protected abstract  java.util.ArrayList<double[]> filterInternal(java.util.ArrayList<double[]> features)
          Subclasses should provide the implementation.
protected abstract  double[][] filterInternal(double[][] features)
          Subclasses should provide the implementation.
static void main(java.lang.String[] args)
           
static double varianceCalculation(double[] values)
          Calculates and returns the variance of the given feature (each value is considered an observation of the same continuous random variable).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFeatureFiltering

public AbstractFeatureFiltering()
Method Detail

filter

public double[][] filter(double[][] features)
                  throws java.lang.Exception
Applies filtering and returns the filtered features as a 2-dimensional array.

Parameters:
features -
Returns:
the filtered features
Throws:
java.lang.Exception

filterInternal

protected abstract double[][] filterInternal(double[][] features)
                                      throws java.lang.Exception
Subclasses should provide the implementation.

Parameters:
features -
Returns:
the filtered features
Throws:
java.lang.Exception

filter

public java.util.ArrayList<double[]> filter(java.util.ArrayList<double[]> features)
                                     throws java.lang.Exception
Applies filtering and returns the filtered features.

Parameters:
features -
Returns:
the filtered features
Throws:
java.lang.Exception

filterInternal

protected abstract java.util.ArrayList<double[]> filterInternal(java.util.ArrayList<double[]> features)
                                                         throws java.lang.Exception
Subclasses should provide the implementation.

Parameters:
features -
Returns:
the filtered features
Throws:
java.lang.Exception

entropyCalculation

public static double entropyCalculation(int[] values)
Calculates and returns the entropy of the given feature (each value is considered an observation of the same discrete random variable).

Parameters:
values -
Returns:

varianceCalculation

public static double varianceCalculation(double[] values)
Calculates and returns the variance of the given feature (each value is considered an observation of the same continuous random variable).

Parameters:
values -
Returns:

calculatePercentileValuesEntropy

public static double[] calculatePercentileValuesEntropy(double[] percentiles,
                                                        java.lang.String dataset)
                                                 throws java.lang.Exception
Given an arff formatted dataset of !discretized! image features and a double array containing the desired percentiles, this method calculates an returns the entropy values corresponding to these percentiles.

Parameters:
percentiles - The percentiles that need to be calculated, e.g. double[] percentiles = { 0.8, 0.9, 0.95 };
dataset - An arff formatted dataset of !discretized! image features.
Returns:
The entropy values corresponding to the given percentiles.
Throws:
java.lang.Exception

calculatePercentileValuesVariance

public static double[] calculatePercentileValuesVariance(double[] percentiles,
                                                         java.lang.String dataset,
                                                         boolean powerNormalization,
                                                         boolean l2Normalization)
                                                  throws java.lang.Exception
Given an arff formatted dataset of continuous image features and a double array containing the desired percentiles, this method calculates an returns the variance values corresponding to these percentiles.

Parameters:
percentiles - The percentiles that need to be calculated, e.g. double[] percentiles = { 0.8, 0.9, 0.95 };
dataset - An arff formatted dataset of continuous image features.
powerNormalization - Whether to apply power-normalization on the features prior to calculation.
l2Normalization - Whether to apply L2-normalization on the features prior to calculation.
Returns:
The variance values corresponding to the given percentiles.
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception