Closed ruchikasonagote closed 2 months ago
I do not understand what the code does, but ac = find (gnY, ClassNames{i})
looks wrong, perhaps it should be
ac = find (strcmp(gnY, ClassNames{i}))
?
Thanks @dasergatskov for pointing this out. I included the above code snippet as a unit test.
I encountered an error while attempting to create a K-Nearest Neighbor classifier using the Iris dataset. The error message indicates a problem with the 'N' parameter, specifically:![image](https://github.com/gnu-octave/statistics/assets/111609654/23c6bc19-63be-4d1c-b8e6-f0c4d0a8c15b)
Code Snippet:
Expected Behavior: The
fitcknn
function should create a KNN classifier object.