public class MaltLibsvmModel extends java.lang.Object implements java.io.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.
Modifier and Type | Field and Description |
---|---|
int |
l |
int[] |
label |
int |
nr_class |
int[] |
nSV |
libsvm.svm_parameter |
param |
double[] |
rho |
int[] |
start |
libsvm.svm_node[][] |
SV |
double[][] |
sv_coef |
Constructor and Description |
---|
MaltLibsvmModel(libsvm.svm_model model,
libsvm.svm_problem problem) |
Modifier and Type | Method and Description |
---|---|
int[] |
getLabels() |
int |
predict_one(MaltFeatureNode[] x) |
int[] |
predict(MaltFeatureNode[] x) |
public libsvm.svm_parameter param
public int nr_class
public int l
public libsvm.svm_node[][] SV
public double[][] sv_coef
public double[] rho
public int[] label
public int[] nSV
public int[] start
public MaltLibsvmModel(libsvm.svm_model model, libsvm.svm_problem problem)
public int[] predict(MaltFeatureNode[] x)
predict
in interface MaltLibModel
public int predict_one(MaltFeatureNode[] x)
predict_one
in interface MaltLibModel
public int[] getLabels()
Copyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.