get_sample_num_class_knnT_get_sample_num_class_knnGetSampleNumClassKnnGetSampleNumClassKnnget_sample_num_class_knn (Operator)
Name
get_sample_num_class_knnT_get_sample_num_class_knnGetSampleNumClassKnnGetSampleNumClassKnnget_sample_num_class_knn
— Return the number of training samples stored in the training data of
a k-nearest neighbors (k-NN) classifier.
Signature
def get_sample_num_class_knn(knnhandle: HHandle) -> int
Description
get_sample_num_class_knnget_sample_num_class_knnGetSampleNumClassKnnGetSampleNumClassKnnget_sample_num_class_knn
returns in NumSamplesNumSamplesNumSamplesnumSamplesnum_samples
the
number of training samples that are stored in the k-nearest neighbors
(k-NN) classifier given by KNNHandleKNNHandleKNNHandleKNNHandleknnhandle
.
get_sample_num_class_knnget_sample_num_class_knnGetSampleNumClassKnnGetSampleNumClassKnnget_sample_num_class_knn
should be called before the
individual training samples are accessed with
get_sample_class_knnget_sample_class_knnGetSampleClassKnnGetSampleClassKnnget_sample_class_knn
.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
KNNHandleKNNHandleKNNHandleKNNHandleknnhandle
(input_control) class_knn →
HClassKnn, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the k-NN classifier.
NumSamplesNumSamplesNumSamplesnumSamplesnum_samples
(output_control) integer →
HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Number of stored training samples.
Result
If KNNHandleKNNHandleKNNHandleKNNHandleknnhandle
is valid, the operator
get_sample_num_class_knnget_sample_num_class_knnGetSampleNumClassKnnGetSampleNumClassKnnget_sample_num_class_knn
returns the value 2 (
H_MSG_TRUE)
. If
necessary, an exception is raised.
Possible Predecessors
add_sample_class_knnadd_sample_class_knnAddSampleClassKnnAddSampleClassKnnadd_sample_class_knn
Possible Successors
get_sample_class_knnget_sample_class_knnGetSampleClassKnnGetSampleClassKnnget_sample_class_knn
See also
create_class_knncreate_class_knnCreateClassKnnCreateClassKnncreate_class_knn
Module
Foundation