org.cleartk.classifier.tksvmlight
Class TKSVMlightStringOutcomeClassifier
java.lang.Object
org.cleartk.classifier.jar.EncodingJarClassifier<ENCODED_FEATURES_TYPE,OUTCOME_TYPE,ENCODED_OUTCOME_TYPE>
org.cleartk.classifier.jar.Classifier_ImplBase<TreeFeatureVector,String,Integer>
org.cleartk.classifier.tksvmlight.TKSVMlightStringOutcomeClassifier
- All Implemented Interfaces:
- org.cleartk.classifier.Classifier<String>
public class TKSVMlightStringOutcomeClassifier
- extends org.cleartk.classifier.jar.Classifier_ImplBase<TreeFeatureVector,String,Integer>
A One versus All Tree Kernel SVM light classifier implementation. All features named with the
prefix "TK_" treated as Tree Kernels.
Copyright (c) 2007-2008, Regents of the University of Colorado
All rights reserved.
- Author:
- Daryl Lonnon
- See Also:
TKSVMlightBooleanOutcomeClassifier
| Fields inherited from class org.cleartk.classifier.jar.EncodingJarClassifier |
featuresEncoder, outcomeEncoder |
|
Method Summary |
String |
classify(List<org.cleartk.classifier.Feature> features)
Classify a features list. |
List<org.cleartk.classifier.ScoredOutcome<String>> |
score(List<org.cleartk.classifier.Feature> features,
int maxResults)
Score a list of features against the various models used by the One Verse All SVM classifier. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TKSVMlightStringOutcomeClassifier
public TKSVMlightStringOutcomeClassifier(org.cleartk.classifier.encoder.features.FeaturesEncoder<TreeFeatureVector> featuresEncoder,
org.cleartk.classifier.encoder.outcome.OutcomeEncoder<String,Integer> outcomeEncoder,
Map<Integer,File> models)
- Constructor
- Parameters:
featuresEncoder - The features encoder used by this classifier.outcomeEncoder - The outcome encoder used by this classifier.models - The files for the models used by this classifier.
classify
public String classify(List<org.cleartk.classifier.Feature> features)
throws org.cleartk.classifier.CleartkProcessingException
- Classify a features list.
- Parameters:
features - The feature list to classify.
- Returns:
- A String of the most likely classification.
- Throws:
org.cleartk.classifier.CleartkProcessingException
score
public List<org.cleartk.classifier.ScoredOutcome<String>> score(List<org.cleartk.classifier.Feature> features,
int maxResults)
throws org.cleartk.classifier.CleartkProcessingException
- Score a list of features against the various models used by the One Verse All SVM classifier.
- Specified by:
score in interface org.cleartk.classifier.Classifier<String>- Overrides:
score in class org.cleartk.classifier.jar.Classifier_ImplBase<TreeFeatureVector,String,Integer>
- Parameters:
features - The features to classifymaxResults - The maximum number of results to return in the list.
- Returns:
- A list of scored outcomes ordered by likelihood.
- Throws:
org.cleartk.classifier.CleartkProcessingException
Copyright © 2013. All Rights Reserved.