Input: sample matrix, window width, number of generation virtual samples, number of neighbors

Output: virtual sample

1) Compute the number of generation virtual samples for each sample according to Equation (5).

2) Find nearest neighbors for each sample. Obtain the regression coefficients set and through the given sample and the corresponding nearest neighbors according to Equation (6).

3) Smooth the regression coefficients set with Savitzky-Golay filter.

4) Generate new samples according to Equation (7).