|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectse.lth.cs.nlp.nlputils.ml.Classifier<ItemType>
public abstract class Classifier<ItemType>
Abstract class representing a classifier.
| Field Summary | |
|---|---|
protected FeatureExtractor<ItemType> |
extractor
The feature extractor that is used in classify(ItemType item). |
protected FeatureList |
list
The feature list that is used in classify(ItemType item). |
| Constructor Summary | |
|---|---|
Classifier()
|
|
| Method Summary | |
|---|---|
abstract Object |
classify(FeatureList features)
Performs a classification given a feature list. |
Object |
classify(ItemType item)
Auxiliary method that calls the feature extractor on the item. |
Object |
classifyRestricted(FeatureList features,
Collection classes)
Optional method that makes sure that restricts the range of the output value. |
void |
setFeatureExtractor(FeatureExtractor<ItemType> extractor,
FeatureList list)
Sets the feature extractor of this classifier. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected FeatureExtractor<ItemType> extractor
classify(ItemType item).
protected FeatureList list
classify(ItemType item).
| Constructor Detail |
|---|
public Classifier()
| Method Detail |
|---|
public Object classify(ItemType item)
item - the item to classify.
public abstract Object classify(FeatureList features)
features - the feature list.
public void setFeatureExtractor(FeatureExtractor<ItemType> extractor,
FeatureList list)
extractor - the feature extractor.
public Object classifyRestricted(FeatureList features,
Collection classes)
features - the feature list.classes - a collection of allowed classes.
UnsupportedOperationException - if the method is not implemented.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||