Description Usage Arguments Details Value Author(s) Examples
A function for estimating the canonical correlations between two data sets. This function can only be used for models learned based on two data sources, since canonical correlation is only defined for two sets.
1 | CCAcorr(Y, model, threshold = 0.001)
|
Y |
The data given as a list of two N times D[m] matrices |
model |
A list of model parameters as returned by |
threshold |
Relative amount of variance explained that is needed for a component
to be treated active (see |
The function computes the correlations for each component. The inactive
ones are not suprressed away, but the variable active
can be
used for filtering them out; the correlations for the non-shared
components should typically not be trusted. The estimated correlation
corresponds to the correlation between the expected values of
Z|Y[1] and Z|Y[2].
r |
The correlations, a vector of length |
active |
A binary indicator telling which of the components are shared. |
Seppo Virtanen and Arto Klami
1 2 3 4 5 6 7 8 9 | #
# Assume we have a variable model which has been learned with
# CCAexperiment() or CCA().
#
# output <- CCAcorr(model)
#
# print(output$r) # Print the correlations
# print(output$r[which(output$active==1)]) # Only the shared components
#
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.