Hi everyone, I use Matlab to code some metaheuristic algorithms for feature selection. Before Matlab, I mostly used Weka.
I selected all features and sent to the KNN classifier to compare with the Weka to satisfy my curiosity. Lets say we have 50 features in the dataset and all of them are selected. I run the code 10 times and here is what KNN produces in Matlab as Error Rate with K=3 and 10-fold.
Here is what Weka produces for every run: 0.26333
Why Matlab produces different results? Why it is different than Weka? I used same dataset with same features and the same parameters (K=3 and 10-fold). I am confused. Here is my code snippet that Error Rate from KNN is generated: