se.lth.cs.nlp.nlputils.ml
Class ProbabilityClassifier<T>
java.lang.Object
se.lth.cs.nlp.nlputils.ml.Classifier<T>
se.lth.cs.nlp.nlputils.ml.ProbabilityClassifier<T>
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- LibSVMClassifier, NativeLibSVMClassifier
public abstract class ProbabilityClassifier<T>
- extends Classifier<T>
A classifier that can compute posterior class probabilities.
- Author:
- Richard Johansson (richard@cs.lth.se)
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProbabilityClassifier
public ProbabilityClassifier()
computeProbabilities
public int computeProbabilities(T item,
double[] probs)
- Computes the posterior class probabilities given an item.
- Parameters:
item
- the item to classify.probs
- the array of doubles where the probabilities are written.
- Returns:
- the feature extraction status value.
computeProbabilities
public abstract void computeProbabilities(FeatureList features,
double[] probs)
- Computes the posterior class probabilities given a feature list.
- Parameters:
features
- the feature list.probs
- the array of doubles where the probabilities are written.