marf.FeatureExtraction
Class FeatureExtractionAggregator

java.lang.Object
  extended bymarf.Storage.StorageManager
      extended bymarf.FeatureExtraction.FeatureExtraction
          extended bymarf.FeatureExtraction.FeatureExtractionAggregator
All Implemented Interfaces:
java.lang.Cloneable, IFeatureExtraction, IStorageManager, java.io.Serializable

public class FeatureExtractionAggregator
extends FeatureExtraction

This class by itself does not do any feature extraction, but instead allows concatenation of the results of several actual feature extractors to be combined in a single result. This should give the classification modules more descriminatory power (e.g. when combining the results of FFT and F0 together).

FeatureExtractionAggregator itself still implements the FeatureExtraction API in order to be used in the main pipeline of MARF.

The aggregator expects ModuleParams to be set to the enumeration constants of a module to be invoked followed by that module's enclosed instance ModuleParams. As of this implementation, that enclosed instance of ModuleParams isn't really used, so the main limitation of the aggregator is that all the aggregated feature extractors act with their default settings. This will happen until the pipeline is re-designed a bit to include this capability.

The aggregator clones the incoming preprocessed sample for each feature extractor and runs each module in a seaparate thread. A the end, the results of each tread are collected in the same order as specified by the initial ModuleParams and returned as a concatenated feature vector. Some meta-information is available if needed.

$Id: FeatureExtractionAggregator.java,v 1.5 2005/12/31 01:23:54 mokhov Exp $

Since:
0.3.0.5
Version:
$Revision: 1.5 $
Author:
Serguei Mokhov
See Also:
FFT, F0, ModuleParams, FeatureExtraction, Serialized Form

Nested Class Summary
 class FeatureExtractionAggregator.FeatureExtractionThread
          A feature extraction thread simply calls its concrete encapsulated feature extraction module and collects any results or errors from its run.
 
Field Summary
static java.lang.String ERR_AGGR_MODULES_FAILED
          Error indicating the fact that one or more aggregated modules failed.
static java.lang.String ERR_MALFORMED_PARAMS
          Error message for no malformed ModuleParams data structure.
static java.lang.String ERR_NO_FEATURES
          A rare error when all feature extractors ran, but there were a total of zero features extracted.
static java.lang.String ERR_NO_MODULES
          Error message for no modules found.
protected  ExpandedThreadGroup oFeatureExtractors
          A collection of the feature extraction threads.
 
Fields inherited from class marf.FeatureExtraction.FeatureExtraction
adFeatures, oPreprocessing
 
Fields inherited from class marf.Storage.StorageManager
bDumpOnNotFound, iCurrentDumpMode, oObjectToSerialize, strFilename
 
Fields inherited from interface marf.FeatureExtraction.IFeatureExtraction
MARF_INTERFACE_CODE_REVISION
 
Fields inherited from interface marf.Storage.IStorageManager
DUMP_BINARY, DUMP_CSV_TEXT, DUMP_GZIP_BINARY, DUMP_HTML, DUMP_SQL, DUMP_XML, MARF_INTERFACE_CODE_REVISION, STORAGE_FILE_EXTENSIONS
 
Constructor Summary
FeatureExtractionAggregator(IPreprocessing poPreprocessing)
          Implementation of the feature extraction interface.
 
Method Summary
 boolean extractFeatures()
          Implementation of the feature extraction interface.
static java.lang.String getMARFSourceCodeRevision()
          Returns source code revision information.
 
Methods inherited from class marf.FeatureExtraction.FeatureExtraction
backSynchronizeObject, clone, getFeaturesArray, getPreprocessing, setPreprocessing
 
Methods inherited from class marf.Storage.StorageManager
dump, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, equals, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, hashCode, restore, restoreBinary, restoreCSV, restoreGzipBinary, restoreHTML, restoreSQL, restoreXML, setDumpMode, setFilename, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ERR_NO_MODULES

public static final java.lang.String ERR_NO_MODULES
Error message for no modules found.

See Also:
Constant Field Values

ERR_MALFORMED_PARAMS

public static final java.lang.String ERR_MALFORMED_PARAMS
Error message for no malformed ModuleParams data structure.

See Also:
Constant Field Values

ERR_AGGR_MODULES_FAILED

public static final java.lang.String ERR_AGGR_MODULES_FAILED
Error indicating the fact that one or more aggregated modules failed. Should be suffixed with the detailed error information.

See Also:
Constant Field Values

ERR_NO_FEATURES

public static final java.lang.String ERR_NO_FEATURES
A rare error when all feature extractors ran, but there were a total of zero features extracted.

See Also:
Constant Field Values

oFeatureExtractors

protected transient ExpandedThreadGroup oFeatureExtractors
A collection of the feature extraction threads.

Constructor Detail

FeatureExtractionAggregator

public FeatureExtractionAggregator(IPreprocessing poPreprocessing)
Implementation of the feature extraction interface. Internally also instantiates the thread group for feature extractors.

Parameters:
poPreprocessing - the preprocessing module to suck the data from
Method Detail

extractFeatures

public boolean extractFeatures()
                        throws FeatureExtractionException
Implementation of the feature extraction interface. The main business logic described in the preamble of the class is implemented here.

Returns:
boolean true if there were features extracted, false otherwise
Throws:
FeatureExtractionException - if ModuleParams isn't there or is in incorrect format, there were errors while cloning, and extracting features, and other errors.
See Also:
IFeatureExtraction.extractFeatures()

getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Returns source code revision information.

Returns:
revision string


SourceForge Logo