Fernando Quivira
2016-06-20 15:04:19 UTC
Hi
I'm trying to replicate some dimension reduction results computed with
Matlab's plsregress using sklearn's PLSRegression. However, I'm finding
that the output of the transform method in sklearn's PLSRegression differs
from Matlab results by a constant scale factor across each component
(constant across features but different across components).
I used some dummy data that I could load in Matlab to test this. I found
that if I normalized (with zscores) the sklearn and Matlab's outputs, I got
the same results (see attached figures). I have attached the code that can
replicate this. The whole test can be run from testPLS.m (you need matlab
2014+).
I'm using python3.5 64bit in Windows with the Anaconda environment and
sklearn 0.17.1-np110py35_1
Thanks
- Fernando
I'm trying to replicate some dimension reduction results computed with
Matlab's plsregress using sklearn's PLSRegression. However, I'm finding
that the output of the transform method in sklearn's PLSRegression differs
from Matlab results by a constant scale factor across each component
(constant across features but different across components).
I used some dummy data that I could load in Matlab to test this. I found
that if I normalized (with zscores) the sklearn and Matlab's outputs, I got
the same results (see attached figures). I have attached the code that can
replicate this. The whole test can be run from testPLS.m (you need matlab
2014+).
I'm using python3.5 64bit in Windows with the Anaconda environment and
sklearn 0.17.1-np110py35_1
Thanks
- Fernando