MyNixOS website logo
Description

Multiple Canonical Correlation Analysis (Kernel and Functional).

Implements methods for multiple canonical correlation analysis (CCA) for more than two data blocks, with a focus on multivariate repeated measures and functional data. The package provides two approaches: (i) multiple kernel CCA, which embeds each data block into a reproducing kernel Hilbert space to capture nonlinear dependencies, and (ii) multiple functional CCA, which represents repeated measurements as smooth functions and performs analysis in a Hilbert space framework. Both approaches are formulated via covariance operators and solved as generalized eigenvalue problems with regularization to ensure numerical stability. The methods allow estimation of canonical variables, generalized canonical correlations, and low-dimensional representations for exploratory analysis and visualization of dependence structures across multiple feature sets. The implementation follows the framework developed in Górecki, Krzyśko, Gnettner and Kokoszka (2025) <doi:10.48550/arXiv.2510.04457>.

multiCCA

multiCCA implements multiple canonical correlation analysis (MCCA) for multi-block data. The package provides tools for

  • kernel MCCA for repeated-measures data,
  • functional MCCA for functional observations,
  • automatic tuning of regularization parameters,
  • diagnostic tools based on the Hopkins statistic,
  • visualization of canonical components.

The implementation is designed for multi-view data integration, where multiple sets of features are observed for the same objects.

Installation

You can install the development version from GitHub:

# install.packages("pak")
pak::pak("Halmaris/multiCCA")

Example

Generate a simple multi-block dataset:

library(multiCCA)

set.seed(1)

n <- 20
T_len <- 10

X <- list(
  lapply(seq_len(n), function(i) matrix(rnorm(T_len * 3), T_len, 3)),
  lapply(seq_len(n), function(i) matrix(rnorm(T_len * 2), T_len, 2))
)

Fit kernel MCCA:

fit <- mcca_fit(
  method = "kernel",
  X = X,
  ncomp = 2
)

fit

Predict canonical component scores:

scores <- predict(fit, X)
head(scores[[1]])

Visualization

Plot canonical components for one block:

plot_mcca_scatter(fit)

Compare canonical components between blocks:

plot_mcca_pair(fit)

Model diagnostics

Evaluate clusterability of canonical representations using the Hopkins statistic:

H <- hopkins_vs_components(fit, max_comp = 2)

plot_hopkins_curve(H)

Author

Tomasz Górecki
Adam Mickiewicz University, Poznań.

Metadata

Version

0.1.0

License

Unknown

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows