Table Of Contents

Get Nearest Neighbor Classifier Options (G Dataflow)

Last Modified: October 26, 2017

Gets the nearest neighbor options for classifier session in.

connector_pane_image
datatype_icon

classifier session in

Reference to the classifier session on which the node operates.

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

classifier session out

Reference to the classifier session the node creates.

datatype_icon

nearest neighbor options

Options used in the Train Nearest Neighbor Classifier node.

datatype_icon

method

Nearest neighbor classification method used.

Name Value Description
nearest neighbor 0

This is the most direct approach to classification. In nearest neighbor classification, the distance of an input sample of unknown class to another class is defined as the distance to the closest samples that are used to represent that class.

k nearest neighbor 1

This is more robust to noise compared with nearest neighbor classification. In k-nearest neighbor classification, an input feature vector is classified into a class based on a voting mechanism. The classifier finds K nearest samples from all the classes. The input feature vector of unknown class is assigned to the class with majority of the votes in the K nearest samples.

minimum mean distance 2

This is most effective in applications that have little or no feature pattern visibility or other corruptive influences. In minimum mean distance classification, an input feature vector of unknown class is classified based on its distance to each class center.

datatype_icon

metric

Distance metric used.

Name Value Description
maximum 0

This is the metric most sensitive to small variations between samples. Use maximum when you need to classify samples with very small differences into different classes.

sum 1

Also known as the Manhattan metric or Taxicab metric, tis is the metric used in most classification applications. This is the default value.

euclidean 2

This is the metric least sensitive to small variations between samples. Use euclidean when you need to classify samples with small differences into the same class.

datatype_icon

k

k is the k value used if method is set to k nearest neighbor.

If method is not set to k nearest neighbor, this value is ignored.

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics