Skip to content

Commit ac16d91

Browse files
glemaitrechkoar
authored andcommitted
EHN: New metrics (#204)
1 parent 66c90f7 commit ac16d91

File tree

8 files changed

+1310
-2
lines changed

8 files changed

+1310
-2
lines changed

doc/api.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,26 @@ Functions
119119

120120
pipeline.make_pipeline
121121

122+
.. _metrics_ref:
123+
124+
Metrics
125+
=======
126+
127+
.. automodule:: imblearn.metrics
128+
:no-members:
129+
:no-inherited-members:
130+
131+
.. currentmodule:: imblearn
132+
133+
Functions
134+
---------
135+
.. autosummary::
136+
:toctree: generated/
137+
metrics.sensitivity_specificity_support
138+
metrics.sensitivity_score
139+
metrics.specificity_score
140+
metrics.geometric_mean_score
141+
metrics.make_index_balanced_accuracy
122142

123143
.. _datasets_ref:
124144

doc/whats_new.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ New features
2929
~~~~~~~~~~~~
3030

3131
- Added AllKNN under sampling technique. By `Dayvid Oliveira`_.
32+
- Added a module `metrics` implementing some specific scoring function for the problem of balancing. By `Guillaume Lemaitre`_ and `Christos Aridas`_.
3233

3334
Enhancement
3435
~~~~~~~~~~~

imblearn/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
ensemble
1111
Module which provides methods generating an ensemble of
1212
under-sampled subsets.
13+
metrics
14+
Module which provides metrics to quantified the classification performance
15+
with imbalanced dataset.
1316
over_sampling
1417
Module which provides methods to under-sample a dataset.
1518
under-sampling
@@ -31,6 +34,6 @@
3134

3235
# list all submodules available in imblearn and version
3336
__all__ = [
34-
'combine', 'ensemble', 'over_sampling', 'under_sampling', 'pipeline',
35-
'__version__'
37+
'combine', 'ensemble', 'metrics', 'over_sampling', 'under_sampling',
38+
'pipeline', '__version__'
3639
]

imblearn/metrics/__init__.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""
2+
The :mod:`imblearn.metrics` module includes score functions, performance
3+
metrics and pairwise metrics and distance computations.
4+
"""
5+
6+
from .classification import sensitivity_specificity_support
7+
from .classification import sensitivity_score
8+
from .classification import specificity_score
9+
from .classification import geometric_mean_score
10+
from .classification import make_index_balanced_accuracy
11+
from .classification import classification_report_imbalanced
12+
13+
__all__ = [
14+
'sensitivity_specificity_support', 'sensitivity_score',
15+
'specificity_score', 'geometric_mean_score',
16+
'make_index_balanced_accuracy', 'classification_report_imbalanced'
17+
]

0 commit comments

Comments
 (0)