Operator Reference

read_samples_class_svmT_read_samples_class_svmReadSamplesClassSvmReadSamplesClassSvmread_samples_class_svm (Operator)

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_svmReadSamplesClassSvmReadSamplesClassSvmread_samples_class_svm reads training samples from the file given by FileNameFileNameFileNamefileNamefile_name and adds them to the training samples that have already been added to the support vector machine (SVM) given by SVMHandleSVMHandleSVMHandleSVMHandlesvmhandle. The SVM must be created with create_class_svmcreate_class_svmCreateClassSvmCreateClassSvmcreate_class_svm before calling read_samples_class_svmread_samples_class_svmReadSamplesClassSvmReadSamplesClassSvmread_samples_class_svm. As described with train_class_svmtrain_class_svmTrainClassSvmTrainClassSvmtrain_class_svm and write_samples_class_svmwrite_samples_class_svmWriteSamplesClassSvmWriteSamplesClassSvmwrite_samples_class_svm, the operators read_samples_class_svmread_samples_class_svmReadSamplesClassSvmReadSamplesClassSvmread_samples_class_svm, add_sample_class_svmadd_sample_class_svmAddSampleClassSvmAddSampleClassSvmadd_sample_class_svm, and write_samples_class_svmwrite_samples_class_svmWriteSamplesClassSvmWriteSamplesClassSvmwrite_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 FileNameFileNameFileNamefileNamefile_name must have the lengths NumFeaturesNumFeaturesNumFeaturesnumFeaturesnum_features and NumClassesNumClassesNumClassesnumClassesnum_classes that were specified with create_class_svmcreate_class_svmCreateClassSvmCreateClassSvmcreate_class_svm. The target is stored in vector form for compatibility reason with the MLP (see read_samples_class_mlpread_samples_class_mlpReadSamplesClassMlpReadSamplesClassMlpread_samples_class_mlp). If the dimensions are incorrect an error message is returned.

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

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

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

SVM handle.

FileNameFileNameFileNamefileNamefile_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_svmReadSamplesClassSvmReadSamplesClassSvmread_samples_class_svm returns the value 2 ( H_MSG_TRUE) . If necessary, an exception is raised.

Possible Predecessors

create_class_svmcreate_class_svmCreateClassSvmCreateClassSvmcreate_class_svm

Possible Successors

train_class_svmtrain_class_svmTrainClassSvmTrainClassSvmtrain_class_svm

Alternatives

add_sample_class_svmadd_sample_class_svmAddSampleClassSvmAddSampleClassSvmadd_sample_class_svm

See also

write_samples_class_svmwrite_samples_class_svmWriteSamplesClassSvmWriteSamplesClassSvmwrite_samples_class_svm, clear_samples_class_svmclear_samples_class_svmClearSamplesClassSvmClearSamplesClassSvmclear_samples_class_svm

Module

Foundation