python
import numpy as np
from sklearn.preprocessing import PolynomialFeatures
from sklearn.linear_model import LinearRegression
import matplotlib.pyplot as plt
示例数据
x = np.linspace(0, 10, 100)
y = 3 * np.power(x, 2) + 2 * x + 1 + np.random.normal(0, 100, 100)