필터 지우기
필터 지우기

Stratified K-fold validation using crossval funtion

조회 수: 4 (최근 30일)
Jhon Gray
Jhon Gray 2021년 4월 20일
I am trying to customize the "Weighted kNN"-based classification code generated after a 10-fold cross validation on my data using the Classification Learner App (Using the Generate Function option in the app).
Query 1:
partitionedModel = crossval(trainedClassifier.ClassificationKNN, 'KFold',10);
After generating the code, I found that the above code is responsible for partitioning the data. I have an imbalanced dataset and I believe that "Stratified" k-fold cross validation ensures equal amount of data is considered from each class.
Query: Does the above code automatically perform Stratified k-fold cross validation? If not, how do I include it in the code?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Classification Learner App에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by