필터 지우기
필터 지우기

TRAINING must be a numeric matrix.

조회 수: 3 (최근 30일)
Hazel Sialongo
Hazel Sialongo 2016년 9월 28일
답변: Star Strider 2016년 9월 28일
Can anyone help me solving this error?

답변 (2개)

John BG
John BG 2016년 9월 28일
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:
please, if you find my answer useful, would you be so kind to mark it as accepted answer?
thanks in advance. Regards
John BG

Star Strider
Star Strider 2016년 9월 28일
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.

카테고리

Help CenterFile Exchange에서 Gaussian Process Regression에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by