Incremental median across pages of a 3D array
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to compute the inter-page median,
B=median(A,3)
of a 3D array A except that A is too large to be held in memory in its entirety and its pages A(:,:,k) occupy separate files on disk (EDIT: and I do not have the means to read in strict subchunks of a page). Is there an algorithm, and ideally also a Matlab implementation somewhere, that will compute B incrementally by looping over successive pages A(:,:,k), or chunks of pages?
4 Commenti
Cris LaPierre
il 25 Gen 2021
Looking as well. I see that reshape is supported for tall arrays, as is cat. How do you envision loading your data? Could you load each page as a tall array and use cat to turn it into a 3D array?
Risposte (2)
Gaurav Garg
il 28 Gen 2021
Hi Matt,
You can compute the median of each column by converting the column into tall column and then calculating its median. You can repeat the step for each column (in your case).
T=tall(A(:,1))
m=median(T);
answer = gather(m);
Or, you can also convert the array into distributed array and then compute median (though the former solution might be more useful).
A=zeros(100000,3);
D = distributed(A);
e = median(D);
Vedere anche
Categorie
Scopri di più su Large Files and Big Data in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!