How do I assign classes to a Matlab dataset?
<p>I'm currently trying to create a diagnostic tool for predicting disease outcome. I want to do this by training a Nearest Mean Classifier (NMC) over candidate genes and evaluate its error by using a test set. For this end I generated a train dataset and test dataset using gendat from PrTools. Only, when I want to train the NMC Matlab gives the error that the train dataset doesn't have classes. How do I assign classes to the dataset?</p>

<pre><code>load vantVeer.mat
% D.data is data from vantVeer
[train_data,test_data,I_train,I_test]=gendat(D.data',39);
W=nmc(train_data)

Error using isvaldfile (line 48)

Labeled datafile(set) expected

Error in nmc (line 52)
isvaldfile(a,1,2); % at least 1 object per class, 2 classes
</code></pre>