Skip to content

Commit 54fce0d

Browse files
committed
2 parents 5888ff7 + 9a1191e commit 54fce0d

File tree

11 files changed

+619
-204
lines changed

11 files changed

+619
-204
lines changed

doc/introduction.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ Imbalanced-learn samplers accept the same inputs that in scikit-learn:
3030
matrices;
3131
* ``targets``: array-like (1-D list, pandas.Series, numpy.array).
3232

33+
The output will be of the following type:
34+
35+
* ``data_resampled``: array-like (2-D list, pandas.Dataframe, numpy.array) or
36+
sparse matrices;
37+
* ``targets_resampled``: 1-D numpy.array or pd.Series.
38+
3339
.. topic:: Sparse input
3440

3541
For sparse input the data is **converted to the Compressed Sparse Rows

doc/over_sampling.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ features or a boolean mask marking these features::
190190
>>> print(X_resampled[-5:])
191191
[['A' 0.5246469549655818 2]
192192
['B' -0.3657680728116921 2]
193-
['A' 0.9344237230779993 2]
193+
['B' 0.9344237230779993 2]
194194
['B' 0.3710891618824609 2]
195195
['B' 0.3327240726719727 2]]
196196

doc/whats_new/v0.6.rst

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ scikit-learn:
1515
- :class:`imblearn.under_sampling.ClusterCentroids`
1616
- :class:`imblearn.under_sampling.InstanceHardnessThreshold`
1717

18+
The following samplers will give different results due to change linked to
19+
the random state internal usage:
20+
21+
- :class:`imblearn.over_sampling.SMOTENC`
22+
1823
Bug fixes
1924
.........
2025

@@ -52,7 +57,8 @@ Enhancement
5257
- :class:`imblearn.under_sampling.RandomUnderSampling`,
5358
:class:`imblearn.over_sampling.RandomOverSampling`,
5459
:class:`imblearn.datasets.make_imbalance` accepts Pandas DataFrame in and
55-
will output Pandas DataFrame.
60+
will output Pandas DataFrame. Similarly, it will accepts Pandas Series in and
61+
will output Pandas Series.
5662
:pr:`636` by :user:`Guillaume Lemaitre <glemaitre>`.
5763

5864
- :class:`imblearn.FunctionSampler` accepts a parameter ``validate`` allowing
@@ -62,7 +68,20 @@ Enhancement
6268
- :class:`imblearn.under_sampling.RandomUnderSampler`,
6369
:class:`imblearn.over_sampling.RandomOverSampler` can resample when non
6470
finite values are present in ``X``.
65-
:pr:`643` by `Guillaume Lemaitre <glemaitre>`.
71+
:pr:`643` by :user:`Guillaume Lemaitre <glemaitre>`.
72+
73+
- All samplers will output a Pandas DataFrame if a Pandas DataFrame was given
74+
as an input.
75+
:pr:`644` by :user:`Guillaume Lemaitre <glemaitre>`.
76+
77+
- The samples generation in
78+
:class:`imblearn.over_sampling.SMOTE`,
79+
:class:`imblearn.over_sampling.BorderlineSMOTE`,
80+
:class:`imblearn.over_sampling.SVMSMOTE`,
81+
:class:`imblearn.over_sampling.KMeansSMOTE`,
82+
:class:`imblearn.over_sampling.SMOTENC` is now vectorize with giving
83+
an additional speed-up when `X` in sparse.
84+
:pr:`596` by :user:`Matt Edding <MattEding>`.
6685

6786
Deprecation
6887
...........

0 commit comments

Comments
 (0)