analyticalmindsltd / smote_variants

A collection of 85 minority oversampling techniques (SMOTE) for imbalanced learning with multi-class oversampling and model selection features
http://smote-variants.readthedocs.io
MIT License
631 stars 137 forks source link

Implement 'verbose' parameter (feature request) #72

Closed Jose-Verdu-Diaz closed 1 year ago

Jose-Verdu-Diaz commented 1 year ago

Hello, I would love to have control over the logging of the oversampling with a 'verbose' (bool) parameter. I find that the logging can end up cluttering the terminal too much, especially for multiclass oversampling.

I forked the repo and tried implementing it to the OverSamplingBase, just to realise that the logger is created at many other levels, so I'm unsure of what would be the cleanest solution

Thanks for this work!

gykovacs commented 1 year ago

Hi! Thank you for raising. In fact, you have control. You should query the package's logger as

import logging
logger = logging.getLogger('smote_variants')

and then you can set the level of logging to what suits the most, for example:

logger.setLevel(logging.ERROR)

should suppress all logging. Let me know if it works!

Jose-Verdu-Diaz commented 1 year ago

That worked great, thank you!