read_samples_class_svmT_read_samples_class_svmReadSamplesClassSvmReadSamplesClassSvmread_samples_class_svm (Operator)

Name

read_samples_class_svmT_read_samples_class_svmReadSamplesClassSvmReadSamplesClassSvmread_samples_class_svm — Read the training data of a support vector machine from a file.

Signature

read_samples_class_svm( : : SVMHandle, FileName : )

Herror T_read_samples_class_svm(const Htuple SVMHandle, const Htuple FileName)

void ReadSamplesClassSvm(const HTuple& SVMHandle, const HTuple& FileName)

void HClassSvm::ReadSamplesClassSvm(const HString& FileName) const

void HClassSvm::ReadSamplesClassSvm(const char* FileName) const

void HClassSvm::ReadSamplesClassSvm(const wchar_t* FileName) const   (Windows only)

static void HOperatorSet.ReadSamplesClassSvm(HTuple SVMHandle, HTuple fileName)

void HClassSvm.ReadSamplesClassSvm(string fileName)

def read_samples_class_svm(svmhandle: HHandle, file_name: str) -> None

Description

read_samples_class_svmread_samples_class_svmReadSamplesClassSvmReadSamplesClassSvmReadSamplesClassSvmread_samples_class_svm reads training samples from the file given by FileNameFileNameFileNameFileNamefileNamefile_name and adds them to the training samples that have already been added to the support vector machine (SVM) given by SVMHandleSVMHandleSVMHandleSVMHandleSVMHandlesvmhandle. The SVM must be created with create_class_svmcreate_class_svmCreateClassSvmCreateClassSvmCreateClassSvmcreate_class_svm before calling read_samples_class_svmread_samples_class_svmReadSamplesClassSvmReadSamplesClassSvmReadSamplesClassSvmread_samples_class_svm. As described with train_class_svmtrain_class_svmTrainClassSvmTrainClassSvmTrainClassSvmtrain_class_svm and write_samples_class_svmwrite_samples_class_svmWriteSamplesClassSvmWriteSamplesClassSvmWriteSamplesClassSvmwrite_samples_class_svm, the operators read_samples_class_svmread_samples_class_svmReadSamplesClassSvmReadSamplesClassSvmReadSamplesClassSvmread_samples_class_svm, add_sample_class_svmadd_sample_class_svmAddSampleClassSvmAddSampleClassSvmAddSampleClassSvmadd_sample_class_svm, and write_samples_class_svmwrite_samples_class_svmWriteSamplesClassSvmWriteSamplesClassSvmWriteSamplesClassSvmwrite_samples_class_svm can be used to build up a extensive set of training samples, and hence to improve the performance of the SVM by retraining the SVM with extended data sets.

It should be noted that the training samples must have the correct dimensionality. The feature vectors and target vectors stored in FileNameFileNameFileNameFileNamefileNamefile_name must have the lengths NumFeaturesNumFeaturesNumFeaturesNumFeaturesnumFeaturesnum_features and NumClassesNumClassesNumClassesNumClassesnumClassesnum_classes that were specified with create_class_svmcreate_class_svmCreateClassSvmCreateClassSvmCreateClassSvmcreate_class_svm. The target is stored in vector form for compatibility reason with the MLP (see read_samples_class_mlpread_samples_class_mlpReadSamplesClassMlpReadSamplesClassMlpReadSamplesClassMlpread_samples_class_mlp). If the dimensions are incorrect an error message is returned.

Execution Information

This operator modifies the state of the following input parameter:

During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.

Parameters

SVMHandleSVMHandleSVMHandleSVMHandleSVMHandlesvmhandle (input_control, state is modified)  class_svm HClassSvm, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

SVM handle.

FileNameFileNameFileNameFileNamefileNamefile_name (input_control)  filename.read HTuplestrHTupleHtuple (string) (string) (HString) (char*)

File name.

Result

If the parameters are valid the operator read_samples_class_svmread_samples_class_svmReadSamplesClassSvmReadSamplesClassSvmReadSamplesClassSvmread_samples_class_svm returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Possible Predecessors

create_class_svmcreate_class_svmCreateClassSvmCreateClassSvmCreateClassSvmcreate_class_svm

Possible Successors

train_class_svmtrain_class_svmTrainClassSvmTrainClassSvmTrainClassSvmtrain_class_svm

Alternatives

add_sample_class_svmadd_sample_class_svmAddSampleClassSvmAddSampleClassSvmAddSampleClassSvmadd_sample_class_svm

See also

write_samples_class_svmwrite_samples_class_svmWriteSamplesClassSvmWriteSamplesClassSvmWriteSamplesClassSvmwrite_samples_class_svm, clear_samples_class_svmclear_samples_class_svmClearSamplesClassSvmClearSamplesClassSvmClearSamplesClassSvmclear_samples_class_svm

Module

Foundation