jAudioFeatureExtractor.Aggregators
Class MultipleFeatureHistogram

java.lang.Object
  extended by jAudioFeatureExtractor.Aggregators.Aggregator
      extended by jAudioFeatureExtractor.Aggregators.MultipleFeatureHistogram

public class MultipleFeatureHistogram
extends Aggregator

Multiple Fetaure Histogram

This specific algorithm correlates different feature dimensions provided, binning them into equal bins relative to each feature's range. The resulting feature set, similar to the area method of moments, captures cross-feature information. However, this feature uses an extremely large feature set that grows exponentially with the number of features added. On the positive side, the order of the features is irrelevant to its performance.

Histogram Binning History

First used in 2000, it was not formally published until McEnnis and Fujinaga 2005.

Author:
Daniel McEnnis

Field Summary
 
Fields inherited from class jAudioFeatureExtractor.Aggregators.Aggregator
LINE_SEP
 
Constructor Summary
MultipleFeatureHistogram()
          Constructs a new aggregator.
MultipleFeatureHistogram(java.lang.String[] fe, int bins)
          Constructs a fully functional aggregator.
 
Method Summary
 void aggregate(double[][][] values)
          Aggregates the values of the features specified by the init function accross all windows of the data recieved.
 java.lang.Object clone()
          Create a new aggregator of the same class
 FeatureDefinition getFeatureDefinition()
          Description of a particular instantiation of an aggregate.
 java.lang.String[] getFeaturesToApply()
          Provide a list of features that are to be aggregated by this feature.
 java.lang.String[] getParamaters()
          Provide a list of the values of all parameters this aggregator uses.
 void init(int[] featureIndecis)
          Specifies which Features are to be extracted and the index of these features in the values array that will passed into the aggregate function
 void setParameters(java.lang.String[] features, java.lang.String[] params)
          Set parameters of the aggregator to the given values.
 
Methods inherited from class jAudioFeatureExtractor.Aggregators.Aggregator
calculateOffset, collapseFeatures, getAggregatorDefinition, getResults, outputACEFeatureKeyEntries, outputACEValueEntries, outputARFFHeaderEntries, outputARFFValueEntries, setSource
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipleFeatureHistogram

public MultipleFeatureHistogram()
Constructs a new aggregator. This aggregator is not valid until it has a feature list set as a parameter.


MultipleFeatureHistogram

public MultipleFeatureHistogram(java.lang.String[] fe,
                                int bins)
Constructs a fully functional aggregator.

Method Detail

getParamaters

public java.lang.String[] getParamaters()
Description copied from class: Aggregator
Provide a list of the values of all parameters this aggregator uses. Aggregators without parameters return null.

Overrides:
getParamaters in class Aggregator
Returns:
list of the values of parmeters or null.

setParameters

public void setParameters(java.lang.String[] features,
                          java.lang.String[] params)
                   throws java.lang.Exception
Description copied from class: Aggregator
Set parameters of the aggregator to the given values. For specific aggregators, the feature list is non-null and references currently loaded features. Throws exception if the feature list is null or contains invalid entries only if the aggregator is specific. Otherwise it is ignored. If the number of given parameters is greater (but not neccessarily less) than the number of actual paramaters, or if the parameters are in the wrong format, an aggregator that uses parameters may throw an exception. Both null and zero length array imply no parameters, but only null guarantees an exception if a parameter is present.

Overrides:
setParameters in class Aggregator
Parameters:
features - strings matching features for specific aggregation.
params - strings that can be cast by toString to the appropriate parameter types.
Throws:
java.lang.Exception

aggregate

public void aggregate(double[][][] values)
               throws java.lang.Exception
Description copied from class: Aggregator
Aggregates the values of the features specified by the init function accross all windows of the data recieved.

Overrides:
aggregate in class Aggregator
Parameters:
values - complete array of the extracted features. Indecis are window, feature, and then feature value.
Throws:
java.lang.Exception

clone

public java.lang.Object clone()
Description copied from class: Aggregator
Create a new aggregator of the same class

Overrides:
clone in class Aggregator

getFeatureDefinition

public FeatureDefinition getFeatureDefinition()
Description copied from class: Aggregator
Description of a particular instantiation of an aggregate. This should not be called until after the specific features have been specified by the init function.

Overrides:
getFeatureDefinition in class Aggregator
Returns:
Feature Definition describing this instantiation of this aggregate object

getFeaturesToApply

public java.lang.String[] getFeaturesToApply()
Description copied from class: Aggregator
Provide a list of features that are to be aggregated by this feature. Returning null indicates that this aggregator accepts only one feature and every feature avaiable should be used.

Overrides:
getFeaturesToApply in class Aggregator
Returns:
list of features to be used by this aggregator or null

init

public void init(int[] featureIndecis)
          throws java.lang.Exception
Description copied from class: Aggregator
Specifies which Features are to be extracted and the index of these features in the values array that will passed into the aggregate function

Overrides:
init in class Aggregator
Parameters:
featureIndecis - Indecis of these features in the array passed in aggregate
Throws:
java.lang.Exception - if either parameter is null, of dicffering lengths, or contain invalid index values.