marf.Classification.RandomClassification
Class RandomClassification

java.lang.Object
  extended bymarf.Classification.Classification
      extended bymarf.Classification.RandomClassification.RandomClassification
All Implemented Interfaces:
java.io.Serializable, StorageManager

public class RandomClassification
extends Classification
implements java.io.Serializable

Class RandomClassification

Random Classification for testing purposes. The bottomline of the classification results. All the other modules should be better than this 99% of the time. If they are not, debug them.

$Header: /cvsroot/marf/marf/src/marf/Classification/RandomClassification/RandomClassification.java,v 1.3 2004/04/20 16:38:20 mokhov Exp $

Since:
0.2.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class marf.Classification.Classification
oFeatureExtraction, oResult, oTrainingSet
 
Fields inherited from interface marf.Storage.StorageManager
DUMP_BINARY, DUMP_CSV_TEXT, DUMP_GZIP_BINARY, DUMP_XML
 
Constructor Summary
RandomClassification(FeatureExtraction poFeatureExtraction)
          RandomClassification Constructor
 
Method Summary
 boolean classify()
          Picks an ID at random
 void dump()
          Dumps "training set" of IDs
 void restore()
          Restores "training set" of IDs
 boolean train()
          Simply stores incoming ID's
 
Methods inherited from class marf.Classification.Classification
getResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomClassification

public RandomClassification(FeatureExtraction poFeatureExtraction)
RandomClassification Constructor

Parameters:
poFeatureExtraction - FeatureExtraction module reference
Method Detail

classify

public final boolean classify()
                       throws ClassificationException
Picks an ID at random

Specified by:
classify in class Classification
Returns:
true
Throws:
ClassificationException

train

public final boolean train()
                    throws ClassificationException
Simply stores incoming ID's

Overrides:
train in class Classification
Returns:
true
Throws:
ClassificationException

dump

public final void dump()
                throws java.io.IOException
Dumps "training set" of IDs

Specified by:
dump in interface StorageManager
Overrides:
dump in class Classification
Throws:
java.io.IOException

restore

public final void restore()
                   throws java.io.IOException
Restores "training set" of IDs

Specified by:
restore in interface StorageManager
Overrides:
restore in class Classification
Throws:
java.io.IOException