0

I am trying to do knnclassify on test_data(10000X784), train_data(50000X784), train_label(50000X1) and k = 1

And I am calling this function as follows:

label = knnclassify(test_data,train_data,train_label,k);

Background:
Where train_label is numeric equivalent digit of the data given in train_data. I want to classify my test_data. The data in both the train and test are in random order, but the train_label totally corresponds with the data in the train_data.

In my friend's workstation it works fine, but in my laptop it gives this error:

    Undefined function 'knnclassify' for input arguments of type 'double'.

What could be the reason for the issue and how to solve it? Do I need to install any package? If yes how?

3

1 Answer 1

2

This error means that the function cannot be found in matlab, so you might missing the required toolbox. Just as @schorsch said you need to install the Bioinformatics toolbox.

A way to find out if the function is available in Matlab is typing which knnclassify. The output will be the route where the function resides or 'knnclassify' not found. otherwise.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.