0
$\begingroup$

The Nipals PCA algorithm calculates the scores and loadings of a data array iteratively. If only (say) 3 scores and loadings are calculated from a data array with more than 3 variables, there is a residual matrix created (called E). How can I extract this matrix from the SciKit Learn PCA algorithm so that I can create contribution charts?

$\endgroup$
0
$\begingroup$

I'm not super familiar with PLS/NIPALS, but I think you need to construct it yourself. Multiply the scores by the loadings and subtract the resulting matrix from the data to get the residual matrix. See here for a more detailed discussion: https://learnche.org/pid/latent-variable-modelling/projection-to-latent-structures/how-the-pls-model-is-calculated

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.