Singular value decomposition, Cant get the final results
Show older comments
Im trying to Perform SVD as the following, My laptop RAM is 64GB
The XTrain size is 120*120*1*39000
I tried to reduce the number of matrices to 120*120*1*10000, but still getting the same message
But the MATLAB stucks in this message and the evaluation percentage doesnt increase, any suggestion please?
N=14;
X=reshape(XTrain,[], size(XTrain,4)).';
size(X)
vn=max([vecnorm(X,inf,1),1],1);
%Process as tall
T=tall([X, ones(height(X),1)]./vn);
clear X
[~,~,V]=svd( T , "econ");
clear T
Abt=gather( head( V(:,end+1-N:end)) ) ./vn';
A=Abt(1:end-1,:)';
b=Abt(end,:)';
s=vecnorm(A,2,2);
[A,b]=deal(A./s, b./s);
Message
Evaluating tall expression using the Parallel Pool 'Processes':
- Pass 1 of 2: Completed in 7.1 sec
Evaluation 45% complete
8 Comments
M
on 29 Nov 2023
Torsten
on 29 Nov 2023
If you get an answer from there, please post it here so that others can profit from it.
I cannot help you with your question, but the first thing I would try is to apply the code to a smaller-sized problem and see if it works.
As said, I have no experience with parallel computing and tall arrays, but since the problem with your code seems to be of technical nature, the Technical Support seems to be the correct address in my opinion.
Maybe you could build the svd's of the 39000 matrices one by one and classify afterwards with the svd's so obtained ?
Torsten
on 29 Nov 2023
Your question was
But the MATLAB stucks in this message and the evaluation percentage doesnt increase, any suggestion please?
My advice was: Contact Technical Support.
If your question was: Do you know if I do something wrong ? How can I get the affine subspace and the Grassman manifold ? - then I'm not able to contribute something.
Matt J
on 30 Nov 2023
Have you tried leaving it to run overnight? Maybe it just takes a while.
Accepted Answer
More Answers (0)
Categories
Find more on Mathematics and Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!