Hello, hoping here somebody use matlab I do a question very simple (I don't know matlab at all and I have not idea how manage the matrixes)
I'm trying to use knnclassify in this way:
%pseudo-code
%test is matrix M x N
% group is 1..5
%training is a matrix Q x N
Q=10000
M=1000
for i=1: length(test)
class(i) = knnclassify(test(i, : ), training, group);
end
%pseudo-code
%test is matrix M x N
% group is 1..5
%training is a matrix Q x N
Q=10000
M=1000
for i=1: length(test)
class(i) = knnclassify(test(i, : ), training, group);
end
To copy to clipboard, switch view to plain text mode
The problem is that I'd like use all training set. but it seems that the rows of training (Q) must be equal to the number of group (5). So in this way I can only use 5 examples from the traininset.
How can I do? (I' not an expert of matlab, just newbie)
thanks,
Bookmarks