|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.aisb.bio.tools.Classifier
This is the abstract class to be subclassed by arbitrary data classifiers. Individual classifiers may need more methods than these to be configured, but once one is up and running we should be able to use it via this interface.
This is for supervised learning algorithms, as the data is tagged with a label when it's added.
To use objects that implement this: create an object, call the "startTraining()" method, call "train(label, data)" with each labeled piece of data, and then call the "finishTraining()" method. Once you've done that, call "classify(data)" and you'll get back whichever of the labels you used is the best fit for the new data.
Constructor Summary | |
Classifier()
|
Method Summary | |
abstract java.lang.String |
classify(java.lang.Object data)
Given a trained classifier, use it to classify a piece of data. |
void |
finishTraining()
|
void |
startTraining()
|
abstract void |
train(java.lang.String label,
java.lang.Object data)
Feed training data to the classifier. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Classifier()
Method Detail |
public void startTraining()
public void finishTraining()
public abstract void train(java.lang.String label, java.lang.Object data)
label
- The label that this unit of data has.data
- The data to be used for classification.public abstract java.lang.String classify(java.lang.Object data)
data
- The data to be classified.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |