pyriemann.utils.test.is_pos_def

pyriemann.utils.test.is_pos_def(X, fast_mode=False)

Check if all matrices are positive definite.

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, at least 2D ndarray.

fast_modeboolean, default=False

Use Cholesky decomposition to avoid computing all eigenvalues.

Returns
retboolean

True if all matrices are positive definite.