public class SVMSGD extends StatModel
Modifier and Type | Field and Description |
---|---|
static int |
ASGD |
static int |
HARD_MARGIN |
static int |
SGD |
static int |
SOFT_MARGIN |
COMPRESSED_INPUT, PREPROCESSED_INPUT, RAW_OUTPUT, UPDATE_MODEL
Modifier | Constructor and Description |
---|---|
protected |
SVMSGD(long addr) |
Modifier and Type | Method and Description |
---|---|
static SVMSGD |
__fromPtr__(long addr) |
static SVMSGD |
create()
Creates empty model.
|
protected void |
finalize() |
float |
getInitialStepSize()
SEE: setInitialStepSize
|
float |
getMarginRegularization()
SEE: setMarginRegularization
|
int |
getMarginType()
SEE: setMarginType
|
float |
getShift() |
float |
getStepDecreasingPower()
SEE: setStepDecreasingPower
|
int |
getSvmsgdType()
SEE: setSvmsgdType
|
TermCriteria |
getTermCriteria()
SEE: setTermCriteria
|
Mat |
getWeights() |
static SVMSGD |
load(String filepath)
Loads and creates a serialized SVMSGD from a file
Use SVMSGD::save to serialize and store an SVMSGD to disk.
|
static SVMSGD |
load(String filepath,
String nodeName)
Loads and creates a serialized SVMSGD from a file
Use SVMSGD::save to serialize and store an SVMSGD to disk.
|
void |
setInitialStepSize(float InitialStepSize)
getInitialStepSize SEE: getInitialStepSize
|
void |
setMarginRegularization(float marginRegularization)
getMarginRegularization SEE: getMarginRegularization
|
void |
setMarginType(int marginType)
getMarginType SEE: getMarginType
|
void |
setOptimalParameters()
Function sets optimal parameters values for chosen SVM SGD model.
|
void |
setOptimalParameters(int svmsgdType)
Function sets optimal parameters values for chosen SVM SGD model.
|
void |
setOptimalParameters(int svmsgdType,
int marginType)
Function sets optimal parameters values for chosen SVM SGD model.
|
void |
setStepDecreasingPower(float stepDecreasingPower)
getStepDecreasingPower SEE: getStepDecreasingPower
|
void |
setSvmsgdType(int svmsgdType)
getSvmsgdType SEE: getSvmsgdType
|
void |
setTermCriteria(TermCriteria val)
getTermCriteria SEE: getTermCriteria
|
calcError, empty, getVarCount, isClassifier, isTrained, predict, predict, predict, train, train, train
clear, getDefaultName, getNativeObjAddr, save
public static final int SGD
public static final int ASGD
public static final int SOFT_MARGIN
public static final int HARD_MARGIN
public static SVMSGD __fromPtr__(long addr)
public Mat getWeights()
public static SVMSGD create()
public static SVMSGD load(String filepath, String nodeName)
filepath
- path to serialized SVMSGDnodeName
- name of node containing the classifierpublic static SVMSGD load(String filepath)
filepath
- path to serialized SVMSGDpublic TermCriteria getTermCriteria()
public float getInitialStepSize()
public float getMarginRegularization()
public float getShift()
public float getStepDecreasingPower()
public int getMarginType()
public int getSvmsgdType()
public void setInitialStepSize(float InitialStepSize)
InitialStepSize
- automatically generatedpublic void setMarginRegularization(float marginRegularization)
marginRegularization
- automatically generatedpublic void setMarginType(int marginType)
marginType
- automatically generatedpublic void setOptimalParameters(int svmsgdType, int marginType)
svmsgdType
- is the type of SVMSGD classifier.marginType
- is the type of margin constraint.public void setOptimalParameters(int svmsgdType)
svmsgdType
- is the type of SVMSGD classifier.public void setOptimalParameters()
public void setStepDecreasingPower(float stepDecreasingPower)
stepDecreasingPower
- automatically generatedpublic void setSvmsgdType(int svmsgdType)
svmsgdType
- automatically generatedpublic void setTermCriteria(TermCriteria val)
val
- automatically generatedGenerated on Wed Oct 9 2019 23:24:43 UTC / OpenCV 4.1.2