File Exchange

image thumbnail

Stratified cross-validation for multi-label data sets

version 1.0.1 (2.07 KB) by Jan Motl
Greedily assign samples into folds based on their labels

1 Download

Updated 29 Oct 2019

View License

The algorithm partitions a binary multi-label Y into N folds. The returned vector assigns samples into the folds such way, that the same distribution of positive and negative samples of each label is approximately maintained across all folds.

The implementation can be used as a drop-in replacement for CVPARTITION.

Reference: On the Stratification of Multi-label Data by Sechidis, Konstantinos & Tsoumakas, Grigorios & Vlahavas, Ioannis.

Cite As

Jan Motl (2020). Stratified cross-validation for multi-label data sets (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

function y = mod1(x, m)
y = rem(rem(x-1, m) + m, m) + 1;

Thanks for your work. But what's function called "mod1" ? it's not on matlab's base library and code doesnt work.



Update title text

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux