My code is:
undersample = TomekLinks(sampling_strategy='majority', n_jobs= -1, random_state = 42)
X_tl, y_tl = undersample.fit_resample(X, y)
When I run it, I get this error:
TypeError: __init__() got an unexpected keyword argument 'random_state'
My package version is:
imbalanced-learn==0.9.0
although in the documentation this parameter exists:
random_state : int, RandomState instance or None, optional (default=None)
when I check the constructor in _tomek_links.py
, I don't see the random state field:
@_deprecate_positional_args
def __init__(self, *, sampling_strategy="auto", n_jobs=None):
super().__init__(sampling_strategy=sampling_strategy)
self.n_jobs = n_jobs