diva.sketch.classification
Class AbstractClassifier

java.lang.Object
  extended by diva.sketch.classification.AbstractClassifier
All Implemented Interfaces:
Classifier, TrainableClassifier
Direct Known Subclasses:
BayesClassifier, WeightedEuclideanClassifier

public abstract class AbstractClassifier
extends Object
implements TrainableClassifier

Given a training set containing multiple classes, for each class, an AbstractClassifier would compute the mu and sigma of each feature of that class. These mu's and sigma's are stored in a WeightSet object. As the result, if there are n classes, there should be n WeightSet objects.

Version:
$Revision: 1.2 $
Author:
Heloise Hse (hwawen@eecs.berkeley.edu)

Field Summary
protected  ArrayList _weights
          An array of WeighSet objects, one per class.
 
Constructor Summary
AbstractClassifier()
          Construct an abstract classifier and instantiate its weight array for features.
 
Method Summary
 void clear()
          Reset the weight sets.
 void debug(String s)
          Debugging output.
 boolean isIncremental()
          Return false; not incremental.
 void train(TrainingSet tset)
          Train on the given data set by building the set of weights that are to be used by the classify() method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface diva.sketch.classification.Classifier
classify
 

Field Detail

_weights

protected ArrayList _weights
An array of WeighSet objects, one per class.

Constructor Detail

AbstractClassifier

public AbstractClassifier()
Construct an abstract classifier and instantiate its weight array for features.

Method Detail

clear

public void clear()
Reset the weight sets.

Specified by:
clear in interface TrainableClassifier

debug

public final void debug(String s)
Debugging output.


isIncremental

public final boolean isIncremental()
Return false; not incremental.

Specified by:
isIncremental in interface TrainableClassifier

train

public void train(TrainingSet tset)
           throws ClassifierException
Train on the given data set by building the set of weights that are to be used by the classify() method. There is one WeightSet object per class. The WeightSet object computes and stores the mu's and sigma's of the features of that class.

Specified by:
train in interface TrainableClassifier
Throws:
ClassifierException


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.