Error: "SVD does not support sparse matrics. Use SVDS to compute a subset of the singular values and vectors of a sparse matrix." while training SOM.

12 ビュー (過去 30 日間)
Hi
I want to train SOM using text features (TFIDF). I am using Neural Net clustering (nctool) app in MATLAB 2019a for this purpose. My data is of size 2866 x 61695 (2866 instances and each containing 61695 elements) and also sparse. When I tried to train the SOM using this data then it gave me an error "SVD does not support sparse matrics. Use SVDS to compute a subset of the singular values and vectors of a sparse matrix." I did not understand this. Please let me know how can I train my SOM with this data.
Thanks in advance.

採用された回答

Bjorn Gustavsson
Bjorn Gustavsson 2020 年 7 月 6 日
It means that your SOM-training function somewhere uses (or tries to use) the svd function. That function expects a full matrix, if it is called with a sparse matrix throws the error you got. If you feed your training-data in sparse format you might get around that by calling the SOM-training function with full(your_data) and hope for the best - this might work or the SVD-call might run out of memmory.
HTH
  3 件のコメント
Bjorn Gustavsson
Bjorn Gustavsson 2020 年 7 月 6 日
My suggestion was that you should convert your data from sparse to full with the hope that that might work (since your data is rather bit you might run out of memmory), to do that you would modify your function-call from using your 2866 x 61695 data in the sparse variable your_data (what you've named your variables I cannot know) to full(your_data).
If that doesn't work you'll have to reduce the size of your input-data somehow (train on sub-sets, reduce dimensionality of data, something more clever...)

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

その他の回答 (0 件)

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by