org.maltparser.ml.lib
Class MaltLibsvmModel
java.lang.Object
org.maltparser.ml.lib.MaltLibsvmModel
- All Implemented Interfaces:
- Serializable, MaltLibModel
public class MaltLibsvmModel
- extends Object
- implements Serializable, MaltLibModel
This class borrows code from libsvm.svm.java of the Java implementation of the libsvm package.
MaltLibsvmModel stores the model obtained from the training procedure. In addition to the original code the model is more integrated to
MaltParser. Instead of moving features from MaltParser's internal data structures to liblinear's data structure it uses MaltParser's data
structure directly on the model.
- Author:
- Johan Hall
- See Also:
- Serialized Form
Constructor Summary |
MaltLibsvmModel(libsvm.svm_model model,
libsvm.svm_problem problem)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
param
public libsvm.svm_parameter param
nr_class
public int nr_class
l
public int l
SV
public libsvm.svm_node[][] SV
sv_coef
public double[][] sv_coef
rho
public double[] rho
label
public int[] label
nSV
public int[] nSV
start
public int[] start
MaltLibsvmModel
public MaltLibsvmModel(libsvm.svm_model model,
libsvm.svm_problem problem)
predict
public int[] predict(MaltFeatureNode[] x)
- Specified by:
predict
in interface MaltLibModel
getLabels
public int[] getLabels()
Copyright 2007-2011 Johan Hall, Jens Nilsson and Joakim Nivre.