get_sample_class_train_dataT_get_sample_class_train_dataGetSampleClassTrainDataGetSampleClassTrainData (Operator)

Name

get_sample_class_train_dataT_get_sample_class_train_dataGetSampleClassTrainDataGetSampleClassTrainData — Return a training sample from training data.

Signature

get_sample_class_train_data( : : ClassTrainDataHandle, IndexSample : Features, ClassID)

Herror T_get_sample_class_train_data(const Htuple ClassTrainDataHandle, const Htuple IndexSample, Htuple* Features, Htuple* ClassID)

void GetSampleClassTrainData(const HTuple& ClassTrainDataHandle, const HTuple& IndexSample, HTuple* Features, HTuple* ClassID)

HTuple HClassTrainData::GetSampleClassTrainData(Hlong IndexSample, Hlong* ClassID) const

static void HOperatorSet.GetSampleClassTrainData(HTuple classTrainDataHandle, HTuple indexSample, out HTuple features, out HTuple classID)

HTuple HClassTrainData.GetSampleClassTrainData(int indexSample, out int classID)

Description

get_sample_class_train_dataget_sample_class_train_dataGetSampleClassTrainDataGetSampleClassTrainDataGetSampleClassTrainData reads a training sample from the training data given by ClassTrainDataHandleClassTrainDataHandleClassTrainDataHandleClassTrainDataHandleclassTrainDataHandle that was added, e.g., with add_sample_class_train_dataadd_sample_class_train_dataAddSampleClassTrainDataAddSampleClassTrainDataAddSampleClassTrainData. The index of the sample is specified with IndexSampleIndexSampleIndexSampleIndexSampleindexSample. The index is counted from 0. That means that IndexSampleIndexSampleIndexSampleIndexSampleindexSample must be a number between 0 and NumSamples - 1, where NumSamples can be determined with get_sample_num_class_train_dataget_sample_num_class_train_dataGetSampleNumClassTrainDataGetSampleNumClassTrainDataGetSampleNumClassTrainData. The training sample is returned in FeaturesFeaturesFeaturesFeaturesfeatures and ClassIDClassIDClassIDClassIDclassID. FeaturesFeaturesFeaturesFeaturesfeatures is a feature vector of length NumDim (see create_class_train_datacreate_class_train_dataCreateClassTrainDataCreateClassTrainDataCreateClassTrainData) and ClassIDClassIDClassIDClassIDclassID is the class of the feature vector.

Execution Information

Parameters

ClassTrainDataHandleClassTrainDataHandleClassTrainDataHandleClassTrainDataHandleclassTrainDataHandle (input_control)  class_train_data HClassTrainData, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of training data for a classifier.

IndexSampleIndexSampleIndexSampleIndexSampleindexSample (input_control)  integer HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of stored training sample.

FeaturesFeaturesFeaturesFeaturesfeatures (output_control)  real-array HTupleHTupleHtuple (real) (double) (double) (double)

Feature vector of the training sample.

ClassIDClassIDClassIDClassIDclassID (output_control)  integer HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Class of the training sample.

Result

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

Possible Predecessors

add_sample_class_train_dataadd_sample_class_train_dataAddSampleClassTrainDataAddSampleClassTrainDataAddSampleClassTrainData

See also

create_class_train_datacreate_class_train_dataCreateClassTrainDataCreateClassTrainDataCreateClassTrainData

Module

Foundation