array exceeds maximum array size using dbscan function
3 ビュー (過去 30 日間)
古いコメントを表示
Hi,
i have a huge data from the radar sensor most likely 2-3 millions of data i.e xy coordinates.
i am using dbscan where pdist2 function is called, due to huge data it says array exceeds maximum size , you can find the same as attahced, can you please do help me out how can i proceed further ?
Please note : i do not want to cut/separate the data.
3 件のコメント
Mehmed Saad
2020 年 4 月 8 日
Yup, not working sorry for that
what is the Distance metric?
'euclidean','squaredeuclidean','mahalanobis, ....
For euclidean, just simply apply
sqrt(sum(abs(ImageSpots.x-ImageSpots.y).^2))
回答 (1 件)
Ameer Hamza
2020 年 4 月 8 日
pdist2 can indeed exhaust the memory. If the inputs are vectors of size m and n, then it returns a matrix of size m*n. If m and n are in millions, then it will fail.
SatyaPrakash, you tagged the question with R2018b. But Mathworks introduced dbscan from R2019a. Are you using the function from an external source? In that case, it is best to contact the developer to ask for the workaround. I checked the definition of dbscan in R2020a, and it does not include any call to pdist2. I think that the MATLAB's built-in function will be able to handle such large arrays. You might try this own some latest release.
6 件のコメント
Guillaume
2020 年 4 月 8 日
Whichever way you create it, a 408122 x 408122 single array requires about 620 GB of memory to store it. There's no way around that.
As it's very unlikely that you have anywhere near that amount of memory, the only option you have is to significantly reduce the size of your inputs.
For reference, a 32768 x 32768 single array would already use 4 GB of memory.
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!