F_VN_CreateSvmSgdClassifier
Create a linear SVM classifier using stochastic gradient descent for training. The initial reference count is set to one if a new model is created and kept, otherwise. This SVM classifier is only applicable to binary classification problems. It learns a separating hyperplane between a class with label -1 and a class with label 1. These class labels are predefined. For training, any positive class labels are mapped to 1 and any negative class labels are mapped to -1. Models of this type neither support on-line training (sample by sample) nor retraining.
Syntax
Definition:
FUNCTION F_VN_CreateSvmSgdClassifier : HRESULT
VAR_INPUT
ipMlModel : Reference To ITcVnMlModel;
hrPrev : HRESULT;
END_VAR
Inputs
Name |
Type |
Description |
---|---|---|
ipMlModel |
Reference To ITcVnMlModel |
Returns the created model (Non-zero interface pointers are reused.) |
hrPrev |
HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.) |
Further information
The function F_VN_CreateSvmSgdClassifier
creates a Support Vector Machine model with a linear kernel that is used in the Stochastic Gradient Descent (SVM-SGD) training.
SVM-SGD models
This SVM classifier model is only applicable to binary classification problems. It learns a separating hyperplane between a class with the label -1 and a class with the label 1. All samples are required simultaneously for the training (batch training) and post-training is not possible.
Parameter
Expert parameters
The expert variant F_VN_CreateSvmSgdClassifierExp contains additional parameters.
Application
For example, an SVM-SGD model for classification can be created like this:
hr := F_VN_CreateSvmSgdClassifier(
ipMlModel := ipMlModel,
hrPrev := hr);
Required License
TC3 Vision Machine Learning
System Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT V3.1.4024.54 or later | PC or CX (x64) with PL50, e.g. Intel 4-core Atom CPU | Tc3_Vision |