Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

meapsoft.FeatFile Class Reference

Inheritance diagram for meapsoft.FeatFile:

Inheritance graph
[legend]
Collaboration diagram for meapsoft.FeatFile:

Collaboration graph
[legend]
List of all members.

Detailed Description

Representation of a MEAPsoft segment/feature file.

Author:
Ron Weiss ([email protected])

Definition at line 40 of file FeatFile.java.

Public Methods

double[][] getFeatures ()
 Get a matrix (2D double array) of all of the features in all of the chunks contained in this file.

double[][] getFeatures (int[] featdim)
 Get a matrix (2D double array) of all of the features in all of the chunks contained in this file.

int[] getFeatureLengths ()
 Return the number of elements in each feature.

void normalizeFeatures ()
 Normalize the features contained in this file such that the feature dimensions corresponding to the outputs of each FeatureExtractor are normalized independently to lie between 0 and 1.

void applyFeatureWeights ()
 Apply weights (as listed in the "# Features: x.x*FeatureExtractor(ndim)" line ) to the features contained in this file.

void readFile () throws IOException, ParserException
 Read in a feature file.

void clearChunks ()
 Remove any chunks in this file.

void clearFeatures ()
 Remove the features of all chunks in this file.

Object clone ()
 Clone this FeatFile.

boolean isCompatibleWith (FeatFile f)
 Check if another FeatFile is compatible with this one.


Protected Methods

void write (Writer w) throws IOException
 Write the contents of this FeatFile.


Member Function Documentation

int [] meapsoft.FeatFile.getFeatureLengths   [inline]
 

Return the number of elements in each feature.

i.e. for AvgMelSpec (0-39) and AvgChroma (40-51) we return [40, 12]

Definition at line 119 of file FeatFile.java.

double [][] meapsoft.FeatFile.getFeatures int    featdim[] [inline]
 

Get a matrix (2D double array) of all of the features in all of the chunks contained in this file.

Each row corresponds to a single feature vector. Index it as you would in Matlab ([row][column] = [chunk][featdim]).

Reimplemented in meapsoft.EDLFile.

Definition at line 88 of file FeatFile.java.

References meapsoft.FeatChunk.getFeatures().

double [][] meapsoft.FeatFile.getFeatures   [inline]
 

Get a matrix (2D double array) of all of the features in all of the chunks contained in this file.

Each row corresponds to a single feature vector. Index it as you would in Matlab ([row][column] = [chunk][featdim]).

Reimplemented in meapsoft.EDLFile.

Definition at line 77 of file FeatFile.java.

Referenced by meapsoft.FeatFile.normalizeFeatures().

boolean meapsoft.FeatFile.isCompatibleWith FeatFile    f [inline]
 

Check if another FeatFile is compatible with this one.

Two feature files are said to be incompatible if they contain different features.

Definition at line 374 of file FeatFile.java.

References meapsoft.FeatFile.featureDescriptions.

void meapsoft.FeatFile.normalizeFeatures   [inline]
 

Normalize the features contained in this file such that the feature dimensions corresponding to the outputs of each FeatureExtractor are normalized independently to lie between 0 and 1.

I.e. if this featfile contains outputs of both AvgMelSpec (dim 0-39) and AvgChroma (dim 40-51), dimensions 0-39 will be normalized independently of dimensions 40-51 and vice versa.

Definition at line 142 of file FeatFile.java.

References meapsoft.FeatChunk.getFeatures(), meapsoft.FeatFile.getFeatures(), and meapsoft.FeatChunk.setFeature().

Referenced by meapsoft.FeatExtractor.processFeatFile().


Member Data Documentation

final Pattern meapsoft.FeatFile.commentPattern [static, protected]
 

Initial value:

 Pattern.compile(
        "#\\.*")

Definition at line 50 of file FeatFile.java.

final Pattern meapsoft.FeatFile.featDescPattern [static, protected]
 

Initial value:

 Pattern.compile(
        "^#\\s*Features:\\s*")

Definition at line 55 of file FeatFile.java.

final Pattern meapsoft.FeatFile.linePattern [static, protected]
 

Initial value:

 Pattern.compile(
        "\\s*([^#\\s]+)\\s*")

Definition at line 52 of file FeatFile.java.


The documentation for this class was generated from the following file:
Generated on Tue Feb 6 19:02:29 2007 for MEAPsoft by doxygen1.2.18