In R, I'm trying to downsample to the lowest number of samples, or a ratio would work as well, by class. All I see for downsampling is evening out class frequency, not sample frequency/sample rate. Example,
I have a matrix with 2 classes, C1 and C2, and some missing values
C1 , 1, , .5, .6, , .8
C2 5, 2, 3, 4, .2, , 1
I simply want to to downsample C2 to C1 by number of samples, randomly, to get something like this;
C1 , 1, , .5, .6, , .8
C2 5, , 3, , .2, , 1