from matplotlib import pyplot #可使用 pyplot 中的函数和方法绘制各种图形
import seaborn as sns #数据可视化库
from matplotlib.font_manager import FontProperties #配置字体的模块
from sklearn.model_selection import train_test_split #将数据集分解为训练集和测试集
from matplotlib import pyplot #可使用 pyplot 中的函数和方法绘制各种图形
from scipy import stats #模块提供了一系列概率分布、假设检验、回归分析等统计函数和工具
from scipy import integrate #数值积分函数和工具
from sklearn.metrics import mean_squared_error, mean_absolute_error # 用于计算回归模型的性能指标。mean_squared_error计算平均平方误差,是预测值与真实值之差的平方和除以样本数。它是回归模型中比较常用的评价指标之一,用来衡量预测值和真实值之间的差距,数值越小说明模型的预测能力越好;mean_absolute_error计算平均绝对误差,是预测值与真实值之差的绝对值之和除以样本数。同样是回归模型中的评价指标之一,用来评估模型的平均误差大小,数值越小说明模型的预测能力越好。相比于平均平方误差,平均绝对误差对异常值更加稳健。