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 int
C
static int
C_SVC
static int
CHI2
static int
COEF
static int
CUSTOM
static int
DEGREE
static int
EPS_SVR
static int
GAMMA
static int
INTER
static int
LINEAR
static int
NU
static int
NU_SVC
static int
NU_SVR
static int
ONE_CLASS
static int
P
static int
POLY
static int
RBF
static int
SIGMOID
-
Fields inherited from class org.opencv.ml.StatModel
COMPRESSED_INPUT, PREPROCESSED_INPUT, RAW_OUTPUT, UPDATE_MODEL
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SVM(long addr)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SVM
__fromPtr__(long addr)
static SVM
create()
protected void
finalize()
double
getC()
Mat
getClassWeights()
double
getCoef0()
double
getDecisionFunction(int i, Mat alpha, Mat svidx)
static ParamGrid
getDefaultGridPtr(int param_id)
double
getDegree()
double
getGamma()
int
getKernelType()
double
getNu()
double
getP()
Mat
getSupportVectors()
TermCriteria
getTermCriteria()
int
getType()
Mat
getUncompressedSupportVectors()
static SVM
load(java.lang.String filepath)
void
setC(double val)
void
setClassWeights(Mat val)
void
setCoef0(double val)
void
setDegree(double val)
void
setGamma(double val)
void
setKernel(int kernelType)
void
setNu(double val)
void
setP(double val)
void
setTermCriteria(TermCriteria val)
void
setType(int val)
boolean
trainAuto(Mat samples, int layout, Mat responses)
boolean
trainAuto(Mat samples, int layout, Mat responses, int kFold)
boolean
trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid)
boolean
trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid)
boolean
trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid)
boolean
trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid)
boolean
trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid, ParamGrid coeffGrid)
boolean
trainAuto(Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid, ParamGrid coeffGrid, ParamGrid degreeGrid)
boolean
trainAuto(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
-
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_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
-
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()
-
load
public static SVM load(java.lang.String filepath)
-
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)
-
-