get_params_class_knnT_get_params_class_knnGetParamsClassKnnGetParamsClassKnnget_params_class_knn (Operator)

Name

get_params_class_knnT_get_params_class_knnGetParamsClassKnnGetParamsClassKnnget_params_class_knn — Get parameters of a k-NN classification.

Signature

get_params_class_knn( : : KNNHandle, GenParamName : GenParamValue)

Herror T_get_params_class_knn(const Htuple KNNHandle, const Htuple GenParamName, Htuple* GenParamValue)

void GetParamsClassKnn(const HTuple& KNNHandle, const HTuple& GenParamName, HTuple* GenParamValue)

HTuple HClassKnn::GetParamsClassKnn(const HTuple& GenParamName) const

static void HOperatorSet.GetParamsClassKnn(HTuple KNNHandle, HTuple genParamName, out HTuple genParamValue)

HTuple HClassKnn.GetParamsClassKnn(HTuple genParamName)

def get_params_class_knn(knnhandle: HHandle, gen_param_name: Sequence[str]) -> Sequence[Union[int, float, str]]

Description

get_params_class_knnget_params_class_knnGetParamsClassKnnGetParamsClassKnnget_params_class_knn gets parameters of the k-NN referred by KNNHandleKNNHandleKNNHandleKNNHandleknnhandle. The possible entries in GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name are:

'method'"method""method""method""method":

Retrieve the currently selected method for determining the result of classify_class_knnclassify_class_knnClassifyClassKnnClassifyClassKnnclassify_class_knn. The result can be 'classes_distance'"classes_distance""classes_distance""classes_distance""classes_distance", 'classes_frequency'"classes_frequency""classes_frequency""classes_frequency""classes_frequency", 'classes_weighted_frequencies'"classes_weighted_frequencies""classes_weighted_frequencies""classes_weighted_frequencies""classes_weighted_frequencies" or 'neighbors_distance'"neighbors_distance""neighbors_distance""neighbors_distance""neighbors_distance".

'k'"k""k""k""k":

The number of nearest neighbors that is considered to determine the results.

'max_num_classes'"max_num_classes""max_num_classes""max_num_classes""max_num_classes":

The maximum number of classes that are returned. This parameter is ignored in case the method 'neighbors_distance'"neighbors_distance""neighbors_distance""neighbors_distance""neighbors_distance" is selected.

'num_checks'"num_checks""num_checks""num_checks""num_checks":

Defines the maximum number of runs through the trees.

'epsilon'"epsilon""epsilon""epsilon""epsilon":

A parameter to lower the accuracy in the tree to gain speed.

Execution Information

Parameters

KNNHandleKNNHandleKNNHandleKNNHandleknnhandle (input_control)  class_knn HClassKnn, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the k-NN classifier.

GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control)  string-array HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Names of the parameters that can be read from the k-NN classifier.

Default: ['method','k'] ["method","k"] ["method","k"] ["method","k"] ["method","k"]

List of values: 'epsilon'"epsilon""epsilon""epsilon""epsilon", 'k'"k""k""k""k", 'method'"method""method""method""method", 'num_checks'"num_checks""num_checks""num_checks""num_checks"

GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (output_control)  number-array HTupleSequence[Union[int, float, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)

Values of the selected parameters.

Result

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

Possible Predecessors

train_class_knntrain_class_knnTrainClassKnnTrainClassKnntrain_class_knn, read_class_knnread_class_knnReadClassKnnReadClassKnnread_class_knn

Possible Successors

classify_class_knnclassify_class_knnClassifyClassKnnClassifyClassKnnclassify_class_knn

See also

create_class_knncreate_class_knnCreateClassKnnCreateClassKnncreate_class_knn, read_class_knnread_class_knnReadClassKnnReadClassKnnread_class_knn

References

Marius Muja, David G. Lowe: “Fast Approximate Nearest Neighbors with Automatic Algorithm Configuration”; International Conference on Computer Vision Theory and Applications (VISAPP 09); 2009.

Module

Foundation