Learn R Programming

CCAGFA (version 1.0.8)

GFAtrim: Simplify a CCA/BIBFA/GFA model

Description

Prunes out unnecessary components and determines for each of the remaining components whether it is shared or not. In other words, the function reveals the component allocation into shared and view-specific ones.

Usage

CCAtrim(model, threshold = 0.001) GFAtrim(model, threshold = 0.001)

Arguments

model
A list of model parameters as returned by CCA or GFA.
threshold
The proportion of relative variance explained that components need to exceed to be detected as active.

Value

A list of parameter values as returned by GFA. The list also includes two extra elements:
trimmed
A boolean variable indicating that the model has been trimmed with this function.
active
A binary matrix indicating for each component (column) in which views (row) it is active.

Details

This function can be used to prune out unnecessary components and to recognize which of the components are shared. This can be useful for interpretative purposes, but it is typically not necessary to apply this function prior to making predictions (with GFApred or otherwise). The inactive components will anyway automatically cancel out for the predictive formulas. The code works well for low-dimensional data, but for complex high-dimensional data sources one should check whether the trimming is reasonable; in such cases it is difficult to make clear decisions on component activity.

See Also

GFA, CCA

Examples

Run this code
  #
  # Assume we have a variable model which has been learned with
  # GFAexperiment() or GFA().
  # Then the following line would trim it:
  #
  # trimmed <- GFAtrim(model)
  #

Run the code above in your browser using DataLab