from sklearn.datasets import load_boston boston=load_boston() boston.keys() print(boston.DESCR) data=boston.data x=data[:,5] y=boston.target import matplotlib.pyplot as plt plt.scatter(x,y) plt.plot(x,9*x-30) plt.show()
原文:https://www.cnblogs.com/ZHONGmy/p/10094889.html