Hi i keep getting this error but i am not sure what it means, can anyone help?
Unrecognized method, property, or field 'train' for class 'cvpartition'.
Error in Ma (line 27)
BCTabletrain = cvfolds.train(i);
cv = cvpartition(n,'kfold', k);
cp = classperf (OutputVariable);
for i = 1:k
test = cv.test(i);
TrainSet = cv.train(i);

2 件のコメント

Image Analyst
Image Analyst 2021 年 1 月 2 日
Why did you write that? Why do you think a cvpartition object has a "train" property, method, or field?
Claire R
Claire R 2021 年 1 月 2 日
編集済み: Claire R 2021 年 1 月 2 日
i am not very experienced with matlab so i was following someone's example i thought it was the number of elements in (each) training subset., so does that mean if i am trying to do a k fold cross validation i do not need it.

サインインしてコメントする。

 採用された回答

Walter Roberson
Walter Roberson 2021 年 1 月 2 日

0 投票

TrainSet = cv.training(i);

1 件のコメント

Claire R
Claire R 2021 年 1 月 2 日
Thank you for your help.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeVariables についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by