フィルターのクリア

working with large matrices

45 ビュー (過去 30 日間)
Bram Stegeman
Bram Stegeman 2019 年 3 月 6 日
コメント済み: Stephan Koschel 2020 年 3 月 17 日
I have to work with large matrices (e.g. A = 8000 x 100.000, all non-zero values).
I want to calculate T= ((A'*A) + lamda*speye(n))\(A'*A); with lamda =e.g. 1-e-3.
I have installed 64 gb ddr and as expected I run out of memory (also when I introduce a threshold and force A to be sparse, and then create sparse(A) and sparse (A') and try to calculate T.
Are there alternative ways to calculate T without out of memory issues?
  3 件のコメント
Bram Stegeman
Bram Stegeman 2019 年 3 月 7 日
Hello David,
That is correct. 1e5 x 1e5 could already results in memory issues is my experience.
Forget to mension that I'm only interested in the diagonal values of T.
Stephan Koschel
Stephan Koschel 2020 年 3 月 17 日
You are only interested in the diagonals of a matrix multiplication?
I would implement an iteration over the diagonal elements and load the corresponding columns and rows from the two matrices. The entry on the diagonal becomes something like sum(current_row .* current_col)
The iteration could slow down the process, but you only need to load two vectors into memory.

サインインしてコメントする。

採用された回答

Munish Raj
Munish Raj 2019 年 3 月 18 日
Hello Bram,
You could look at implementing Tall Arrays.
The documentation link can be found here.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOperating on Diagonal Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by