(1) Input: small sample set , over-sampling magnification ;
(2) Output: the new small sample set , sample number ;
(3) For each small class sample , find nearest neighbors of the same kind with ;
(4) Choose samples according to the magnification of over-sampling randomly, then do random linear interpolation between
   and each neighbor selected;
Algorithm 1: SMOTE over-sampling.