Hi Patrick,
The error you encountered is caused because you passed dsd_Test as your validation data, and MATLAB requires at least 2 columns in the validation data. Since dsd_Test is created from the file dataTest, it only has a 1x1 cell as its contents.
This issue can be resolved in two ways:
1) While performing the data partition into testing and training sets, set the proportion of test data to anything greater than 0.1. For example:
[idxTrain, idxTest] = trainingPartitions(numObservations, [0.8 0.2]);
This ensures that dataTest contains at least 2 columns and resolves the error.
2) Assuming that the file dataTest contains a 5x3091 double matrix, as contained in the training set, you can pass the matrix instead of the cell array as the validation data. MATLAB allows the validation data to be a matrix as well. This approach would solve your problem. To do this, follow these steps:
- Create a variable testDataMatrix.
testDataMatrix = dataTest{1,1};
2. Once this variable is created, you can select it in the "Validation data" drop-down list.
I hope this helps.
Regards,
Avadhoot