Class SVModel
java.lang.Object
com.imsl.datamining.supportvectormachine.SVModel
Class to contain model estimates after training a support vector machine.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint[]Returns the class labels.intReturns the number of support vectors.int[]Returns the number of support vectors per class.double[][]Returns the nonzero coefficients of the support vector classifier or the approximate function, in the case of regression.voidsetClassLabels(int[] label) Sets the class labels.
-
Constructor Details
-
SVModel
public SVModel()
-
-
Method Details
-
getNumberOfSupportVectorsPerClass
public int[] getNumberOfSupportVectorsPerClass()Returns the number of support vectors per class.- Returns:
- an
intarray containing the number of support vectors
-
getNumberOfSupportVectors
public int getNumberOfSupportVectors()Returns the number of support vectors.- Returns:
- an
int, the number of support vectors
-
getSupportVectorCoef
public double[][] getSupportVectorCoef()Returns the nonzero coefficients of the support vector classifier or the approximate function, in the case of regression.- Returns:
- a
doublematrix containing the non-zero coefficients
-
getClassLabels
public int[] getClassLabels()Returns the class labels.- Returns:
- label an
intarray containing the class labels
-
setClassLabels
public void setClassLabels(int[] label) Sets the class labels.- Parameters:
label- anintarray containing the labels for each of the class levels
-