Tall three dimensional arrays
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am determine if the following is both doable and beneficial use of tall arrays:
- Let's say I have a set of larger matrices A_1,...,A_99 , where dim(A)=800,000 x 600.
- Due to memory constraints, (196 GB), I cannot hold the full A_k in memory.
- I would like to take say, one entry ij, of each A_k , collect it in a vector v(1:99) for k=[1,99], then perform an operation on v - for each ij pair. Note I have 3 directions: the original of each matrix, and k as a result of collecting the matricies. And I am interested in performing an operation (fft) in the k direction, the 'tall' dimension of the tallArray.
- Question (a): is this use of tallArrays somehow optimal, or at least not terrible?
- Question (b): Save or not save each matrix to disk before calling tallArray? Since I have A_k in memory, would it be advisable to use arrayDatastore ? Or should I save each A_k into memory as a .mat file in the same directory, then create a datastore from the saved-to-disk *.mat files?
0 commentaires
Réponses (1)
Rijuta
le 8 Sep 2023
Hi,
I understand that you want to know if using tall arrays an optimal approach for your task, and you want to know if you should save each matrix before calling each array.
For your first question, using tall arrays in this scenario can be a reasonable approach to handle the memory constraints. Tall arrays are designed to handle out-of-memory data processing efficiently. They enable you to perform computations on data that does not fit into memory by dividing the data into smaller chunks and processing them iteratively. This approach can be beneficial when dealing with large datasets.
Secondly, whether to save each matrix to disk before using tall arrays depends on the trade-off between disk I/O operations and memory usage. Consider using an ‘arrayDatastore’ if memory allows, or save matrices to disk as .mat files and create a datastore for processing with tall arrays if memory constraints are severe.
I hope this answers your questions. Please refer to the documentation below for more information:
0 commentaires
Voir également
Catégories
En savoir plus sur Tall Arrays dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!