ClassesClasses | | Operators

add_sample_class_train_dataT_add_sample_class_train_dataAddSampleClassTrainDataAddSampleClassTrainData (Operator)

Name

add_sample_class_train_dataT_add_sample_class_train_dataAddSampleClassTrainDataAddSampleClassTrainData — Add a training sample to training data.

Signature

add_sample_class_train_data( : : ClassTrainDataHandle, Order, Features, ClassID : )

Herror T_add_sample_class_train_data(const Htuple ClassTrainDataHandle, const Htuple Order, const Htuple Features, const Htuple ClassID)

void AddSampleClassTrainData(const HTuple& ClassTrainDataHandle, const HTuple& Order, const HTuple& Features, const HTuple& ClassID)

void HClassTrainData::AddSampleClassTrainData(const HString& Order, const HTuple& Features, const HTuple& ClassID) const

void HClassTrainData::AddSampleClassTrainData(const char* Order, const HTuple& Features, const HTuple& ClassID) const

static void HOperatorSet.AddSampleClassTrainData(HTuple classTrainDataHandle, HTuple order, HTuple features, HTuple classID)

void HClassTrainData.AddSampleClassTrainData(string order, HTuple features, HTuple classID)

Description

add_sample_class_train_dataadd_sample_class_train_dataAddSampleClassTrainDataAddSampleClassTrainDataAddSampleClassTrainData adds a training sample to the training data given by ClassTrainDataHandleClassTrainDataHandleClassTrainDataHandleClassTrainDataHandleclassTrainDataHandle. The training sample is given by FeaturesFeaturesFeaturesFeaturesfeatures and ClassIDClassIDClassIDClassIDclassID. FeaturesFeaturesFeaturesFeaturesfeatures is the feature vector of the sample, and consequently must be a real vector of length NumDim, as specified in create_class_train_datacreate_class_train_dataCreateClassTrainDataCreateClassTrainDataCreateClassTrainData. ClassIDClassIDClassIDClassIDclassID is the class of the sample. More than one trainings sample can be added at once. In this case the parameter OrderOrderOrderOrderorder defines in which order the elements of the feature vectors are passed in FeaturesFeaturesFeaturesFeaturesfeatures. If it is set to 'row'"row""row""row""row", the first training sample comes first, the second comes second, and so on. If it is set to 'column'"column""column""column""column", the first dimension of all feature vectors comes first, and then the second dimension of all feature vectors, and so on. The third possible mode for OrderOrderOrderOrderorder is 'feature_column'"feature_column""feature_column""feature_column""feature_column". This mode expects features which were grouped before with set_feature_lengths_class_train_dataset_feature_lengths_class_train_dataSetFeatureLengthsClassTrainDataSetFeatureLengthsClassTrainDataSetFeatureLengthsClassTrainData to come completely and row-wise before the second feature, and so on.

Execution Information

This operator modifies the state of the following input parameter:

The value of this parameter may not be shared across multiple threads without external synchronization.

Parameters

ClassTrainDataHandleClassTrainDataHandleClassTrainDataHandleClassTrainDataHandleclassTrainDataHandle (input_control, state is modified)  class_train_data HClassTrainData, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Handle of the training data.

OrderOrderOrderOrderorder (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

The order of the feature vector.

Default value: 'row' "row" "row" "row" "row"

List of values: 'column'"column""column""column""column", 'feature_column'"feature_column""feature_column""feature_column""feature_column", 'row'"row""row""row""row"

FeaturesFeaturesFeaturesFeaturesfeatures (input_control)  number-array HTupleHTupleHtuple (real) (double) (double) (double)

Feature vector of the training sample.

ClassIDClassIDClassIDClassIDclassID (input_control)  integer-array HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Class of the training sample.

Result

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

Possible Predecessors

create_class_train_datacreate_class_train_dataCreateClassTrainDataCreateClassTrainDataCreateClassTrainData

Possible Successors

add_class_train_data_svmadd_class_train_data_svmAddClassTrainDataSvmAddClassTrainDataSvmAddClassTrainDataSvm, add_class_train_data_knnadd_class_train_data_knnAddClassTrainDataKnnAddClassTrainDataKnnAddClassTrainDataKnn, add_class_train_data_gmmadd_class_train_data_gmmAddClassTrainDataGmmAddClassTrainDataGmmAddClassTrainDataGmm, add_class_train_data_mlpadd_class_train_data_mlpAddClassTrainDataMlpAddClassTrainDataMlpAddClassTrainDataMlp

See also

create_class_train_datacreate_class_train_dataCreateClassTrainDataCreateClassTrainDataCreateClassTrainData

Module

Foundation


ClassesClasses | | Operators