Skip to content

Commit 48d1fd5

Browse files
committed
iter
1 parent 99d5206 commit 48d1fd5

File tree

2 files changed

+11
-119
lines changed

2 files changed

+11
-119
lines changed

imblearn/over_sampling/_adasyn.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,17 @@ class ADASYN(BaseOverSampler):
3939
{random_state}
4040
4141
n_neighbors : int or estimator object, default=5
42-
If ``int``, number of nearest neighbours to used to construct synthetic
43-
samples. If object, an estimator that inherits from
44-
:class:`~sklearn.neighbors.base.KNeighborsMixin` that will be used to
45-
find the k_neighbors.
42+
The nearest neighbors used to define the neighborhood of samples to use
43+
to generate the synthetic samples. You can pass:
44+
45+
- an `int` corresponding to the number of neighbors to use. A
46+
`~sklearn.neighbors.NearestNeighbors` instance will be fitted in this
47+
case.
48+
- an instance of a compatible nearest neighbors algorithm that should
49+
implement both methods `kneighbors` and `kneighbors_graph`. For
50+
instance, it could correspond to a
51+
:class:`~sklearn.neighbors.NearestNeighbors` but could be extended to
52+
any compatible class.
4653
4754
{n_jobs}
4855
@@ -124,7 +131,6 @@ def _validate_estimator(self):
124131
self.nn_ = check_neighbors_object(
125132
"n_neighbors", self.n_neighbors, additional_neighbor=1
126133
)
127-
self.nn_.set_params(**{"n_jobs": self.n_jobs})
128134

129135
def _fit_resample(self, X, y):
130136
self._validate_estimator()

imblearn/over_sampling/_smote/tests/test_common.py

Lines changed: 0 additions & 114 deletions
This file was deleted.

0 commit comments

Comments
 (0)