import numpy as np
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import PolynomialFeatures
font=FontProperties(fname=r"C:\Windows\Fonts\msyh.ttc",size=15)#设置中文字体
def runplt():
plt.figure()
plt.title('身高与体重一元关系',fontproperties=font)
plt.xlabel('身高(米)',fontproperties=font)
plt.ylabel('体重(千克)',fontproperties=font)
plt.axis([0.5,2,5,85],fontproperties=font)
plt.grid(True)
return plt
#导入数据
X_train=[[0.86],[
多项式回归 Python sklearn库 LinearRegression(学习笔记)
最新推荐文章于 2023-03-28 10:34:34 发布