How perform bootstrap balanced resampling of a dataset?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Yuchen Song
el 8 de Mzo. de 2020
Comentada: Yuchen Song
el 8 de Mzo. de 2020
Basically, I'm trying to perform a bootstrap balanced resampling of a dataset K times, where data is an [N*1] vector of data samples, and the output should be an [N*K] matrix of bootstrap resampled data, where data d1 to dN each appear (randomly dispersed) exactly K times. I figured out how to do the resampling by using the unidrnd function, but I don't know how to make the data sets randomly appears K times. Please help.
0 comentarios
Respuesta aceptada
Jeff Miller
el 8 de Mzo. de 2020
Editada: Jeff Miller
el 8 de Mzo. de 2020
I'm not sure...is this what you want?
N = 7; % Small values of N an d K to make it easier to see what it does.
K = 5;
data = rand(N,1);
kcopies = repmat(data,K,1);
shuffled = kcopies(randperm(numel(kcopies)));
output = reshape(shuffled,N,K)
Más respuestas (0)
Ver también
Categorías
Más información sobre Multirate Signal Processing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!