![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175128/image.jpeg)
TRAINING must be a numeric matrix.
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Can anyone help me solving this error?
0 Kommentare
Antworten (2)
John BG
am 28 Sep. 2016
hi Hazel
read the help for command training
c = cvpartition(10,'kfold',3)
c =
K-fold cross validation partition
N: 10
NumTestSets: 3
TrainSize: 7 6 7
TestSize: 3 4 3
training(c,1)
ans =
0
0
1
1
1
1
1
1
0
1
as you can see, the input is not just an array of numbers, it has to belong to a certain class in this case, class cvpartition
checking the class cvpartition we get these different ways that cvpartition objects can be generated:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175128/image.jpeg)
please, if you find my answer useful, would you be so kind to mark it as accepted answer?
thanks in advance. Regards
John BG
0 Kommentare
Star Strider
am 28 Sep. 2016
If your data are currently in a cell array, consider using the cell2mat function.
If your data are currently in a table, getting the data into a numeric array is a bit more involved. See Access Data in a Table for details.
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!