In sklearn.cross_decomposition.PLSRegression
, we can obtain the latent variables scores from the X
array using x_scores_
.
I would like to extract the loadings to calculate the latent variables scores for a new array W
. Intuitively, what I whould do is: scores = W*loadings
(matrix multiplication). I tried this using either x_loadings_
, x_weights_
, and x_rotations_
as loadings as I could not figure out which array was the good one (there is little info on the sklearn website). I also tried to standardize W
(subtracting the mean and dividing by the standard deviation of X
) before multiplying by the loadings. But none of these works (I tried using the X
array and I cannot obtain the same scores as in the x_scores_
array).
Any help with this?