Leave-One-Out-Cross-Validation
古いコメントを表示
Hi, I need to do a Leave-One-Out-Cross-Validation, but I dont even know how to start.
I read cvpartition etc.
Can someone help me please?
Thanks!
5 件のコメント
John D'Errico
2022 年 10 月 18 日
編集済み: John D'Errico
2022 年 10 月 18 日
Which one logical thing? Ask the question, rather than asking for someone to start a completely open consulting relationship on Answers. That is something that will never end. Ask a SPECIFIC question.
Adam Danz
2022 年 10 月 18 日
Start here. The first link is the syntax you'll use. The second link is an example using this method on data.
Then let us know if you have any problems applying this to your data.
Milena
2022 年 10 月 19 日
Adam Danz
2022 年 10 月 19 日
It sounds like you have general quesitons about cross validation rather than how to perform cross validation in MATLAB.
As the example in the documentation explains, this line below applies the leave-one-out partition to the original data, X, and takes the mean of the training observations for each repetition by using crossval. The training observations are 9 of the 10 elements of the vector X and the test data is the single remaining element that was left out. This is repeated until each data point is left out of the training set. Therefore, values has 10 element and each element is the mean of 9 observations in X.
values = crossval(@(Xtrain,Xtest)mean(Xtrain),X,'Partition',c)
Milena
2022 年 10 月 20 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Gaussian Process Regression についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!