se.lth.cs.nlp.nlputils.ml.glue
Class LibSVMClassifier<T>
java.lang.Object
  
se.lth.cs.nlp.nlputils.ml.Classifier<T>
      
se.lth.cs.nlp.nlputils.ml.ProbabilityClassifier<T>
          
se.lth.cs.nlp.nlputils.ml.glue.LibSVMClassifier<T>
- All Implemented Interfaces: 
 - Serializable
 
 class LibSVMClassifier<T>
- extends ProbabilityClassifier<T>
 
- Author:
 
  - Richard Johansson (richard@cs.lth.se)
 
 
 
 
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
LibSVMClassifier
LibSVMClassifier(String modelName,
                 NumericEncoding enc)
           throws IOException
- Throws:
 IOException
classify
public Object classify(FeatureList features)
- Description copied from class: 
Classifier 
- Performs a classification given a feature list.
- Specified by:
 classify in class Classifier<T>
 
- Parameters:
 features - the feature list.
- Returns:
 - the result of the classification.
 
 
 
computeProbabilities
public void computeProbabilities(FeatureList features,
                                 double[] probs)
- Description copied from class: 
ProbabilityClassifier 
- Computes the posterior class probabilities given a feature list.
- Specified by:
 computeProbabilities in class ProbabilityClassifier<T>
 
- Parameters:
 features - the feature list.probs - the array of doubles where the probabilities are written.
 
 
classifyRestricted
public Object classifyRestricted(FeatureList features,
                                 Collection classes)
- Description copied from class: 
Classifier 
- Optional method that makes sure that restricts the range of the output 
 value.
- Overrides:
 classifyRestricted in class Classifier<T>
 
- Parameters:
 features - the feature list.classes - a collection of allowed classes.
- Returns:
 - the result of the classification.