I have a previous question here and I think im running into a problem because I cant shuffle the sample data and the indices of sample data (idx) at the same time.
I have a dataset called fulldata of which contains 49 thousand rows by 6 columns, I then have another dataset which is the class labels for fulldata (Book2) which contains numerous class labels which correspond to the exact rows in fulldata.
I wanted to only pick two class labels from fulldata (normal. and smurf.) of which I wanted 750 normal rows and 250 smurf rows.
I then wanted to shuffle randomly the new sample data (1000×6).
Up to this point was managed. But then I get stuck… Dan helped on the previous question but then I noticed that k1 outputs some of the other class labels from Book2 such as neptune etc and that shouldnt be the case… K1 should only contain smurf and normal class labels.
The reason why I ask this is because I want to use the baysian classifier in matlab and in order to use it I need:
Test_Data (unseen data)
Trainning_data (This is the sample data im trying to create above)
Target_class (this is the class labels that match exactly each row in sample data)
I think you want
And then make sure you use @Dan’s recommendation from the previous question, i.e.