GithubHelp home page GithubHelp logo

oschulz / diagonalizations.jl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marco-congedo/diagonalizations.jl

0.0 2.0 0.0 1.96 MB

Diagonalization procedures for Julia (PCA, Whitening, MCA, gMCA, CCA, gCCA, CSP, CSTP, AJD, mAJD)

License: Other

Julia 100.00%

diagonalizations.jl's Introduction

Diagonalizations.jl

Documentation

Diagonalizations.jl is a Julia signal processing package implementing several closed form and iterative diagonalization procedures for both real and complex data input:

Acronym Full Name Datasets ( m ) Observations ( k )
PCA Principal Component Analysis 1 1
Whitening Whitening (Sphering) 1 1
MCA Maximum Covariance Analysis 2 1
CCA Canonical Correlation Analysis 2 1
gMCA generalized MCA >1 1
gCCA generalized CCA >1 1
CSP Common Spatial Pattern 1 2
CSTP Common Spatio-Temporal Pattern 1 >1
AJD Approximate Joint Diagonalization 1 >1
mAJD multiple AJD >1 >1

For example the MCA diagonalizes a cross-covariance matrix, like in this figure:

As compared to MultivariateStats.jl this package supports :

  • the dims keyword like in the StatsBase.jl package
  • shrinkage covariance matrix estimations throught package CovarianceEstimation
  • average covariance estimations using metrics for the manifold of positive definite matrices using the PosDefManifold package
  • facilities to set the subspace dimension upon construction
  • diagonalization procedures for the case m≥2 and k≥2.

This package implements state-of-the-art approximate joint diagonalization algorithms. For some benchmarking see here.

Installation

To install the package execute the following command in Julia's REPL:

]add CovarianceEstimation PosDefManifold Diagonalizations

Examples


using Diagonalizations, PosDefManifold, Test

n, t=10, 100

# generate an nxt data matrix
X=genDataMatrix(n, t)

# principal component analysis
pX=pca(X)

# the following is an equivalent constructor taking the covariance matrix as input
pC=pca(Symmetric((X*X')/t))

@test pX==pC # the output of the two constructors above is equivalent

@test C≈pC.F*pC.D*pC.F'  

# get only the first p eigenvectors, where p is the smallest integer
# explaining at least 75% of the variance
pX=pca(X; eVar=0.75)

Y=genDataMatrix(n, t)

# maximum covariance analysis
mXY=mca(X, Y)

# canonical correlation analysis
cXY=cca(X, Y)

# approximate joint diagonalization
Xset=randP(5, 20)
aXset=ajd(Xset; algorithm=:JADE)
aXset=ajd(Xset; algorithm=:LogLike)

# etc., etc.

About the Authors

Marco Congedo, is a research scientist of CNRS (Centre National de la Recherche Scientifique), working at UGA (University of Grenoble Alpes). contact: marco dot congedo at gmail dot com

Documentation

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.