You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MinCovDet can't deal with singular covariance, for example in the zero covariance case. Note that usual EmpiricalCovariance can deal with that case too.
I am unsure if this is a bug or just expected behaviour. If we expect to return a finite or full of nan covariance matrix, then we fail. If we expect to actually fail, then we should improve the error message then.
@GaelVaroquaux will be in a better position to tell if this is the expected behaviour here.
I think that if it is possible to do something sensible (like EmpiricalCovariance does), that should be done. If you have to compute a matrix and some entry cannot be computed, it is better to return the matrix with an invalid value, such as NaN, in that entry than to raise an exception. In the first case at least you can deal with the problematic part, but in the latter one you don't even know which part was problematic.
Describe the bug
MinCovDet
can't deal with singular covariance, for example in the zero covariance case. Note that usualEmpiricalCovariance
can deal with that case too.Steps/Code to Reproduce
Expected Results
[[0. 0.]
[0. 0.]]
[[0. 0.]
[0. 0.]]
Actual Results
Versions
System:
python: 3.7.6 (default, Jan 8 2020, 19:59:22) [GCC 7.3.0]
executable: /home/carlos/Programas/Utilidades/Lenguajes/miniconda3/envs/fda/bin/python
machine: Linux-5.4.0-90-generic-x86_64-with-debian-buster-sid
Python dependencies:
pip: 21.3.1
setuptools: 58.5.2
sklearn: 1.0.1
numpy: 1.21.2
scipy: 1.6.2
Cython: 0.29.14
pandas: 1.3.4
matplotlib: 3.4.2
joblib: 1.1.0
threadpoolctl: 3.0.0
Built with OpenMP: True
The text was updated successfully, but these errors were encountered: