|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object marf.Storage.StorageManager marf.Classification.Classification
Abstract Classification Module. A generic implementation of the IClassification interface. The derivatives must inherit from this module, and if they cannot, they should implement IClassification themselves.
$Id: Classification.java,v 1.41 2006/01/02 22:24:00 mokhov Exp $
Field Summary | |
protected IFeatureExtraction |
oFeatureExtraction
Reference to the enclosed FeatureExtraction object. |
protected ResultSet |
oResultSet
Classification result set. |
protected TrainingSet |
oTrainingSet
TrainingSet Container. |
Fields inherited from class marf.Storage.StorageManager |
bDumpOnNotFound, iCurrentDumpMode, oObjectToSerialize, strFilename |
Fields inherited from interface marf.Classification.IClassification |
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 |
Classification(IFeatureExtraction poFeatureExtraction)
Generic Classification Constructor. |
Method Summary | |
java.lang.Object |
clone()
Implementes Cloneable interface for the Classification object. |
void |
dump()
Generic implementation of dump() to dump the TrainingSet. |
IFeatureExtraction |
getFeatureExtraction()
Retrieves the features source. |
static java.lang.String |
getMARFSourceCodeRevision()
Retrieves class' revision. |
ResultSet |
getResultSet()
Retrieves the enclosed result set. |
protected java.lang.String |
getTrainingSetFilename()
Constructs a global cluster file name for the TrainingSet. |
void |
restore()
Generic implementation of restore() for TrainingSet. |
void |
setFeatureExtraction(IFeatureExtraction poFeatureExtraction)
Allows setting the features surce. |
boolean |
train()
Generic training routine for building/updating mean vectors in the training set. |
Methods inherited from class marf.Storage.StorageManager |
backSynchronizeObject, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, equals, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, hashCode, 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.Classification.IClassification |
classify, getResult |
Field Detail |
protected IFeatureExtraction oFeatureExtraction
protected TrainingSet oTrainingSet
protected ResultSet oResultSet
Constructor Detail |
protected Classification(IFeatureExtraction poFeatureExtraction)
poFeatureExtraction
- FeatureExtraction module referenceMethod Detail |
public boolean train() throws ClassificationException
TrainingSet
, it should call super.train();
train
in interface IClassification
true
if training was successful
(i.e. mean vector was updated); false
otherwise
ClassificationException
- if there was a problem while trainingTrainingSet
public void dump() throws StorageException
dump
in interface IStorageManager
dump
in class StorageManager
StorageException
- if there's a problem saving training set to diskIStorageManager.DUMP_GZIP_BINARY
,
IStorageManager.DUMP_BINARY
,
StorageManager.dumpGzipBinary()
,
StorageManager.dumpCSV()
,
StorageManager.dumpBinary()
,
StorageManager.dumpXML()
,
StorageManager.dumpHTML()
,
StorageManager.dumpSQL()
,
StorageManager.backSynchronizeObject()
,
StorageManager.iCurrentDumpMode
public void restore() throws StorageException
restore
in interface IStorageManager
restore
in class StorageManager
StorageException
- if there is a problem loading the training set from diskIStorageManager.DUMP_GZIP_BINARY
,
IStorageManager.DUMP_BINARY
,
StorageManager.dumpGzipBinary()
,
StorageManager.dumpCSV()
,
StorageManager.dumpBinary()
,
StorageManager.dumpXML()
,
StorageManager.dumpHTML()
,
StorageManager.dumpSQL()
,
StorageManager.backSynchronizeObject()
,
StorageManager.iCurrentDumpMode
public ResultSet getResultSet()
getResultSet
in interface IClassification
protected java.lang.String getTrainingSetFilename()
Filename is constructed using fully-qualified class of either TrainingSet or a classifier name with global clustering info such as preprocessing and feature extraction methods, so that ony that cluster can be reloaded after.
May be overridden by the drivatives when necessary.
public IFeatureExtraction getFeatureExtraction()
getFeatureExtraction
in interface IClassification
public void setFeatureExtraction(IFeatureExtraction poFeatureExtraction)
setFeatureExtraction
in interface IClassification
poFeatureExtraction
- the FeatureExtraction object to setpublic java.lang.Object clone()
clone
in class StorageManager
Object.clone()
public static java.lang.String getMARFSourceCodeRevision()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |