|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.classify.algorithms.svm.SVMClassifier
public class SVMClassifier
SVMClassifier wrapps the prediction code from the libsvm library for binary or multi-class problems.
A SVMClassifier must be built from a model, using the svm_model class from libsvm.
This is best done by running the learner.
Note that due to the way libsvm computes probabilities you may get different
predictions for the same instance if you turn on probabilities compared to
when you leave it turned off. See the libsvm home page for more details.
Constructor Summary | |
---|---|
SVMClassifier(libsvm.svm_model model,
ExampleSchema schema,
FeatureFactory featureFactory)
|
Method Summary | |
---|---|
ClassLabel |
classification(Instance instance)
Return a predicted type for the span, as a class label. |
java.lang.String |
explain(Instance instance)
Return some string that 'explains' the classification |
Explanation |
getExplanation(Instance instance)
Return an Explanation for the classification |
FeatureFactory |
getFeatureFactory()
|
ExampleSchema |
getSchema()
|
libsvm.svm_model |
getSVMModel()
|
Viewer |
toGUI()
GUI stuff |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SVMClassifier(libsvm.svm_model model, ExampleSchema schema, FeatureFactory featureFactory)
Method Detail |
---|
public java.lang.String explain(Instance instance)
Classifier
explain
in interface Classifier
public Explanation getExplanation(Instance instance)
Classifier
getExplanation
in interface Classifier
public libsvm.svm_model getSVMModel()
public ExampleSchema getSchema()
public FeatureFactory getFeatureFactory()
public ClassLabel classification(Instance instance)
Classifier
classification
in interface Classifier
public Viewer toGUI()
toGUI
in interface Visible
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |