how to get a transformation matrix

2 次查看(过去 30 天)
Hi,all, i have two group of vectors(group A and group B), each group contains 30,000 vectors,the dimension of each vector is 20. I want to train a transformation matrix which is transform group A to group B, is there any function can do this in MatLab, any suggestion would be helpful,thank you!

回答(1 个)

Kautuk Raj
Kautuk Raj 2023-6-2
To train a transformation matrix that maps vectors from group A to group B in MATLAB, the Procrustes analysis function procrustes can be used. The documentation page explains this with an example.
The following code reproduces your use case and applies the process.
A = rand(30000, 20);
B = rand(30000, 20);
[~, T] = procrustes(A, B);
A_transformed = A * T.T;
This will transform each vector in group A so that it aligns with the corresponding vector in group B.

类别

Help CenterFile Exchange 中查找有关 Dimensionality Reduction and Feature Extraction 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by