Crossvalidation on 'grouped' observations, where the patientID field is unique with respect to the rest of the folds (medical datasheet)

5 visualizzazioni (ultimi 30 giorni)
I have a datasheet of 5000 medical issues about the heart. Each case have a label 'y' that reference the kind of illness (four different types), and another field called 'patientID' unique for each different patient analyzed.
The thing is that i want to do a stratified crossvalidation of 10 folds, where each one of the different patients can only be in the same fold. For example, if all the samples of the patientID=23 are at fold=4, there are not patientID=23 samples at any other fold.
I want to reach 100 different conbinations of cvpartitions with that requirement, keeping at least a 75% of stratification level between 'y' labels. For this i have thought of a while loop changing the random seed 'rng(i)' at each iteration.

Risposte (0)

Categorie

Scopri di più su Geology in Help Center e File Exchange

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by