I have collected some data and stored them in an $N\times P$ matrix $A$. Using SVD, we can rotate $A=UDV^T$ into a new basis, also discarding some dimensions: $A\approx U\tilde{D}V^T$, where $\tilde{D}$ is a diagonal matrix of the first $k<P$ singular values, with the remaining diagonal values $0$.
Then I train some model using $U\tilde{D}$ as the source data. Now I have a new set of data $B$ that I want to test the model on. The first step in applying the model is rotating $B$ to correspond to the data $U\tilde{D}$ that I trained the model on. How can I do this?