@@ -47,18 +47,32 @@ class BorderlineSMOTE(BaseSMOTE):
4747 {random_state}
4848
4949 k_neighbors : int or object, default=5
50- If ``int``, number of nearest neighbours to used to construct synthetic
51- samples. If object, an estimator that inherits from
52- :class:`~sklearn.neighbors.base.KNeighborsMixin` that will be used to
53- find the k_neighbors.
50+ The nearest neighbors used to define the neighborhood of samples to use
51+ to generate the synthetic samples. You can pass:
52+
53+ - an `int` corresponding to the number of neighbors to use. A
54+ `~sklearn.neighbors.NearestNeighbors` instance will be fitted in this
55+ case.
56+ - an instance of a compatible nearest neighbors algorithm that should
57+ implement both methods `kneighbors` and `kneighbors_graph`. For
58+ instance, it could correspond to a
59+ :class:`~sklearn.neighbors.NearestNeighbors` but could be extended to
60+ any compatible class.
5461
5562 {n_jobs}
5663
5764 m_neighbors : int or object, default=10
58- If int, number of nearest neighbours to use to determine if a minority
59- sample is in danger. If object, an estimator that inherits
60- from :class:`~sklearn.neighbors.base.KNeighborsMixin` that will be used
61- to find the m_neighbors.
65+ The nearest neighbors used to determine if a minority sample is in
66+ "danger". You can pass:
67+
68+ - an `int` corresponding to the number of neighbors to use. A
69+ `~sklearn.neighbors.NearestNeighbors` instance will be fitted in this
70+ case.
71+ - an instance of a compatible nearest neighbors algorithm that should
72+ implement both methods `kneighbors` and `kneighbors_graph`. For
73+ instance, it could correspond to a
74+ :class:`~sklearn.neighbors.NearestNeighbors` but could be extended to
75+ any compatible class.
6276
6377 kind : {{"borderline-1", "borderline-2"}}, default='borderline-1'
6478 The type of SMOTE algorithm to use one of the following options:
@@ -261,18 +275,32 @@ class SVMSMOTE(BaseSMOTE):
261275 {random_state}
262276
263277 k_neighbors : int or object, default=5
264- If ``int``, number of nearest neighbours to used to construct synthetic
265- samples. If object, an estimator that inherits from
266- :class:`~sklearn.neighbors.base.KNeighborsMixin` that will be used to
267- find the k_neighbors.
278+ The nearest neighbors used to define the neighborhood of samples to use
279+ to generate the synthetic samples. You can pass:
280+
281+ - an `int` corresponding to the number of neighbors to use. A
282+ `~sklearn.neighbors.NearestNeighbors` instance will be fitted in this
283+ case.
284+ - an instance of a compatible nearest neighbors algorithm that should
285+ implement both methods `kneighbors` and `kneighbors_graph`. For
286+ instance, it could correspond to a
287+ :class:`~sklearn.neighbors.NearestNeighbors` but could be extended to
288+ any compatible class.
268289
269290 {n_jobs}
270291
271292 m_neighbors : int or object, default=10
272- If int, number of nearest neighbours to use to determine if a minority
273- sample is in danger. If object, an estimator that inherits from
274- :class:`~sklearn.neighbors.base.KNeighborsMixin` that will be used to
275- find the m_neighbors.
293+ The nearest neighbors used to determine if a minority sample is in
294+ "danger". You can pass:
295+
296+ - an `int` corresponding to the number of neighbors to use. A
297+ `~sklearn.neighbors.NearestNeighbors` instance will be fitted in this
298+ case.
299+ - an instance of a compatible nearest neighbors algorithm that should
300+ implement both methods `kneighbors` and `kneighbors_graph`. For
301+ instance, it could correspond to a
302+ :class:`~sklearn.neighbors.NearestNeighbors` but could be extended to
303+ any compatible class.
276304
277305 svm_estimator : estimator object, default=SVC()
278306 A parametrized :class:`~sklearn.svm.SVC` classifier can be passed.
0 commit comments