File tree 4 files changed +19
-13
lines changed
4 files changed +19
-13
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,13 @@ Version 0.5 (under development)
6
6
Changelog
7
7
---------
8
8
9
+ Documentation
10
+ .............
11
+
12
+ - Correct the definition of the ratio when using a ``float `` in sampling
13
+ strategy for the over-sampling and under-sampling.
14
+ :issue: `525 ` by :user: `Ariel Rossanigo <arielrossanigo> `.
15
+
9
16
Maintenance
10
17
...........
11
18
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ def my_autopct(pct):
96
96
97
97
###############################################################################
98
98
# For **over-sampling methods**, it correspond to the ratio
99
- # :math:`\\alpha_{os}` defined by :math:`N_{rm} = \\alpha_{os} \\times N_{m }`
99
+ # :math:`\\alpha_{os}` defined by :math:`N_{rm} = \\alpha_{os} \\times N_{M }`
100
100
# where :math:`N_{rm}` and :math:`N_{M}` are the number of samples in the
101
101
# minority class after resampling and the number of samples in the majority
102
102
# class, respectively.
Original file line number Diff line number Diff line change @@ -22,12 +22,11 @@ class BaseOverSampler(BaseSampler):
22
22
Sampling information to resample the data set.
23
23
24
24
- When ``float``, it corresponds to the desired ratio of the number of
25
- samples in the majority class over the number of samples in the
26
- minority class after resampling. Therefore, the ratio is expressed as
27
- :math:`\\ alpha_{os} = N_{M} / N_{rm}` where :math:`N_{rm}` and
28
- :math:`N_{M}` are the number of samples in the minority class after
29
- resampling and the number of samples in the majority class,
30
- respectively.
25
+ samples in the minority class over the number of samples in the
26
+ majority class after resampling. Therefore, the ratio is expressed as
27
+ :math:`\\ alpha_{os} = N_{rm} / N_{M}` where :math:`N_{rm}` is the
28
+ number of samples in the minority class after resampling and
29
+ :math:`N_{M}` is the number of samples in the majority class.
31
30
32
31
.. warning::
33
32
``float`` is only available for **binary** classification. An
Original file line number Diff line number Diff line change @@ -20,12 +20,12 @@ class BaseUnderSampler(BaseSampler):
20
20
Sampling information to sample the data set.
21
21
22
22
- When ``float``, it corresponds to the desired ratio of the number of
23
- samples in the majority class over the number of samples in the
24
- minority class after resampling. Therefore, the ratio is expressed as
25
- :math:`\\ alpha_{us} = N_{rM } / N_{m }` where :math:`N_{rM }` and
26
- :math:`N_{m}` are the number of samples in the majority class after
27
- resampling and the number of samples in the minority class,
28
- respectively .
23
+ samples in the minority class over the number of samples in the
24
+ majority class after resampling. Therefore, the ratio is expressed as
25
+ :math:`\\ alpha_{us} = N_{m } / N_{rM }` where :math:`N_{m }` is the
26
+ number of samples in the minority class and
27
+ :math:`N_{rM}` is the number of samples in the majority class
28
+ after resampling .
29
29
30
30
.. warning::
31
31
``float`` is only available for **binary** classification. An
You can’t perform that action at this time.
0 commit comments