from sklearn.linear_model import LinearRegression as lrreg=lr().fit(data_x,data_y)score=reg.score(data_x,data_y)#三行代码解君愁
用python它不香嘛?