pyriemann.geometry.test.is_pos_def

pyriemann.geometry.test.is_pos_def(X, tol=0.0, fast_mode=False)[source]

Check if all matrices are positive definite (PD).

Check if all matrices are positive definite, fast verification is done with Cholesky decomposition, while full check compute all eigenvalues to verify that they are positive.

Parameters:
Xndarray, shape (…, n, n)

The set of square matrices.

tolfloat, default=0.0

Threshold below which eigen values are considered zero.

Added in version 0.5.

fast_modebool, default=False

Use Cholesky decomposition to avoid computing all eigenvalues.

Returns:
retbool

True if all matrices are positive definite.

Notes

Added in version 0.3.

Changed in version 0.5: Add parameter tol.