mean and standard deviation of 10 fold cross validation

조회 수: 2 (최근 30일)
uma
uma 2022년 6월 15일
답변: Raghava S N 2025년 4월 8일
HOW TO PERFORM MEAN AND STANDARD DEVIATION OF TESTING ACCURACY
OF 10 FOLD CROSS VALIDATION. please help to solve this problem.Give some example for better understanding.

답변 (1개)

Raghava S N
Raghava S N 2025년 4월 8일
Hi @uma,
In this example of 10-fold cross validation https://www.mathworks.com/help/bioinfo/ref/crossvalind.html#:~:text=collapse%20all-,Perform,-10%2DFold%20Cross, the testing accuracies can be recorded (which is just 1 - error rate) for each fold like this -
accuracies = zeros(10,1)
for i = 1:10
test = (indices == i);
train = ~test;
class = classify(meas(test,:),meas(train,:),species(train,:));
classperf(cp,class,test);
accuracies(i) = 1 - cp.ErrorRate
end
After this loop, you can find the mean and the standard deviation of the "accuracies" vector using the "mean" and "std" functions -
Be sure to adapt this example based on your workflow and requirements.
Hope this helps!

카테고리

Help CenterFile Exchange에서 Argument Definitions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by