CreateLbgModel
Create a LBG model of the specified type. The initial reference count is set to one if a new model is created and kept, otherwise. Models of this type neither support on-line training (sample by sample) nor retraining.
Syntax
Definition:
HRESULT CreateLbgModel(
HRESULT hrPrev,
ITcVnMlModel*& ipMlModel,
ETcVnPrototypeClusterer eLbgType,
ULONG nMaxClusters,
double fMaxClusterRadius,
bool bSingleSplitSteps,
bool bDoublePrecision = false,
ULONG nMaxIterations = 0,
double fEpsilon = 0.0
)
Parameters
Name |
Type |
Default |
Description |
---|---|---|---|
hrPrev |
|
HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.) | |
ipMlModel |
|
Returns the created model (Non-zero interface pointers are reused.) | |
eLbgType |
|
LBG model type | |
nMaxClusters |
ULONG |
|
Maximum number of clusters |
fMaxClusterRadius |
double |
|
Maximum allowed radius (L2 norm) of a single cluster, i.e. clusters with a higher radius will be split into smaller ones, until a global number of nMaxClusters is reached. |
bSingleSplitSteps |
bool |
|
If true, the global optimization is always run after a single cluster has been split. If false, several clusters are split within the same step before applying the global optimization. Applying the global optimization less often is faster, but can lead to less optimal results, especially having 2 nearby clusters that could be represented by 1. |
bDoublePrecision |
bool |
false |
If true, the model is generated with double precision (LREAL) instead of single precision (REAL). (default: FALSE) |
nMaxIterations |
ULONG |
0 |
Maximum number of iterations (triggers the usage of the default value of 10 if it equals 0) |
fEpsilon |
double |
0.0 |
Maximum allowed difference of the error between two successive iterations (triggers the usage of the default value of 0.001 if it equals 0) |
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 |