Issue
I am new to Canonical Correlation Analysis. Going through the sklearn cca is the n_components
field and I could not find any conceptual description of what the variable is for anywhere. What exactly is the variable and how do I decide the value I should be setting it?
Solution
The n_components
variable is the number of components you want to keep in your CCA model.
You can think of it as the number of dimensions that you want to represent your data in.
There are a few ways to decide how many components to keep in your model.
One way to decide how many components to keep is to look at the canonical correlations.
The canonical correlations represent the correlation between the two sets of variables that are being transformed by the CCA.
If you only want to keep the dimensions that have the highest correlation, you can set n_components
to be the number of components with the highest canonical correlations.
There is no right or wrong answer for how many components to keep in your CCA model.
It really depends on what you are trying to achieve with your CCA model.
Answered By - Robin Thibaut
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.