Skip to content

PLSRegression alters input matrices #63

@mfschmidt

Description

@mfschmidt

First, thank you so much for this repo! Trying to compare results between python and matlab has been an insane headache until I found this. :)

I noticed that every time I run pls_regression(), my X and Y input matrices both get altered. To prevent this, I am currently creating a sacrificial copy of each original matrix for use with pls_regression, and all's well. But I wanted to report that this surprised me. I would expect that my source data not be altered.

I assume this could be fixed by creating local copies of X and Y_agg prior to

X -= np.nanmean(X, axis=0, keepdims=True)
, and using the local copies rather than references to the originals throughout that function, but I'm not familiar enough with the rest of the codebase to say that with confidence.

Best wishes!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions