training = pd.DataFrame({'x':[3,6,9,15,300, 20,85]}). 原始数据training_fitting = pd.DataFrame({'x':[4,7,8,30,280, 10,79]})。 原始数据的fitting值,方法不限。xgboost,RF。。。
dif = np.abs(training.x -training_fitting.x) <10training_data = training[dif]. #过滤高异常的差值。