@@ -127,11 +127,11 @@ nearest neighbors class. Those variants are presented in the figure below.
127127 :align: center
128128
129129
130- The parameter `` kind `` is controlling this feature and the following types are
131- available: (i) `` 'borderline1' ``, (ii) `` 'borderline2' ``, and (iii) `` 'svm' `` ::
130+ The :class: ` BorderlineSMOTE ` and :class: ` SVMSMOTE ` offer some variant of the SMOTE
131+ algorithm ::
132132
133- >>> from imblearn.over_sampling import SMOTE, ADASYN
134- >>> X_resampled, y_resampled = SMOTE(kind='borderline1' ).fit_sample(X, y)
133+ >>> from imblearn.over_sampling import BorderlineSMOTE
134+ >>> X_resampled, y_resampled = BorderlineSMOTE( ).fit_sample(X, y)
135135 >>> print(sorted(Counter(y_resampled).items()))
136136 [(0, 4674), (1, 4674), (2, 4674)]
137137
@@ -168,12 +168,11 @@ interpolation will create a sample on the line between :math:`x_{i}` and
168168Each SMOTE variant and ADASYN differ from each other by selecting the samples
169169:math: `x_i` ahead of generating the new samples.
170170
171- The **regular ** SMOTE algorithm --- cf. to ``kind='regular' `` when
172- instantiating a :class: `SMOTE ` object --- does not impose any rule and will
173- randomly pick-up all possible :math: `x_i` available.
171+ The **regular ** SMOTE algorithm --- cf. to the :class: `SMOTE ` object --- does not
172+ impose any rule and will randomly pick-up all possible :math: `x_i` available.
174173
175- The **borderline ** SMOTE --- cf. to `` kind='borderline1' `` and
176- ``kind='borderline2 ' `` when instantiating a :class: ` SMOTE ` object --- will
174+ The **borderline ** SMOTE --- cf. to the :class: ` BorderlineSMOTE ` with the
175+ parameters ``kind='borderline-1 ' `` and `` kind='borderline-2' `` --- will
177176classify each sample :math: `x_i` to be (i) noise (i.e. all nearest-neighbors
178177are from a different class than the one of :math: `x_i`), (ii) in danger
179178(i.e. at least half of the nearest neighbors are from the same class than
@@ -184,10 +183,9 @@ samples *in danger* to generate new samples. In **Borderline-1** SMOTE,
184183:math: `x_i`. On the contrary, **Borderline-2 ** SMOTE will consider
185184:math: `x_{zi}` which can be from any class.
186185
187- **SVM ** SMOTE --- cf. to ``kind='svm' `` when instantiating a :class: `SMOTE `
188- object --- uses an SVM classifier to find support vectors and generate samples
189- considering them. Note that the ``C `` parameter of the SVM classifier allows to
190- select more or less support vectors.
186+ **SVM ** SMOTE --- cf. to :class: `SVMSMOTE ` --- uses an SVM classifier to find
187+ support vectors and generate samples considering them. Note that the ``C ``
188+ parameter of the SVM classifier allows to select more or less support vectors.
191189
192190For both borderline and SVM SMOTE, a neighborhood is defined using the
193191parameter ``m_neighbors `` to decide if a sample is in danger, safe, or noise.
@@ -196,7 +194,7 @@ ADASYN is working similarly to the regular SMOTE. However, the number of
196194samples generated for each :math: `x_i` is proportional to the number of samples
197195which are not from the same class than :math: `x_i` in a given
198196neighborhood. Therefore, more samples will be generated in the area that the
199- nearest neighbor rule is not respected. The parameter ``n_neighbors `` is
197+ nearest neighbor rule is not respected. The parameter ``m_neighbors `` is
200198equivalent to ``k_neighbors `` in :class: `SMOTE `.
201199
202200Multi-class management
0 commit comments