将sklearn.datasets中的load_boston房价数据用多项式回归进行训练,并画出学习曲线
import matplotlib.pyplot as plt
import numpy as np
from sklearn.datasets import load_boston
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import PolynomialFeatures
from sklearn.pipeline import Pipeline
from common.utils import plot_learning_curve
from sklearn.model_selection import ShuffleSplit
def get_bosten_houst_price_train_test_data():
bosten_houst_price_data = load_boston()
x = bosten_houst_price_data.data
y = bosten_houst_price_data.target
print(bosten_houst_price_data.feature_names)
#print(x)
print(x.shape)
x_train