marf.Classification
Class Classification

java.lang.Object
  extended bymarf.Classification.Classification
All Implemented Interfaces:
StorageManager
Direct Known Subclasses:
Distance, Markov, NeuralNetwork, RandomClassification, Stochastic

public abstract class Classification
extends java.lang.Object
implements StorageManager

Class Classification

Abstract Classification Module

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


Field Summary
protected  FeatureExtraction oFeatureExtraction
          Reference to the FeatureExtraction object
protected  Result oResult
          Classification Result
protected  TrainingSet oTrainingSet
          TrainingSet Container
 
Fields inherited from interface marf.Storage.StorageManager
DUMP_BINARY, DUMP_CSV_TEXT, DUMP_GZIP_BINARY, DUMP_XML
 
Constructor Summary
protected Classification(FeatureExtraction poFeatureExtraction)
          Generic Classification Constructor
 
Method Summary
abstract  boolean classify()
          Generic classification routine.
 void dump()
          Generic implementation of dump() for TrainingSet
 Result getResult()
          Retrieves the classification result
 void restore()
          Generic implementation of restore() for TrainingSet
 boolean train()
          Generic training routine for building/updating mean vectors in the training set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

oFeatureExtraction

protected FeatureExtraction oFeatureExtraction
Reference to the FeatureExtraction object


oTrainingSet

protected TrainingSet oTrainingSet
TrainingSet Container


oResult

protected Result oResult
Classification Result

Constructor Detail

Classification

protected Classification(FeatureExtraction poFeatureExtraction)
Generic Classification Constructor

Parameters:
poFeatureExtraction - FeatureExtraction module reference
Method Detail

classify

public abstract boolean classify()
                          throws ClassificationException
Generic classification routine.

Returns:
true if classification was successful; false otherwise
Throws:
ClassificationException

train

public boolean train()
              throws ClassificationException
Generic training routine for building/updating mean vectors in the training set. Can be overriden, and if overriding classifier is using TrainingSet, it should call super.train();

Returns:
true if training was successful (i.e. mean vector was updated); false otherwise
Throws:
ClassificationException

dump

public void dump()
          throws java.io.IOException
Generic implementation of dump() for TrainingSet

Specified by:
dump in interface StorageManager
Throws:
IOException - if there's a problem saving training set to disk
Since:
0.2.0

restore

public void restore()
             throws java.io.IOException
Generic implementation of restore() for TrainingSet

Specified by:
restore in interface StorageManager
Throws:
IOException
Since:
0.2.0

getResult

public final Result getResult()
Retrieves the classification result

Returns:
Result object