df = pd.read_excel(r'C:\Users\AORUS\Desktop\test2.xlsx')
#生成100个一元回归数据集
#x, y = sklearn.datasets.make_regression(n_features=1, noise=5, random_state=2020)
x = np.array(df['T2C_attarchment_F_sum'].values).reshape(-1,1)
y = np.array(df['T2C_attarchment_M_sum'].values)
plt.scatter(x, y)
plt.show()
#加5个异常数据,为什么这么加,大家自己看一下生成的x,y的样子
a = np.linspace(1,2,5).reshape(-1,1)
b = np.array([350,380,410,430,480])
后面的代码我都没改