--- id: pyriemann version: "0.12" license: BSD (3-clause) license_treatment: permissive maintenance: active --- # pyriemann — Machine learning for multivariate data with Riemannian geometry License: permissive · Maintenance: active · Downloads: 89.5K/mo ## What it is and what it does pyRiemann is a machine learning library that applies Riemannian geometry to classify multivariate data, particularly biosignals like EEG, MEG, and EMG. It estimates covariance matrices from multichannel time series and uses the geometric properties of symmetric positive definite (SPD) matrices to build classifiers. The package follows scikit-learn conventions, making it easy to integrate into standard machine learning pipelines and workflows. The library was designed around brain-computer interface (BCI) applications, supporting motor imagery, event-related potentials, and steady-state visually evoked potentials paradigms. It also handles remote sensing tasks involving hyperspectral and synthetic-aperture radar imagery. Core utilities support both NumPy and PyTorch backends transparently through the Python Array API, enabling optional GPU acceleration when PyTorch tensors are used. Transfer learning between sessions or subjects is supported through extended labels. Use it for: - Build BCI systems that classify motor imagery or event-related potentials from multichannel EEG recordings - Process hyperspectral remote sensing imagery by estimating and classifying covariance matrices over spatial regions - Perform transfer learning across BCI recording sessions or subjects using Riemannian geometry - Classify synthetic-aperture radar (SAR) images using Hermitian positive definite matrix geometry - Pipeline covariance estimation with tangent-space projection and standard classifiers ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pyRiemann provides scikit-learn-compatible machine learning algorithms for classifying multivariate data using Riemannian geometry of symmetric positive definite matrices, with support for both NumPy and PyTorch backends. Yes. Active maintenance, low install friction, permissive license, and no known vulnerabilities make it safe to adopt. The scikit-learn-compatible API and support for both NumPy and PyTorch backends provide flexibility. Install if you work with multivariate biosignals, BCI systems, or remote sensing imagery requiring Riemannian geometric classification. ## Install pip install pyriemann uv add pyriemann poetry add pyriemann ## Installing pyriemann Before you install: Low friction: pure-Python wheel distribution with well-established dependencies (numpy, scipy, scikit-learn). Active maintenance with a recent release 44 days ago and ongoing repository activity. License in practice: BSD 3-clause permissive license allows commercial and private use with minimal restrictions; attribution required but no copyleft obligations. Quickstart: pip install pyriemann import pyriemann from pyriemann.estimation import Covariances from pyriemann.classification import MDM X = ... # EEG data: n_epochs x n_channels x n_times y = ... # labels cov = Covariances().fit_transform(X) mdm = MDM() print(mdm.fit(cov, y).score(cov, y)) Requires Python >=3.9; designed for multichannel time-series data in specific format (n_epochs x n_channels x n_times). Verify before relying: - Whether PyTorch backend integration requires PyTorch as an optional dependency or works transparently when installed - Performance characteristics and scalability limits for large covariance matrix datasets - Specific BCI paradigm support beyond motor imagery, ERP, and SSVEP mentioned in documentation ## Package facts - License: BSD (3-clause) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 89.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags riemannian geometry machine learning, EEG classification BCI, covariance matrix classification, brain-computer interface, multivariate signal processing, SPD matrix learning, biosignal analysis, riemannian-geometry, brain-computer-interface, biosignal-processing [View on SkillFed](https://skillfed.io/packages/pyriemann) · [View on PyPI](https://pypi.org/project/pyriemann/)