classKernelADASYN(OverSampling):"""Notes:
* The method of sampling was not specified, Markov Chain Monte Carlo has been implemented.
* Not prepared for improperly conditioned covariance matrix."""categories=[OverSampling.cat_density_estimation,
OverSampling.cat_extensive,
OverSampling.cat_borderline]def __init__(self, proportion= 1.0, k= 5, h= 1.0, n_jobs= 1):"""Constructor of the sampling object
Args:
proportion (float): proportion of the difference of n_maj and n_min to sample
e.g. 1.0 means that after sampling the number of minority
samples will be equal to the number of majority samples
k (int): number of neighbors in the nearest neighbors component
h (float): kernel bandwidth
n_jobs (int): number of parallel jobs"""super().__init__()
self.check_greater_or_equal(proportion,&