reiinakano / scikit-plot

An intuitive library to add plotting functionality to scikit-learn objects.
MIT License
2.43k stars 285 forks source link

Add numerical digit precision parameter #102

Open romanovzky opened 5 years ago

romanovzky commented 5 years ago

Hi there,

I was wondering if there is a way of defining the digit numerical precision of values such as roc_auc.

To see what I mean, let me point you to sklearn API such as for Classification Report, where the parameter digits defines to what precision the values are presented.

This is specially important, for example, when one is training classifiers that are already in the top, say, +99.5% of accuracy/precision/recall/auc and we want to study differences amongst classifiers that are competing at the 0.1% level.

Namely I noticed that digit precision is not consistent throughout scikit-plot, where roc_auc is presenting three digit precision, whil precision_recall is presenting four digit precision.

As you can imagine, for scientific publication purposes it's a bit inelegant to present bound metrics with different precision.

Thanks!

lugq1990 commented 5 years ago

@reiinakano I have added the digits parameter to control the precision for metrics function, please see the request. Hope you would check that!