The invention discloses a self-adaptive K value undersampling method based on multi-
modal density
perception, and belongs to the field of
machine learning data preprocessing. The method comprises the following steps: constructing a shape sensing kernel function, and converting an
Euclidean distance into a
Mahalanobis distance through a k-nearest neighbor
covariance matrix, so that a kernel shape adapts to a
data cluster distribution form; calculating density
estimation of each scale by adopting a multi-bandwidth shape sensing kernel, and realizing multi-scale fusion based on index
weight distribution of global density deviation; constructing a
noise suppression weight in combination with a
local outlier factor to correct density
estimation; and executing two-stage search: marking potential overlapping examples by taking majority classes as anchor points, and dynamically selecting klarge or ksmall values for secondary judgment according to density comparison of the majority classes and minority classes. The problem of insufficient precision caused by a fixed k value and a single
Gaussian kernel is solved through a multi-
modal density sensing framework, accurate positioning of overlapped instances under complex distribution and optimal reservation of
majority class information are realized, and the classification performance of
class imbalance data is remarkably improved.