File tree Expand file tree Collapse file tree 2 files changed +11
-119
lines changed Expand file tree Collapse file tree 2 files changed +11
-119
lines changed Original file line number Diff line number Diff 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 ()
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments