MATLAB Answers

Recover matrix Z from XZX', Z es symmetric and n-by-n, while X is k-by-n where n>>k

7 views (last 30 days)
PATRICIO AROCA
PATRICIO AROCA on 8 Aug 2020
Answered: Bruno Luong on 9 Aug 2020
I have the matrices (XZX') and X and I want to recover Z. Dimension: X is kxn, Z is nxn, and n >> k. I know that Z is simetric

  5 Comments

Show 2 older comments
Matt J
Matt J on 8 Aug 2020
Let say that I know M = XZX' is a variance-covariance matrix that I have and it is 5x5. I also know X which is a 27x5
If X is 27x5, then M must be 27x27, not 5x5. Do you mean that Z is 5x5? If so, then you really should have written k>>n in your initial post.

Sign in to comment.

Answers (3)

Matt J
Matt J on 8 Aug 2020
Edited: Matt J on 8 Aug 2020
In the case where k truly is <<n, you can use my KronProd class to get the minimum norm solution
k=10; n=100;
X=rand(k,n);
Ztrue=rand(n); Z=Z+Z.';
M=X*Ztrue*X.';
K=KronProd({X,X});
tic;
Z = pinv(K)*M ;
toc; %Elapsed time is 0.005358 seconds.
Naturally, you should not expect the result to equal the under-determined Ztrue.

  2 Comments

David Goodmanson
David Goodmanson on 8 Aug 2020
Hi Matt, I tried to reply to your last comment but that answer is gone. I indeed did not see your updated answer when I posted my answer. Sorry I assumed wrongly, it makes sense now.

Sign in to comment.


KSSV
KSSV on 9 Aug 2020
Does this match your criteria?
k = 8 ; n = 5 ;
% create dummy data
X = rand(n,k) ;
Z = rand(n) ;
Z = Z+Z' ; % make Z symmetric
D = X'*Z*X ; % known value
%% solve for Z knowing D and X
Z0 = inv(X*X')*X*D*X'*inv(X*X') ; % this is same as Z

  0 Comments

Sign in to comment.


Bruno Luong
Bruno Luong on 9 Aug 2020
You can't getback to 27x27 covariance matrix Z after reducing it it on 5 dimensional space (by X). The information lost forevver.

  0 Comments

Sign in to comment.

Products

Community Treasure Hunt

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

Start Hunting!

Translated by