You are here: Start » FIL.NET » Function Reference » Data Classification » Support Vector Machines » FIL.SVM_Train
Trains an SVM model.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void SVM_Train ( FilNet.SvmModel inSvmModel, IList<IList<float>> inVectorArray, IList<int> inAnswerArray, FilNet.SvmModel outSvmModel, out float outTrainingAccuracy )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inSvmModel | FilNet.SvmModel | Initialized SVM model. | ||
![]() | inVectorArray | System.Collections.Generic.IList<System.Collections.Generic.IList<float>> | Training data vector array. | ||
![]() | inAnswerArray | System.Collections.Generic.IList<int> | Correct classes for data vectors. | ||
![]() | outSvmModel | FilNet.SvmModel | Trained model. | ||
![]() | outTrainingAccuracy | float | Accuracy of prediction on training set. |
Description
The operation trains an SVM classifier initialized beforehand by SVM_Init function. It takes two arrays as arguments:
- inVectorArray, an array of data points with known classes
- inAnswerArray, an array of classes where the corresponding data points belong
Those two arrays have to be of the same size. Moreover, there have to be at least two classes within the training data set.
The output outSvmModel is an SVM_Model that may be used by SVM_ClassifySingle function.
outTrainingAccuracy is the fraction of correctly classified training data points.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Data vector cannot be empty in SVM_Train. |
DomainError | Incompatible array sizes in SVM_Train |
DomainError | Incompatible vector sizes in SVM_Train. |
DomainError | Incorrect or uninitialized SvmModel in Svm_Train. |
DomainError | SM model is already trained in SVM_Train. |