I tried to handle imbalanced dataset using imblearn as:
nm = NearMiss(random_state=42)
X_bal,Y_bal = nm.fit_sample(x,y)
But I am getting an unexpected error:
TypeError: __init__() got an unexpected keyword argument 'random_state'
How to fix this problem?
Thanks!
we first import:
you have use this keyword/parameters in the
.__init__()
so to your problem:
NearMiss custuctor dont take random_state as a parameter wich gives you that the init dont expect that as a keyword.