|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javatools.datatypes.SVMModel
public class SVMModel
This class is part of the Java Tools (see http://mpii.de/yago-naga/javatools). It is licensed under the Creative Commons Attribution License (see http://creativecommons.org/licenses/by/3.0) by the YAGO-NAGA team (see http://mpii.de/yago-naga). This class implements an SVM-light-Model. This code is the Java-translation of Thorsten Joachim's SVM-light classifier (with permission by the author), see http://svmlight.joachims.org/
Nested Class Summary | |
---|---|
static class |
SVMModel.KernelType
Defines the enum of the Kernel-type (LINEAR,POLY,RBF,SIGMOID) |
Constructor Summary | |
---|---|
SVMModel(java.io.File f)
Reads the SVMModel from a SVM-light model file |
|
SVMModel(java.lang.String f)
Reads the SVMModel from an SVM-light model file |
Method Summary | |
---|---|
double |
classify(SparseVector v)
Classifies a SparseVector |
double |
kernel(SparseVector a,
SparseVector b)
Computes a kernel |
static void |
main(java.lang.String[] argv)
Test routine |
java.lang.String |
toString()
Returns this model as a descriptive string |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SVMModel(java.lang.String f) throws java.lang.Exception
java.lang.Exception
public SVMModel(java.io.File f) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public double classify(SparseVector v)
public double kernel(SparseVector a, SparseVector b)
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] argv) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |