|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectjAudioFeatureExtractor.Aggregators.Aggregator
public abstract class Aggregator
Aggregator is an interface for specifying the mechanism for collapsing frame-by-frame features into per-file data. There exists two types of aggregators - specific aggregators and generic aggregators.
Generic aggregators aggregate for each feature (seperately) that is to be saved and should override init and setSource methods. Specific aggregators can aggregate any number of features, but these features must be specified in advance.
Field Summary | |
---|---|
static java.lang.String |
LINE_SEP
Convenience variable containing the end of line characters for this system. |
Constructor Summary | |
---|---|
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. |
protected int |
calculateOffset(double[][][] values,
int[] featureList)
|
java.lang.Object |
clone()
Create a new aggregator of the same class |
protected int[][] |
collapseFeatures(double[][][] values,
int[] indecis)
|
AggregatorDefinition |
getAggregatorDefinition()
Returns a description of this instantiation of this class of aggregator |
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. |
double[] |
getResults()
Returns the results in a double array (more useful for embedding than an XML pipe solution). |
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 |
outputACEFeatureKeyEntries(java.io.DataOutputStream output)
Output the feature definition entry (for an ACE feature definition file) for this particular instantiation of the aggreagtor. |
void |
outputACEValueEntries(java.io.DataOutputStream output)
Output the data definition entries of a the ACE format |
void |
outputARFFHeaderEntries(java.io.DataOutputStream output)
Output the header entries of a Weka ARFF file. |
void |
outputARFFValueEntries(java.io.DataOutputStream output)
Output the data in the ARFF body. |
void |
setParameters(java.lang.String[] featureNames,
java.lang.String[] params)
Set parameters of the aggregator to the given values. |
void |
setSource(FeatureExtractor feature)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LINE_SEP
Constructor Detail |
---|
public Aggregator()
Method Detail |
---|
public java.lang.String[] getFeaturesToApply()
public java.lang.String[] getParamaters()
public java.lang.Object clone()
clone
in class java.lang.Object
public FeatureDefinition getFeatureDefinition()
public AggregatorDefinition getAggregatorDefinition()
public void init(int[] featureIndecis) throws java.lang.Exception
source
- FeatureExtractor references used for this instantiationfeatureIndecis
- Indecis of these features in the array passed in aggregate
java.lang.Exception
- if either parameter is null, of dicffering lengths, or
contain invalid index values.public void setSource(FeatureExtractor feature)
public void aggregate(double[][][] values) throws java.lang.Exception
values
- complete array of the extracted features. Indecis are window,
feature, and then feature value.
java.lang.Exception
public void outputACEFeatureKeyEntries(java.io.DataOutputStream output) throws java.lang.Exception
output
- output stream to be used.
java.lang.Exception
public void outputACEValueEntries(java.io.DataOutputStream output) throws java.lang.Exception
output
- stream to write the data to
java.lang.Exception
public void outputARFFHeaderEntries(java.io.DataOutputStream output) throws java.lang.Exception
output
- stream to write the data to
java.lang.Exception
public void outputARFFValueEntries(java.io.DataOutputStream output) throws java.lang.Exception
output
-
java.lang.Exception
public void setParameters(java.lang.String[] featureNames, java.lang.String[] params) throws java.lang.Exception
featureNames
- strings matching features for specific aggregation.params
- strings that can be cast by toString to the appropriate parameter types.
exceptions
- for a number of format or null entry conditions (see above).
java.lang.Exception
protected int calculateOffset(double[][][] values, int[] featureList)
protected int[][] collapseFeatures(double[][][] values, int[] indecis)
public double[] getResults()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |