Skip to content

canonical correlation analysis and partial least squares #3274

Open

Description

@yl565

I wonder if there is any plan of including CCA and PLS in statsmodels. sklearn have a CCA implementation but didn't report tests results. I'd like to give CCA a try if this could be of interest to statsmodels.

Activity

  1. josef-pkt commented on Nov 17, 2016

    @josef-pkt
    Member

    Hi, It would be great if someone works more on multivariate methods.

    I wrote a simple version of CCA that I needed mainly for a matrix rank test (for instrumental variables and two-stage least squares) https://github.com/statsmodels/statsmodels/blob/master/statsmodels/stats/multivariate_tools.py#L65
    I added the MANOVA statistics mainly because it was a standard result in Stata that I could compare against. Those are missing the p-values.
    see #1111 and #1114

    One option would be to make it into a full class similar to what Kevin did for PCA #2004 and similar to the scikit-learn version. I didn't need any other things from the CCA when I wrote cancorr.
    If standalone things of CCA are not really needed, then writing an application class like MANOVA might be the more useful or direct approach.

    note PCA is in the new statsmodels.multivariate directory/path

  2. yl565 commented on Nov 20, 2016

    @yl565
    ContributorAuthor

    MANOVA class sounds like the plan to me. If nobody is currently working on it, I'd like to give it a shot.

  3. josef-pkt commented on Nov 20, 2016

    @josef-pkt
    Member

    Nobody is working on MANOVA. I'm working may way towards Multivariate Regression but I am still far away from MANOVA like results and hypothesis testing.

    Reminder: We cannot use code that is copied from other sources that are not licence compatible with our BSD licence, e.g. GPL code is off-limits. But SAS and Stata, or similar, have good documentation for many methods and are my preferred references for what results might be useful to and expected by users. They often also include a good formula collection.

  4. josef-pkt commented on Nov 22, 2016

    @josef-pkt
    Member

    BTW: (I just remembered) you could start a manova.py as location for MANOVA in statsmodels.multivariate
    Future multivariate statistics functionality should mostly go in there (with maybe some multivariate models next to their univariate version in the corresponding directories.)

  5. yl565 commented on Nov 22, 2016

    @yl565
    ContributorAuthor

    Thanks for the tip!

  6. kris-singh commented on Feb 16, 2017

    @kris-singh

    Is cca implementation still open ?

  7. josef-pkt commented on Dec 23, 2017

    @josef-pkt
    Member

    update here:
    MANOVA and CanCorr have been merged in #3291
    PLS is still missing, but available in scikit-learn (without results statistics)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions