Gets the nearest neighbor options for classifier session in.
Reference to the classifier session on which the node operates.
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.
Default: No error
Reference to the classifier session the node creates.
Options used in the Train Nearest Neighbor Classifier node.
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. |
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. |
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.
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.
Where This Node Can Run:
Desktop OS: Windows
FPGA: Not supported
Web Server: Not supported in VIs that run in a web application