# What’s new in the package¶

A catalog of new features, improvements, and bug-fixes in each release.

## v0.4 (Feb 2023)¶

Add exponential and logarithmic maps for three main metrics: ‘euclid’, ‘logeuclid’ and ‘riemann’.

`pyriemann.utils.tangentspace.tangent_space()`

is splitted in two steps: (i)`log_map_*()`

projecting SPD matrices into tangent space depending on the metric; and (ii)`pyriemann.utils.tangentspace.upper()`

taking the upper triangular part of matrices. Similarly,`pyriemann.utils.tangentspace.untangent_space()`

is splitted into (i)`pyriemann.utils.tangentspace.unupper()`

and (ii)`exp_map_*()`

. The different metrics for tangent space mapping can now be defined into`pyriemann.tangentspace.TangentSpace`

, then used for`transform()`

as well as for`inverse_transform()`

. #195 by @qbarthelemyEnhance AJD: add

`init`

to`pyriemann.utils.ajd.ajd_pham()`

and`pyriemann.utils.ajd.rjd()`

, add`warm_restart`

to`pyriemann.spatialfilters.AJDC`

. #196 by @qbarthelemyAdd parameter

`sampling_method`

to`pyriemann.datasets.sample_gaussian_spd()`

, with`rejection`

accelerating 2x2 matrices generation. #198 by @Artim436Add geometric medians for Euclidean and Riemannian metrics:

`pyriemann.utils.median_euclid()`

and`pyriemann.utils.median_riemann()`

, and add an example in gallery to compare means and medians on synthetic datasets. #200 by @qbarthelemyAdd

`score()`

to`pyriemann.regression.KNearestNeighborRegressor`

. #205 by @qbarthelemyAdd Transfer Learning module and examples, including RPA and MDWM. #189 by @plcrodrigues, @qbarthelemy and @sylvchev

Add class distinctiveness function to measure the distinctiveness between classes on the manifold,

`pyriemann.classification.class_distinctiveness()`

, and complete an example in gallery to show how it works on synthetic datasets. #215 by @MSYamamotoAdd example on ensemble learning applied to functional connectivity, and add

`pyriemann.utils.base.nearest_sym_pos_def()`

. #202 by @mccorsi and @sylvchevAdd kernel matrices representation

`pyriemann.estimation.Kernels`

and complete example comparing estimators. #217 by @qbarthelemyAdd a new covariance estimator, robust fixed point covariance, and add kwds arguments for all covariance based functions and classes. #220 by @qbarthelemy

Add example in gallery on frequency band selection using class distinctiveness measure. #219 by @MSYamamoto

Add

`pyriemann.utils.covariance.covariance_mest()`

supporting three robust M-estimators (Huber, Student-t and Tyler) and available for all covariance based functions and classes; and add an example on robust covariance estimation for corrupted data. Add also`pyriemann.utils.distance.distance_mahalanobis()`

between between vectors and a Gaussian distribution. #223 by @qbarthelemy

## v0.3 (July 2022)¶

Correct spectral estimation in

`pyriemann.utils.covariance.cross_spectrum()`

to obtain equivalence with SciPy. #133 by @qbarthelemyAdd instantaneous, lagged and imaginary coherences in

`pyriemann.utils.covariance.coherence()`

and`pyriemann.estimation.Coherences`

. #132 by @qbarthelemyAdd

`partial_fit`

in`pyriemann.clustering.Potato`

, useful for an online update; and update example on artifact detection. #133 by @qbarthelemyDeprecate

`pyriemann.utils.viz.plot_confusion_matrix()`

as sklearn integrate its own version. #135 by @sylvchevAdd Ando-Li-Mathias mean estimation in

`pyriemann.utils.mean.mean_covariance()`

. #56 by @sylvchevAdd Schaefer-Strimmer covariance estimator in

`pyriemann.utils.covariance.covariances()`

, and an example to compare estimators #59 by @sylvchevRefactor tests + fix refit of

`pyriemann.tangentspace.TangentSpace`

. #136 by @sylvchevAdd

`pyriemann.clustering.PotatoField`

, and an example on artifact detection. #142 by @qbarthelemyAdd sampling SPD matrices from a Riemannian Gaussian distribution in

`pyriemann.datasets.sample_gaussian_spd()`

. #140 by @plcrodriguesAdd new function

`pyriemann.datasets.make_gaussian_blobs()`

for generating random datasets with SPD matrices. #140 by @plcrodriguesAdd module

`pyriemann.utils.viz`

in API, add`pyriemann.utils.viz.plot_waveforms()`

, and add an example on ERP visualization. #144 by @qbarthelemyAdd a special form covariance matrix

`pyriemann.utils.covariance.covariances_X()`

. #147 by @qbarthelemyAdd masked and NaN means with Riemannian metric:

`pyriemann.utils.mean.maskedmean_riemann()`

and`pyriemann.utils.mean.nanmean_riemann()`

. #149 by @qbarthelemy and @sylvchevAdd

`corr`

option in`pyriemann.utils.covariance.normalize()`

, to normalize covariance into correlation matrices. #153 by @qbarthelemyAdd block covariance matrix:

`pyriemann.estimation.BlockCovariances`

and`pyriemann.utils.covariance.block_covariances()`

. #154 by @gabelsteinAdd Riemannian Locally Linear Embedding:

`pyriemann.embedding.LocallyLinearEmbedding`

and`pyriemann.embedding.locally_linear_embedding()`

. #159 by @gabelsteinAdd Riemannian Kernel Function:

`pyriemann.utils.kernel.kernel_riemann()`

. #159 by @gabelsteinFix

`fit`

in`pyriemann.channelselection.ElectrodeSelection`

. #166 by @qbarthelemyAdd power mean estimation in

`pyriemann.utils.mean.mean_power()`

. #170 by @qbarthelemy and @plcrodriguesAdd example in gallery to compare classifiers on synthetic datasets. #175 by @qbarthelemy

Add

`predict_proba`

in`pyriemann.classification.KNearestNeighbor`

, and correct attribute`classes_`

. #171 by @qbarthelemyAdd Riemannian Support Vector Machine classifier:

`pyriemann.classification.SVC`

. #175 by @gabelstein and @qbarthelemyAdd Riemannian Support Vector Machine regressor:

`pyriemann.regression.SVR`

. #175 by @gabelstein and @qbarthelemyAdd K-Nearest-Neighbor regressor:

`pyriemann.regression.KNearestNeighborRegressor`

. #164 by @gabelstein, @qbarthelemy and @agramfortAdd Minimum Distance to Mean Field classifier:

`pyriemann.classification.MeanField`

. #172 by @qbarthelemy and @plcrodriguesAdd example on principal geodesic analysis (PGA) for SSVEP classification. #169 by @qbarthelemy

Add

`pyriemann.utils.distance.distance_harmonic()`

, and sort functions by their names in code, doc and tests. #183 by @qbarthelemyParallelize functions for dataset generation:

`pyriemann.datasets.make_gaussian_blobs()`

. #179 by @sylvchevFix dispersion when generating datasets:

`pyriemann.datasets.sample_gaussian_spd()`

. #179 by @sylvchevEnhance base and distance functions, to process ndarrays of SPD matrices. #186 and #187 by @qbarthelemy

Enhance utils functions, to process ndarrays of SPD matrices. #190 by @qbarthelemy

Enhance means functions, with faster implementations and warning when convergence is not reached. #188 by @qbarthelemy

## v0.2.7 (June 2021)¶

Add example on SSVEP classification

Fix compatibility with scikit-learn v0.24

Correct probas of

`pyriemann.classification.MDM`

Add

`predict_proba`

for`pyriemann.clustering.Potato`

, and an example on artifact detectionAdd weights to Pham’s AJD algorithm

`pyriemann.utils.ajd.ajd_pham()`

Add

`pyriemann.utils.covariance.cross_spectrum()`

, fix`pyriemann.utils.covariance.cospectrum()`

;`pyriemann.utils.covariance.coherence()`

output is kept unchangedAdd

`pyriemann.spatialfilters.AJDC`

for BSS and gBSS, with an example on artifact correctionAdd

`pyriemann.preprocessing.Whitening`

, with optional dimension reduction

## v0.2.6 (March 2020)¶

Updated for better Scikit-Learn v0.22 support

## v0.2.5 (January 2018)¶

Added BilinearFilter

Added a permutation test for generic scikit-learn estimator

Stats module refactoring, with distance based t-test and f-test

Removed two way permutation test

Added FlatChannelRemover

Support for python 3.5 in travis

Added Shrinkage transformer

Added Coherences transformer

Added Embedding class.

## v0.2.4 (June 2016)¶

Improved documentation

Added TSclassifier for out-of the box tangent space classification.

Added Wasserstein distance and mean.

Added NearestNeighbor classifier.

Added Softmax probabilities for MDM.

Added CSP for covariance matrices.

Added Approximate Joint diagonalization algorithms (JADE, PHAM, UWEDGE).

Added ALE mean.

Added Multiclass CSP.

API: param name changes in CospCovariances to comply to Scikit-Learn.

API: attributes name changes in most modules to comply to the Scikit-Learn naming convention.

Added HankelCovariances estimation

Added SPoC spatial filtering

Added Harmonic mean

Added Kullback leibler mean

## v0.2.3 (November 2015)¶

Added multiprocessing for MDM with joblib.

Added kullback-leibler divergence.

Added Riemannian Potato.

Added sample_weight for mean estimation and MDM.