marf.FeatureExtraction
Class FeatureExtraction

java.lang.Object
  extended by marf.Storage.StorageManager
      extended by marf.FeatureExtraction.FeatureExtraction
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, IFeatureExtraction, IStorageManager
Direct Known Subclasses:
Cepstral, F0, FeatureExtractionAggregator, FFT, LPC, MinMaxAmplitudes, RandomFeatureExtraction, RawFeatureExtraction, Segmentation

public abstract class FeatureExtraction
extends StorageManager
implements IFeatureExtraction

Generic Feature Extraction Module. Every feature extraction module must extend this class; if it cannot then they must implement the IFeatureExtraction interface.

$Id: FeatureExtraction.java,v 1.37 2007/12/18 03:45:40 mokhov Exp $

Since:
0.0.1
Version:
$Revision: 1.37 $
Author:
Serguei Mokhov
See Also:
IFeatureExtraction, Serialized Form

Field Summary
protected  double[] adFeatures
          An array of features extracted (coefficiencies and/or amplitude values).
protected  FeatureSet oFeatureSet
          A collection of feature vectors or sets for a subject.
protected  IPreprocessing oPreprocessing
          Internal reference to the Preprocessing module.
private static long serialVersionUID
          For serialization versioning.
 
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
protected FeatureExtraction(IPreprocessing poPreprocessing)
          Main FeatureExtraction constructor.
 
Method Summary
 void backSynchronizeObject()
          Implementation of back-synchronization of loaded object.
 java.lang.Object clone()
          Implements Cloneable interface for the FeatureExtraction object.
 boolean extractFeatures()
          Provides default implementation of the API by using the sample data provided by the IPreprocessing module.
 double[] getFeaturesArray()
          Allows retrieval of the internal feature vector.
static java.lang.String getMARFSourceCodeRevision()
          Returns source code revision information.
 IPreprocessing getPreprocessing()
          Retrieves inner preprocessing reference.
 void setPreprocessing(IPreprocessing poPreprocessing)
          Allows setting the source preprocessing module.
 
Methods inherited from class marf.Storage.StorageManager
dump, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, equals, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, getObjectToSerialize, 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
 
Methods inherited from interface marf.FeatureExtraction.IFeatureExtraction
extractFeatures
 

Field Detail

oPreprocessing

protected IPreprocessing oPreprocessing
Internal reference to the Preprocessing module.


adFeatures

protected double[] adFeatures
An array of features extracted (coefficiencies and/or amplitude values).


oFeatureSet

protected FeatureSet oFeatureSet
A collection of feature vectors or sets for a subject.

Since:
0.3.0.6

serialVersionUID

private static final long serialVersionUID
For serialization versioning. When adding new members or make other structural changes regenerate this number with the serialver tool that comes with JDK.

Since:
0.3.0.5
See Also:
Constant Field Values
Constructor Detail

FeatureExtraction

protected FeatureExtraction(IPreprocessing poPreprocessing)
Main FeatureExtraction constructor.

Parameters:
poPreprocessing - preprocessing object ref.
Method Detail

extractFeatures

public boolean extractFeatures()
                        throws FeatureExtractionException
Provides default implementation of the API by using the sample data provided by the IPreprocessing module. The module should be set either through a constructor or a setter prior invocation.

Specified by:
extractFeatures in interface IFeatureExtraction
Returns:
boolean true if there were features extracted, false otherwise
Throws:
FeatureExtractionException - if there was an error while extracting features
Since:
0.3.0.6
See Also:
IFeatureExtraction.extractFeatures()

getFeaturesArray

public final double[] getFeaturesArray()
Allows retrieval of the internal feature vector.

Specified by:
getFeaturesArray in interface IFeatureExtraction
Returns:
array of features (double values)

getPreprocessing

public IPreprocessing getPreprocessing()
Retrieves inner preprocessing reference.

Specified by:
getPreprocessing in interface IFeatureExtraction
Returns:
the preprocessing reference
Since:
0.3.0.4

setPreprocessing

public void setPreprocessing(IPreprocessing poPreprocessing)
Allows setting the source preprocessing module.

Specified by:
setPreprocessing in interface IFeatureExtraction
Parameters:
poPreprocessing - the preprocessing object to set
Since:
0.3.0.4

backSynchronizeObject

public void backSynchronizeObject()
Implementation of back-synchronization of loaded object.

Overrides:
backSynchronizeObject in class StorageManager
Since:
0.3.0.3
See Also:
StorageManager.backSynchronizeObject()

clone

public java.lang.Object clone()
Implements Cloneable interface for the FeatureExtraction object. The contained Preprocessing isn't cloned at this point, and is just assigned to the clone.

Overrides:
clone in class StorageManager
Since:
0.3.0.5
See Also:
Object.clone()

getMARFSourceCodeRevision

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

Returns:
revision string
Since:
0.3.0.2


SourceForge Logo