机器学习-线性回归模型
1 The Boston Housing Dataset
https://www.cs.toronto.edu/~delve/data/boston/bostonDetail.html
2 code:
from sklearn import datasets
from sklearn import linear_model
from sklearn.model_selection import train_test_split
from matplotlib import pyplot as plt
boston = datasets.load_boston()
# split it in features and labels
X = boston.data # features
y = boston.target # label
# linear regression model
l_reg = linear_model.LinearRegression