CCAcorr: Compute correlation between the views

Description Usage Arguments Details Value Author(s) Examples

Description

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.

Usage

1
CCAcorr(Y, model, threshold = 0.001)

Arguments

Y

The data given as a list of two N times D[m] matrices

model

A list of model parameters as returned by CCA.

threshold

Relative amount of variance explained that is needed for a component to be treated active (see CCAtrim).

Details

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].

Value

r

The correlations, a vector of length K.

active

A binary indicator telling which of the components are shared.

Author(s)

Seppo Virtanen and Arto Klami

Examples

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
  #

Example output



CCAGFA documentation built on May 2, 2019, 12:36 p.m.