Fast Sparse Canonical Correlation Analysis (fscca) implementation using NIPALS SCCA and Rcpp.
C++ R Python C
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
R
inst
man
src
tests
.gitignore
.ycm_extra_conf.py
DESCRIPTION
LICENSE
NAMESPACE
README.md

README.md

Fast SCCA (fscca)

This project is a work in progress

This is a port of NIPALS SCCA package written by Lee et. al. [1, 2] (scca). It is written for speedup in Rcpp.

Currently, only the lasso penalty function is implemented. Also, the only cross-validation method implemented is the sequential one-dimensional search described in the paper.

Installation

Make sure you have the devtools package installed as well as Rcpp and RcppArmadillo:

install.packages(c("devtools", "Rcpp", "RcppArmadillo"))
library(devtools)

You can install the current development version from github using devtools:

install_github("pimentel/fscca")

The build sets the flag PKG_CXXFLAGS = "-std=c++11" in src/Makevars. This is standard for g++ and clang. If this fails on your computer, let me know (my guess it will likely fail on windows).

The branch master should always be stable. Please file a bug report if it is unstable.

Assuming all goes well, load it like a usual package:

library(fscca)

Usage

The main R entry point is the function fscca(). It is reasonably well documented in R which you can access by typing ?fscca or help('fscca'). This function will automatically perform cross-validation as well as compute multiple components (default is just the first).

If you don't want to perform cross-validation, you can compute the first canonical vectors by using nipals_sparse() which is also documented in R.

TODOs

  • Implement other penalty functions (soft-thresholding, SCAD, HL)
  • Three matrix extension ( fscca(X, Y, Z) )
  • Implement full grid search

Bugs

Please report any bugs to Github: http://github.com/pimentel/fast-scca/issues