Package org.opencv.ml
Class SVM
- java.lang.Object
-
- org.opencv.core.Algorithm
-
- org.opencv.ml.StatModel
-
- org.opencv.ml.SVM
-
public class SVM extends StatModel
-
-
Field Summary
Fields Modifier and Type Field Description static intCstatic intC_SVCstatic intCHI2static intCOEFstatic intCUSTOMstatic intDEGREEstatic intEPS_SVRstatic intGAMMAstatic intINTERstatic intLINEARstatic intNUstatic intNU_SVCstatic intNU_SVRstatic intONE_CLASSstatic intPstatic intPOLYstatic intRBFstatic intSIGMOID-
Fields inherited from class org.opencv.ml.StatModel
COMPRESSED_INPUT, PREPROCESSED_INPUT, RAW_OUTPUT, UPDATE_MODEL
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSVM(long addr)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SVM__fromPtr__(long addr)static SVMcreate()protected voidfinalize()doublegetC()MatgetClassWeights()doublegetCoef0()doublegetDecisionFunction(int i, Mat alpha, Mat svidx)static ParamGridgetDefaultGridPtr(int param_id)doublegetDegree()doublegetGamma()intgetKernelType()doublegetNu()doublegetP()MatgetSupportVectors()TermCriteriagetTermCriteria()intgetType()MatgetUncompressedSupportVectors()static SVMload(String filepath)voidsetC(double val)voidsetClassWeights(Mat val)voidsetCoef0(double val)voidsetDegree(double val)voidsetGamma(double val)voidsetKernel(int kernelType)voidsetNu(double val)voidsetP(double val)voidsetTermCriteria(TermCriteria val)voidsetType(int val)booleantrainAuto(Mat samples, int layout, Mat responses)booleantrainAuto(Mat samples, int layout, Mat responses, int kFold)booleantrainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid)booleantrainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid)booleantrainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid)booleantrainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid)booleantrainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid, ParamGrid coeffGrid)booleantrainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid, ParamGrid coeffGrid, ParamGrid degreeGrid)booleantrainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid, ParamGrid coeffGrid, ParamGrid degreeGrid, boolean balanced)-
Methods inherited from class org.opencv.ml.StatModel
calcError, empty, getVarCount, isClassifier, isTrained, predict, predict, predict, train, train, train
-
Methods inherited from class org.opencv.core.Algorithm
clear, getDefaultName, getNativeObjAddr, save
-
-
-
-
Field Detail
-
C_SVC
public static final int C_SVC
- See Also:
- Constant Field Values
-
NU_SVC
public static final int NU_SVC
- See Also:
- Constant Field Values
-
ONE_CLASS
public static final int ONE_CLASS
- See Also:
- Constant Field Values
-
EPS_SVR
public static final int EPS_SVR
- See Also:
- Constant Field Values
-
NU_SVR
public static final int NU_SVR
- See Also:
- Constant Field Values
-
CUSTOM
public static final int CUSTOM
- See Also:
- Constant Field Values
-
LINEAR
public static final int LINEAR
- See Also:
- Constant Field Values
-
POLY
public static final int POLY
- See Also:
- Constant Field Values
-
RBF
public static final int RBF
- See Also:
- Constant Field Values
-
SIGMOID
public static final int SIGMOID
- See Also:
- Constant Field Values
-
CHI2
public static final int CHI2
- See Also:
- Constant Field Values
-
INTER
public static final int INTER
- See Also:
- Constant Field Values
-
C
public static final int C
- See Also:
- Constant Field Values
-
GAMMA
public static final int GAMMA
- See Also:
- Constant Field Values
-
P
public static final int P
- See Also:
- Constant Field Values
-
NU
public static final int NU
- See Also:
- Constant Field Values
-
COEF
public static final int COEF
- See Also:
- Constant Field Values
-
DEGREE
public static final int DEGREE
- See Also:
- Constant Field Values
-
-
Method Detail
-
__fromPtr__
public static SVM __fromPtr__(long addr)
-
getClassWeights
public Mat getClassWeights()
-
getSupportVectors
public Mat getSupportVectors()
-
getUncompressedSupportVectors
public Mat getUncompressedSupportVectors()
-
getDefaultGridPtr
public static ParamGrid getDefaultGridPtr(int param_id)
-
create
public static SVM create()
-
getTermCriteria
public TermCriteria getTermCriteria()
-
trainAuto
public boolean trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid, ParamGrid coeffGrid, ParamGrid degreeGrid, boolean balanced)
-
trainAuto
public boolean trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid, ParamGrid coeffGrid, ParamGrid degreeGrid)
-
trainAuto
public boolean trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid, ParamGrid coeffGrid)
-
trainAuto
public boolean trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid)
-
trainAuto
public boolean trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid)
-
trainAuto
public boolean trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid)
-
trainAuto
public boolean trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid)
-
getC
public double getC()
-
getCoef0
public double getCoef0()
-
getDegree
public double getDegree()
-
getGamma
public double getGamma()
-
getNu
public double getNu()
-
getP
public double getP()
-
getKernelType
public int getKernelType()
-
getType
public int getType()
-
setC
public void setC(double val)
-
setClassWeights
public void setClassWeights(Mat val)
-
setCoef0
public void setCoef0(double val)
-
setDegree
public void setDegree(double val)
-
setGamma
public void setGamma(double val)
-
setKernel
public void setKernel(int kernelType)
-
setNu
public void setNu(double val)
-
setP
public void setP(double val)
-
setTermCriteria
public void setTermCriteria(TermCriteria val)
-
setType
public void setType(int val)
-
-