@@ -26,13 +26,13 @@ def make_imbalance(
2626
2727 Parameters
2828 ----------
29- X : {array-like, dataframe}, shape (n_samples, n_features)
29+ X : {array-like, dataframe} of shape (n_samples, n_features)
3030 Matrix containing the data to be imbalanced.
3131
32- y : ndarray, shape (n_samples, )
32+ y : ndarray of shape (n_samples,)
3333 Corresponding label for each sample in X.
3434
35- sampling_strategy : dict, or callable,
35+ sampling_strategy : dict or callable,
3636 Ratio to use for resampling the data set.
3737
3838 - When ``dict``, the keys correspond to the targeted classes. The
@@ -43,25 +43,25 @@ def make_imbalance(
4343 correspond to the targeted classes. The values correspond to the
4444 desired number of samples for each class.
4545
46- random_state : int, RandomState instance or None, optional ( default=None)
46+ random_state : int, RandomState instance or None, default=None
4747 If int, random_state is the seed used by the random number generator;
4848 If RandomState instance, random_state is the random number generator;
4949 If None, the random number generator is the RandomState instance used
5050 by np.random.
5151
52- verbose : bool, optional ( default=False)
52+ verbose : bool, default=False
5353 Show information regarding the sampling.
5454
55- kwargs : dict, optional
55+ kwargs : dict
5656 Dictionary of additional keyword arguments to pass to
5757 ``sampling_strategy``.
5858
5959 Returns
6060 -------
61- X_resampled : {ndarray, dataframe}, shape (n_samples_new, n_features)
61+ X_resampled : {ndarray, dataframe} of shape (n_samples_new, n_features)
6262 The array containing the imbalanced data.
6363
64- y_resampled : ndarray, shape (n_samples_new)
64+ y_resampled : ndarray of shape (n_samples_new)
6565 The corresponding label of `X_resampled`
6666
6767 Notes
@@ -86,7 +86,6 @@ def make_imbalance(
8686 ... random_state=42)
8787 >>> print('Distribution after imbalancing: {}'.format(Counter(y_res)))
8888 Distribution after imbalancing: Counter({2: 30, 1: 20, 0: 10})
89-
9089 """
9190 target_stats = Counter (y )
9291 # restrict ratio to be a dict or a callable
0 commit comments