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. |
|
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. |
|
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(). |
|
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(). |
|
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. |
|
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(). |
|
Initial value: Pattern.compile(
"#\\.*") Definition at line 50 of file FeatFile.java. |
|
Initial value: Pattern.compile(
"^#\\s*Features:\\s*") Definition at line 55 of file FeatFile.java. |
|
Initial value: Pattern.compile(
"\\s*([^#\\s]+)\\s*") Definition at line 52 of file FeatFile.java. |