|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmarf.Storage.StorageManager
marf.Classification.Classification
marf.Classification.RandomClassification.RandomClassification
public class RandomClassification
Random Classification Module is for testing purposes.
This represents the bottom-line of the classification results. All the other modules should be better than this 99% of the time. If they are not, debug them.
$Id: RandomClassification.java,v 1.21 2007/12/31 00:17:04 mokhov Exp $
| Field Summary |
|---|
| Fields inherited from class marf.Classification.Classification |
|---|
adFeatureVector, oFeatureExtraction, oResultSet, oTrainingSet |
| 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 | |
|---|---|
RandomClassification(IFeatureExtraction poFeatureExtraction)
RandomClassification Constructor. |
|
| Method Summary | |
|---|---|
void |
backSynchronizeObject()
Must to be overridden by the modules that use object serialization with the generic implementation of restore(). |
boolean |
classify(double[] padFeatureVector)
Picks an ID at random. |
void |
dump()
Dumps "training set" of IDs. |
static java.lang.String |
getMARFSourceCodeRevision()
Retrieves class' revision. |
Result |
getResult()
Retrieves the classification result. |
void |
restore()
Restores "training set" of IDs. |
java.lang.String |
toString()
Returns string representation of the internals of this object. |
boolean |
train(double[] padFeatureVector)
Simply stores incoming ID's to later pick one at random. |
| Methods inherited from class marf.Classification.Classification |
|---|
classify, clone, getFeatureExtraction, getResultSet, getTrainingSetFilename, loadTrainingSet, setFeatureExtraction, train |
| Methods inherited from class marf.Storage.StorageManager |
|---|
dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, equals, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, getObjectToSerialize, hashCode, restoreBinary, restoreCSV, restoreGzipBinary, restoreHTML, restoreSQL, restoreXML, setDumpMode, setFilename |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RandomClassification(IFeatureExtraction poFeatureExtraction)
poFeatureExtraction - FeatureExtraction module reference| Method Detail |
|---|
public final boolean classify(double[] padFeatureVector)
throws ClassificationException
classify() was refactored into the
Classification.
padFeatureVector - unused
true
ClassificationException
public final boolean train(double[] padFeatureVector)
throws ClassificationException
train in interface IClassificationtrain in class ClassificationpadFeatureVector - unused
true if training was successful
ClassificationExceptionTrainingSet
public final void dump()
throws StorageException
dump in interface IStorageManagerdump in class ClassificationStorageExceptionIStorageManager.DUMP_GZIP_BINARY,
IStorageManager.DUMP_BINARY,
StorageManager.dumpGzipBinary(),
StorageManager.dumpCSV(),
StorageManager.dumpBinary(),
StorageManager.dumpXML(),
StorageManager.dumpHTML(),
StorageManager.dumpSQL(),
StorageManager.backSynchronizeObject(),
StorageManager.iCurrentDumpMode
public final void restore()
throws StorageException
restore in interface IStorageManagerrestore in class ClassificationStorageException - if there was an error loading the data file.IStorageManager.DUMP_GZIP_BINARY,
IStorageManager.DUMP_BINARY,
StorageManager.dumpGzipBinary(),
StorageManager.dumpCSV(),
StorageManager.dumpBinary(),
StorageManager.dumpXML(),
StorageManager.dumpHTML(),
StorageManager.dumpSQL(),
StorageManager.backSynchronizeObject(),
StorageManager.iCurrentDumpModepublic void backSynchronizeObject()
StorageManagerrestore(). By default
this method is unimplemented.
backSynchronizeObject in class StorageManagerStorageManager.backSynchronizeObject()public Result getResult()
public java.lang.String toString()
toString in class StorageManagerObject.toString()public static java.lang.String getMARFSourceCodeRevision()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||