Create the KNearest classifier using the specific traing data.
| C# | Visual Basic | Visual C++ |
- trainData (IntPtr)
- The training data. A 32-bit floating-point, single-channel matrix, one vector per row
- responses (IntPtr)
- A floating-point matrix of the corresponding output vectors, one vector per row.
- sampleIdx (IntPtr)
- Can be IntPtr.Zero if not needed. When specified, identifies samples of interest. It is a Matrix>int< of nx1
- isRegression (Boolean)
- Specify the output variables type. It can be either categorical (isRegression=false) or ordered (isRegression=true)
- maxK (Int32)
- The number of maximum neighbors that may be passed to the method findNearest.
The KNearest classifier