SVMSGD
**********************************************************************************\ Stochastic Gradient Descent SVM Classifier * ************************************************************************************
Member of Ml
-
Creates empty model. Use StatModel::train to train the model. Since %SVMSGD has several parameters, you may want to find the best parameters for your problem or use setOptimalParameters() to set some default parameters.
Declaration
Objective-C
+ (nonnull SVMSGD *)create;
Swift
class func create() -> SVMSGD
-
Loads and creates a serialized SVMSGD from a file
Use SVMSGD::save to serialize and store an SVMSGD to disk. Load the SVMSGD from this file again, by calling this function with the path to the file. Optionally specify the node for the file containing the classifier
Declaration
Objective-C
+ (nonnull SVMSGD *)load:(nonnull NSString *)filepath nodeName:(nonnull NSString *)nodeName;
Swift
class func load(filepath: String, nodeName: String) -> SVMSGD
Parameters
filepath
path to serialized SVMSGD
nodeName
name of node containing the classifier
-
Loads and creates a serialized SVMSGD from a file
Use SVMSGD::save to serialize and store an SVMSGD to disk. Load the SVMSGD from this file again, by calling this function with the path to the file. Optionally specify the node for the file containing the classifier
Declaration
Objective-C
+ (nonnull SVMSGD *)load:(nonnull NSString *)filepath;
Swift
class func load(filepath: String) -> SVMSGD
Parameters
filepath
path to serialized SVMSGD
-
Declaration
Objective-C
- (nonnull TermCriteria *)getTermCriteria;
Swift
func getTermCriteria() -> TermCriteria
-
Declaration
Objective-C
- (float)getInitialStepSize;
Swift
func getInitialStepSize() -> Float
-
Declaration
Objective-C
- (float)getMarginRegularization;
Swift
func getMarginRegularization() -> Float
-
Declaration
Objective-C
- (float)getShift;
Swift
func getShift() -> Float
Return Value
the shift of the trained model (decision function f(x) = weights * x + shift).
-
Declaration
Objective-C
- (float)getStepDecreasingPower;
Swift
func getStepDecreasingPower() -> Float
-
See
-setMarginType:
Declaration
Objective-C
- (int)getMarginType;
Swift
func getMarginType() -> Int32
-
See
-setSvmsgdType:
Declaration
Objective-C
- (int)getSvmsgdType;
Swift
func getSvmsgdType() -> Int32
-
getInitialStepSize - see:
-getInitialStepSize:
Declaration
Objective-C
- (void)setInitialStepSize:(float)InitialStepSize;
Swift
func setInitialStepSize(InitialStepSize: Float)
-
getMarginRegularization - see:
-getMarginRegularization:
Declaration
Objective-C
- (void)setMarginRegularization:(float)marginRegularization;
Swift
func setMarginRegularization(marginRegularization: Float)
-
getMarginType - see:
-getMarginType:
Declaration
Objective-C
- (void)setMarginType:(int)marginType;
Swift
func setMarginType(marginType: Int32)
-
Function sets optimal parameters values for chosen SVM SGD model.
Declaration
Objective-C
- (void)setOptimalParameters:(int)svmsgdType marginType:(int)marginType;
Swift
func setOptimalParameters(svmsgdType: Int32, marginType: Int32)
Parameters
svmsgdType
is the type of SVMSGD classifier.
marginType
is the type of margin constraint.
-
Function sets optimal parameters values for chosen SVM SGD model.
Declaration
Objective-C
- (void)setOptimalParameters:(int)svmsgdType;
Swift
func setOptimalParameters(svmsgdType: Int32)
Parameters
svmsgdType
is the type of SVMSGD classifier.
-
Function sets optimal parameters values for chosen SVM SGD model.
Declaration
Objective-C
- (void)setOptimalParameters;
Swift
func setOptimalParameters()
-
getStepDecreasingPower - see:
-getStepDecreasingPower:
Declaration
Objective-C
- (void)setStepDecreasingPower:(float)stepDecreasingPower;
Swift
func setStepDecreasingPower(stepDecreasingPower: Float)
-
getSvmsgdType - see:
-getSvmsgdType:
Declaration
Objective-C
- (void)setSvmsgdType:(int)svmsgdType;
Swift
func setSvmsgdType(svmsgdType: Int32)
-
getTermCriteria - see:
-getTermCriteria:
Declaration
Objective-C
- (void)setTermCriteria:(nonnull TermCriteria *)val;
Swift
func setTermCriteria(val: TermCriteria)