Skip to content

Conversation

dabrze
Copy link
Contributor

@dabrze dabrze commented Jan 13, 2017

Reference Issue

Fixes #215

What does this implement/fix? Explain your changes.

Adds the possibility of calculating G-mean for multi-class problems without resorting to averaging binary G-mean values. At the same time G-mean can still be average on a class-wise basis. This implementation also adds the possibility of "correcting" unrecognized class recalls from zero to a user-specified value. This is only works when average == 'multiclass'.

Additional comment

In the report_imbalanced_multiclass() I left the resulting report as it was, since it is designed to show the results separately for each class. You may, however, consider to extend this report to have a header with overall accuracy and overall G-mean (as single lines above the table). I'm not sure if you want to add that, especially that accuracy works a little bit differently than the measures you implemented in the metrics module. Therefore maybe it is best to leave this as it is.

@coveralls
Copy link

coveralls commented Jan 13, 2017

Coverage Status

Coverage increased (+0.01%) to 98.907% when pulling ab688f4 on dabrze:master into 6b71fea on scikit-learn-contrib:master.

@coveralls
Copy link

coveralls commented Jan 13, 2017

Coverage Status

Coverage increased (+0.01%) to 98.907% when pulling 013b8c0 on dabrze:master into 6b71fea on scikit-learn-contrib:master.

@glemaitre glemaitre merged commit 7b35bda into scikit-learn-contrib:master Jan 13, 2017
@glemaitre
Copy link
Member

Thanks for the PR.

I will have to check if the IBA can be used with all the metrics.
I think that there some possible bugs with the different arguments.

christophe-rannou pushed a commit to christophe-rannou/imbalanced-learn that referenced this pull request Apr 3, 2017
…oblems (scikit-learn-contrib#219)

* Added option to calculate G-mean for multiclass problems without averaging one-vs-rest results (scikit-learn-contrib#215).

* Addressing issue scikit-learn-contrib#215. (removed unnecessary import)

* Fixed line length to be in accordance with PEP 8.
glemaitre pushed a commit to glemaitre/imbalanced-learn that referenced this pull request Jun 15, 2017
…oblems (scikit-learn-contrib#219)

* Added option to calculate G-mean for multiclass problems without averaging one-vs-rest results (scikit-learn-contrib#215).

* Addressing issue scikit-learn-contrib#215. (removed unnecessary import)

* Fixed line length to be in accordance with PEP 8.
glemaitre pushed a commit to glemaitre/imbalanced-learn that referenced this pull request Jun 15, 2017
…oblems (scikit-learn-contrib#219)

* Added option to calculate G-mean for multiclass problems without averaging one-vs-rest results (scikit-learn-contrib#215).

* Addressing issue scikit-learn-contrib#215. (removed unnecessary import)

* Fixed line length to be in accordance with PEP 8.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

G-mean incorrectly implemented for multi-class

3 participants