| 
|||||||||
| 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<T>
se.lth.cs.nlp.nlputils.ml.BinaryNumericClassifier<T>
public abstract class BinaryNumericClassifier<T>
Abstract class for binary numeric classifiers, such as classical linear or quadratic models.
| Field Summary | |
|---|---|
protected  Object[] | 
classes
The range of output values.  | 
protected  NumericEncoding | 
encoding
The numeric encoding that maps feature values to indices.  | 
| Fields inherited from class se.lth.cs.nlp.nlputils.ml.Classifier | 
|---|
extractor, list | 
| Constructor Summary | |
|---|---|
BinaryNumericClassifier()
 | 
|
| Method Summary | |
|---|---|
 double | 
apply(FeatureList features)
Auxiliary method that encodes the features and calls apply. | 
abstract  double | 
apply(int[] featureIndices)
Applies the discriminator function.  | 
 Object | 
classify(FeatureList features)
Performs a classification given a feature list.  | 
| Methods inherited from class se.lth.cs.nlp.nlputils.ml.Classifier | 
|---|
classify, classifyRestricted, setFeatureExtractor | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected Object[] classes
classes[0] is returned when apply returns
 a positive value. Should have a length of 2.
protected NumericEncoding encoding
| Constructor Detail | 
|---|
public BinaryNumericClassifier()
| Method Detail | 
|---|
public abstract double apply(int[] featureIndices)
featureIndices - the sorted array of feature indices.
public double apply(FeatureList features)
apply.
features - the feature list to classify.
public Object classify(FeatureList features)
Classifier
classify in class Classifier<T>features - the feature list.
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||