Consistent approach to warnings
In some parts of the code we use logger.warningwhile in other parts we used warnings.
Is there any reason not use warnings everywhere?
This is actually addressed in the Python logging HOWTO:
warnings.warn() in library code if the issue is avoidable and the client application should be modified to eliminate the warning.
logging.warning() if there is nothing the client application can do about the situation, but the event should still be noted.
We have a few inconsistencies in how we apply this. For example we raise UserWarning when computing partial correlations. Another concern I have is that on user side both types of warnings look very similar so we are training the users to ignore all warnings.
On a related note, we should be using FutureWarning for deprecation warnings and not DeprecationWarning since that's what the Python documentation recommends and this is what scikit-learn has recently done.
@aloukina this is done right?
No, not throughout the code ;(