feature_filtering
Class EntropyBasedFiltering

java.lang.Object
  extended by feature_filtering.AbstractFeatureFiltering
      extended by feature_filtering.EntropyBasedFiltering

public class EntropyBasedFiltering
extends AbstractFeatureFiltering

This class is used for entropy-based filtering.

Author:
Eleftherios Spyromitros-Xioufis

Field Summary
private  weka.core.Instances descriptorDatasetFormat
          The format of the dataset used to create the filter.
private  weka.filters.unsupervised.attribute.Discretize discretizationFilter
          The discretization filter to use.
static double[] percentiles
          Percentile values for which thresholds have been pre-calculated.
private  double threshold
          The threshold to apply, i.e. features with lower entropy will be filtered.
static double[] thresholds
          Corresponding thresholds for the percentiles above.
 
Constructor Summary
EntropyBasedFiltering(java.lang.String serializedFilterFileName, java.lang.String serializedInstancesFileName, double percentage)
          Constructor
 
Method Summary
protected  java.util.ArrayList<double[]> filterInternal(java.util.ArrayList<double[]> descriptors)
          Subclasses should provide the implementation.
protected  double[][] filterInternal(double[][] descriptors)
          Subclasses should provide the implementation.
private  void setDescriptorDatasetFormat(java.lang.String serializedInstancesFile)
           
private  void setDiscretizationFilter(java.lang.String serializedFilterFile)
           
 
Methods inherited from class feature_filtering.AbstractFeatureFiltering
calculatePercentileValuesEntropy, calculatePercentileValuesVariance, entropyCalculation, filter, filter, main, varianceCalculation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

percentiles

public static double[] percentiles
Percentile values for which thresholds have been pre-calculated.


thresholds

public static double[] thresholds
Corresponding thresholds for the percentiles above.


discretizationFilter

private weka.filters.unsupervised.attribute.Discretize discretizationFilter
The discretization filter to use.


descriptorDatasetFormat

private weka.core.Instances descriptorDatasetFormat
The format of the dataset used to create the filter. This format is the same for all methods, it is the format of a dataset with the descriptors.


threshold

private double threshold
The threshold to apply, i.e. features with lower entropy will be filtered.

Constructor Detail

EntropyBasedFiltering

public EntropyBasedFiltering(java.lang.String serializedFilterFileName,
                             java.lang.String serializedInstancesFileName,
                             double percentage)
                      throws java.lang.Exception
Constructor

Parameters:
serializedFilterFileName - a serialized filter object
serializedInstancesFileName - a serialized instances object
percentage - the threshold
Throws:
java.lang.Exception
Method Detail

filterInternal

protected double[][] filterInternal(double[][] descriptors)
                             throws java.lang.Exception
Description copied from class: AbstractFeatureFiltering
Subclasses should provide the implementation.

Specified by:
filterInternal in class AbstractFeatureFiltering
Returns:
the filtered features
Throws:
java.lang.Exception

filterInternal

protected java.util.ArrayList<double[]> filterInternal(java.util.ArrayList<double[]> descriptors)
                                                throws java.lang.Exception
Description copied from class: AbstractFeatureFiltering
Subclasses should provide the implementation.

Specified by:
filterInternal in class AbstractFeatureFiltering
Returns:
the filtered features
Throws:
java.lang.Exception

setDescriptorDatasetFormat

private void setDescriptorDatasetFormat(java.lang.String serializedInstancesFile)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

setDiscretizationFilter

private void setDiscretizationFilter(java.lang.String serializedFilterFile)
                              throws java.lang.Exception
Throws:
java.lang.Exception