PosDefManifoldML Documentation

Requirements & Installation

Julia: version โ‰ฅ 1.1

Packages: see the dependencies of the main module.

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

]add PoSDefManifoldML
add PosDefManifold

Reviewers & Contributors

Independent reviewers for both the code and the documentation are welcome. To contribute, please check the secion How to Contribute.

TroubleShoothing

ProblemSolution
In Windows, an error may appear at execution time the first time an SVM model is fitted or is passed to the cvAcc functionDiscourse
UndefVarErrors, looking like metric not defined, Fisher not defined, etc.install the PosDefManifold package

About the Authors

Marco Congedo, corresponding author, is a Research Director of CNRS (Centre National de la Recherche Scientifique), working at UGA (University of Grenoble Alpes). Contact: first name dot last name at gmail dot com

Anton Andreev is a research engineer working at the same institution.

Saloni Jain at the time of writing the package was a student at the Indian Institute of Technology, Kharagpur, India.

Overview

Riemannian geometry studies smooth manifolds, multi-dimensional curved spaces with peculiar geometries endowed with non-Euclidean metrics. In these spaces Riemannian geometry allows the definition of angles, geodesics (shortest path between two points), distances between points, centers of mass of several points, etc.

In several fields of research such as computer vision and brain-computer interface, treating data in the manifold of positive definite matrices has allowed the introduction of machine learning approaches with remarkable characteristics, such as simplicity of use, excellent classification accuracy, as demonstrated by the winning score obtained in six international data classification competitions, and the ability to operate transfer learning (Congedo et al., 2017a, Brachant et al., 2012)๐ŸŽ“.

In this package we are concerned with making use of Riemannian Geometry for classifying data in the form of positive definite matrices (e.g., covariance matrices, Fourier cross-spectral matrices, etc.). This can be done in two ways: either directly in the manifold of positive definite matrices using Riemannian machine learning methods or in the tangent space, where traditional (Euclidean) machine learning methods apply (i.e., linear discriminant analysis, support-vector machine, logistic regression, random forest, etc.).

Figure 1 Figure 1

Schematic representation of Riemannian classification. Data points are either natively positive definite matrices or are converted into this form. The classification can be performed by Riemannian methods in the manifold of positive definite matrices or by Euclidean methods after projection onto the tangent space.

Currently implemented models are:

Acting on the manifold of PD matrices

  • the Riemannian minimum-distance to mean (MDM).

Acting on the tangent space

  • elastic-net logistic regression (ENLR), including the pure Lasso and pure Ridge logistic regression;
  • support-Vector machine (SVM), including C-Support Vector Classification (C-SVC), nu-SVC, one-class SVC, *Epsilon Support-Vector Regression** (SVR) and *nu SVR**.

For a formal introduction to the manifold of positive definite matrices the reader is referred to the monography written by Bhatia(2007)๐ŸŽ“.

For an introduction to Riemannian geometry and an overview of mathematical tools implemented in the PostDefManifold package, which is used here, see Intro to Riemannian Geometry.

Code units

PosDefManifoldML includes six code units (.jl files):

UnitDescription
MainModuleMain module, declaring constants and types
mdm.jlUnit implementing the MDM( Minimum Distance to Mean) machine learning model
enlr.jlUnit implementing the ENLR( Elastic Net Logistic Regression) model, including the LASSO and RIDGE LR
svm.jlUnit implementing the SVM (Support-Vector Machine) models
cv.jlUnit implementing cross-validation procedures
tools.jlUnit containing general tools useful for machine learning and internal functions

๐ŸŽ“

References

A. Barachant, S. Bonnet, M. Congedo, C. Jutten (2012) Multi-class Brain Computer Interface Classification by Riemannian Geometry, IEEE Transactions on Biomedical Engineering, 59(4), 920-928.

A. Barachant, S. Bonnet, M. Congedo, C. Jutten (2013) Classification of covariance matrices using a Riemannian-based kernel for BCI applications, Neurocomputing, 112, 172-178.

R. Bhatia (2007) Positive Definite Matrices, Princeton University press.

M. Congedo, A. Barachant, R. Bhatia R (2017a) Riemannian Geometry for EEG-based Brain-Computer Interfaces; a Primer and a Review, Brain-Computer Interfaces, 4(3), 155-174.

M. Congedo, A. Barachant, E. Kharati Koopaei (2017b) Fixed Point Algorithms for Estimating Power Means of Positive Definite Matrices, IEEE Transactions on Signal Processing, 65(9), 2211-2220.

Rodrigues PLC, Jutten C, Congedo M (2019) Riemannian Procrustes Analysis : Transfer Learning for Brain-Computer Interfaces, IEEE Transactions on Biomedical Engineering, 66(8), 2390-2401.

P. Zanini P, M. Congedo, C. Jutten, S. Said, Y. Berthoumieu (2018) Transfer Learning: a Riemannian geometry framework with applications to Brain-Computer Interfaces, IEEE Transactions on Biomedical Engineering, 65(5), 1107-1116.

Resources on GLMNet

webinar by Trevor Hastie

Glmnet vignette

Glmnet in R, documentation

Julia wrapper for GLMNet

A more advanced wrapper for GLMNet

Resources on LIBSVM

official page

github

Contents

Index