add_sample_class_train_dataT_add_sample_class_train_dataAddSampleClassTrainDataAddSampleClassTrainDataadd_sample_class_train_data (Operator)
Name
add_sample_class_train_dataT_add_sample_class_train_dataAddSampleClassTrainDataAddSampleClassTrainDataadd_sample_class_train_data
— Add a training sample to training data.
Signature
Description
add_sample_class_train_dataadd_sample_class_train_dataAddSampleClassTrainDataAddSampleClassTrainDataAddSampleClassTrainDataadd_sample_class_train_data
adds a training sample to the
training data given by ClassTrainDataHandleClassTrainDataHandleClassTrainDataHandleClassTrainDataHandleclassTrainDataHandleclass_train_data_handle
. The
training sample is given by FeaturesFeaturesFeaturesFeaturesfeaturesfeatures
and ClassIDClassIDClassIDClassIDclassIDclass_id
.
FeaturesFeaturesFeaturesFeaturesfeaturesfeatures
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_dataCreateClassTrainDataCreateClassTrainDataCreateClassTrainDatacreate_class_train_data
. ClassIDClassIDClassIDClassIDclassIDclass_id
is the
class of the sample. More than one training sample can be added at once.
In this case the parameter OrderOrderOrderOrderorderorder
defines in which order
the elements of the feature vectors are passed in FeaturesFeaturesFeaturesFeaturesfeaturesfeatures
.
If it is set to 'row'"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""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 OrderOrderOrderOrderorderorder
is
'feature_column'"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_dataSetFeatureLengthsClassTrainDataSetFeatureLengthsClassTrainDataSetFeatureLengthsClassTrainDataset_feature_lengths_class_train_data
to come completely and row-wise before the second feature, and so on.
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
ClassTrainDataHandleClassTrainDataHandleClassTrainDataHandleClassTrainDataHandleclassTrainDataHandleclass_train_data_handle
(input_control, state is modified) class_train_data →
HClassTrainData, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the training data.
OrderOrderOrderOrderorderorder
(input_control) string →
HTuplestrHTupleHtuple (string) (string) (HString) (char*)
The order of the feature vector.
Default value:
'row'
"row"
"row"
"row"
"row"
"row"
List of values: 'column'"column""column""column""column""column", 'feature_column'"feature_column""feature_column""feature_column""feature_column""feature_column", 'row'"row""row""row""row""row"
FeaturesFeaturesFeaturesFeaturesfeaturesfeatures
(input_control) number-array →
HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Feature vector of the training sample.
ClassIDClassIDClassIDClassIDclassIDclass_id
(input_control) integer-array →
HTupleSequence[int]HTupleHtuple (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_dataAddSampleClassTrainDataAddSampleClassTrainDataAddSampleClassTrainDataadd_sample_class_train_data
returns the value 2 (H_MSG_TRUE). If necessary,
an exception is raised.
Possible Predecessors
create_class_train_datacreate_class_train_dataCreateClassTrainDataCreateClassTrainDataCreateClassTrainDatacreate_class_train_data
Possible Successors
add_class_train_data_svmadd_class_train_data_svmAddClassTrainDataSvmAddClassTrainDataSvmAddClassTrainDataSvmadd_class_train_data_svm
,
add_class_train_data_knnadd_class_train_data_knnAddClassTrainDataKnnAddClassTrainDataKnnAddClassTrainDataKnnadd_class_train_data_knn
,
add_class_train_data_gmmadd_class_train_data_gmmAddClassTrainDataGmmAddClassTrainDataGmmAddClassTrainDataGmmadd_class_train_data_gmm
,
add_class_train_data_mlpadd_class_train_data_mlpAddClassTrainDataMlpAddClassTrainDataMlpAddClassTrainDataMlpadd_class_train_data_mlp
See also
create_class_train_datacreate_class_train_dataCreateClassTrainDataCreateClassTrainDataCreateClassTrainDatacreate_class_train_data
Module
Foundation