I have to do canonical correlation analysis between two multivariate datasets X and Y. One dataset contain numerical data and the other binary data. I would like to know what features are highly correlated with the features in second data set. Would the normal CCA available in Matlab be sufficient if one data set has numerical (integer and floating point values) and the second dataset has binary values (0 or 1) for all the values for the various features?

  • $\begingroup$ Here is a link to a good tutorial on how to perform canonical correlation analysis in R: ats.ucla.edu/stat/r/dae/canonical.htm $\endgroup$ Jan 16, 2014 at 15:43
  • $\begingroup$ This is not a question so far. What is your specific problem or doubt? $\endgroup$
    – ttnphns
    Jan 16, 2014 at 17:09

1 Answer 1


You could run a CCA and see what it says. But, CCA optimizes a least squares objective function. If you interpret the objective function as a possibly-penalized (and scaled) log likelihood, then the corresponding PDF is a Gaussian, not a coin-flip. You may lose some statistical efficiency compared to a more custom-built model, and if you want to test hypotheses, you may have to rely on an approximate null distribution.

Least square formulation of CCA

Relationship between coupled matrix factorization and CCA

Objective function of canonical correlation analysis (CCA)

Perhaps a more important question: is CCA really what you want, even disregarding the binary data issue? You write "I would like to know what features are highly correlated with the features in second data set." This sounds like a feature selection problem where it would be more useful to (for instance) run an L1-penalized logistic regression with X as the covariates and Y as the response.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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