MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   MATLAB内存不足,但不应 (https://www.labfans.com/bbs/showthread.php?t=23638)

poster 2019-12-10 20:42

MATLAB内存不足,但不应
 
我正在尝试使用已标准化的[URL="https://www.mathworks.com/help/stats/princomp.html"]princomp(x)[/URL]将[URL="https://en.wikipedia.org/wiki/Principal_component_analysis"]PCA[/URL]应用于我的数据。

数据是 。这将运行我们的内存,除了这是一台新计算机之外,这是我们所期望的,该计算机拥有24GB RAM用于数据挖掘。 MATLAB甚至列出了可用于内存检查的24GB。

是在执行PCA时MATLAB实际耗尽了内存,还是没有充分利用RAM?任何信息或想法都会有所帮助。 (我可能需要增加虚拟内存,但假设24GB已足够。)



[B]回答:[/B]

对于大小为n-by-p的数据矩阵, PRINCOMP将返回大小为p-by-p的系数矩阵,其中每一列都是使用原始维表示的主成分,因此,在您的情况下,您将创建大小为n的输出矩阵。 :

1036800*1036800*8 bytes ~ 7.8 TB 考虑使用PRINCOMP(X,'econ')仅返回差异较大的PC


或者,考虑[URL="http://en.wikipedia.org/wiki/Singular_value_decomposition#Relation_to_eigenvalue_decomposition"]通过SVD[/URL]执行[URL="http://en.wikipedia.org/wiki/Singular_value_decomposition#Relation_to_eigenvalue_decomposition"]PCA[/URL] :在您的情况下n


所有时间均为北京时间。现在的时间是 01:04

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.