当前位置:首页>python>Python绘制回归拟合图+边际直方图+残差图组合图

Python绘制回归拟合图+边际直方图+残差图组合图

  • 2026-08-18 23:11:46
Python绘制回归拟合图+边际直方图+残差图组合图

代码绘制成果展示

这张组合图展示了六种不同机器学习模型在回归预测任务中的训练评估结果,通过散点回归图、边际分布图和残差图三个维度深度解析了模型的性能。主散点图直观反映了预测值与真实值的拟合程度,其中随机森林和决策树的散点紧密围绕参考线分布,展现出极高的拟合精度;每个子图的顶部和右侧分别有渐变色的边际直方图及核密度估计曲线,清晰地展示了特征数据的分布特性与集中趋势。底部的残差图则进一步量化了预测误差,通过散点在零刻度线附近的上下波动范围,揭示了各模型在不同取值区间的稳定性。同时标注了 R2、RMSE、MAE 等关键统计指标。
多种配色方案
多种标记方案

代码解释

第一部分

库的导入以及字体设置
import numpy as npimport pandas as pdimport matplotlib.pyplot as pltimport matplotlib.gridspec as gridspecimport osimport joblibfrom PIL import Imagefrom scipy.stats import gaussian_kdefrom sklearn.model_selection import train_test_split, GridSearchCVKFoldfrom sklearn.ensemble import RandomForestRegressorGradientBoostingRegressorfrom sklearn.linear_model import Ridge

第二部分

颜色库的设置,设计了20种配色
COLOR_SCHEMES = {    1: ['RdYlBu_r''Blues''Reds''#40E0D0'],}

第三部分

形状标记库的设置,用于设置散点的形状
MARKER_LIB = {    1'o',}

第四部分

渐变直方图绘制函数,用于绘制边缘柱状图
# =========================================================================================# ======================================4.绘制渐变直方图的函数=======================================# =========================================================================================def draw_gradient_hist(ax, data, bins=30, orientation='vertical', cmap_name='Blues'):    n, bins_edges = np.histogram(data, bins=bins, density=True)  #对数据进行直方图统计并计算概率密度    cm = plt.get_cmap(cmap_name)  #获取颜色映射对象    for i in range(len(n)):  #遍历每一个柱子        if n[i] > 0#如果该柱子的高度大于0则进行绘制            left, right = bins_edges[i], bins_edges[i + 1]  #获取当前柱子的左右边界坐标            if orientation == 'vertical':  #如果是垂直                grad = np.linspace(0.20.8100).reshape(1001)  #创建渐变数组                #边框                rect = plt.Rectangle((left, 0),  #左下角起点坐标                                     right - left,  #矩形的宽度                                     n[i],  # 设置矩形的高度                                     edgecolor='black',  #矩形边框颜色                                     fill=False,  #不填充颜色                                     linewidth=0.8,  #边框线条的宽度                                     zorder=2)            else:  # 如果是水平                grad = np.linspace(0.20.8100).reshape(1100#创建渐变数组                ax.imshow(grad,                          extent=[0, n[i], left, right],                          aspect='auto',                          cmap=cm,                          origin='lower',                          zorder=1)                rect = plt.Rectangle((0, left),                                     n[i],                                     right - left,                                     edgecolor='black',                                     fill=False,                                     linewidth=0.8,                                     zorder=2)            ax.add_patch(rect)  # 边框添加到指定的坐标轴中

第五部分

主图绘制函数,包括回归拟合散点图、下面的残差图、上侧和右侧的分布直方图
# =========================================================================================# ======================================6.主图绘制函数=======================================# =========================================================================================def plot_academic_evaluation(y_true, y_pred, label_id, model_real_name, save_path_base, color_list, marker_cfg):    main_cmap = color_list[0]  #主图的散点颜色映射    marg_x_cmap = color_list[1]  #横向边际直方图的颜色映射    marg_y_cmap = color_list[2]  #纵向边际直方图的颜色映射    line_color = color_list[3]  #参考线的颜色    fig = plt.figure(figsize=(89), dpi=100)  #初始化画布    gs_outer = gridspec.GridSpec(21, height_ratios=[61], hspace=0.04#定义外部布局上下两部分,主图与残差图    gs_inner = gridspec.GridSpecFromSubplotSpec(2,  #2行                                                2,  #2列                                                subplot_spec=gs_outer[0],  #放置在外部网格的第一行区域内                                                width_ratios=[71],  #左侧主图与右侧边际图                                                height_ratios=[17],  #上方边际图与下方主图                                                wspace=0,  #子图之间的水平间距                                                hspace=0)  #子图之间的垂直间距    ax_marg_x = fig.add_subplot(gs_inner[00])  #创建顶部的横向边际分布图    ax_joint = fig.add_subplot(gs_inner[10])  #创建中央的散点回归图    ax_marg_y = fig.add_subplot(gs_inner[11], sharey=ax_joint)  #创建右侧的纵向边际分布图,并共享Y轴    ax_resid = fig.add_subplot(gs_outer[10])  #创建底部的残差分布图    fig.canvas.draw()  #执行初步渲染以确定各组件的几何位置    pos_joint = ax_joint.get_position()  # 获取散点回归图实际坐标    pos_resid = ax_resid.get_position()  # 获取残差图在画布上的实际坐标    ax_resid.set_position([pos_joint.x0, pos_resid.y0, pos_joint.width, pos_resid.height])  #调整残差图宽度使其与上方主图对齐    error = y_true - y_pred  #计算真实值与预测值之间的残差    r2 = r2_score(y_true, y_pred)  # 计算R1    rmse = np.sqrt(mean_squared_error(y_true, y_pred))  # 计算RMSE    mae = mean_absolute_error(y_true, y_pred)  # 计算MAE    n_samples = len(y_true)  #样本总数    #散点图绘制    ax_joint.scatter(y_pred,  #X轴                     y_true,  #Y轴                     c=y_true,  #散点的映射颜色随真实值的数值变化                     cmap=main_cmap,  #颜色映射方案                     marker=marker_cfg,  #散点的形状样式                     edgecolor='black',  #外边框线                     linewidth=0.5,  #外边框的线条粗细                     s=40,  #散点的大小                     alpha=1,  #透明度                     zorder=10)    #绘制参考线    ax_joint.plot([0, max_val],  #起止点的横坐标                  [0, max_val],  #起止点的纵坐标                  color=line_color,  #参考线的颜色                  linestyle='--',  #线型                  linewidth=1.5,  #线条粗细                  zorder=5)    #去掉x轴数值标注    ax_joint.tick_params(labelbottom=False, labelleft=True)    #添加文本标注    ax_joint.text(0.050.93f'Model: {model_real_name}', transform=ax_joint.transAxes, fontweight='bold', fontsize=18#模型名称    ax_joint.text(0.050.86f'$R^2$={r2:.4f}', transform=ax_joint.transAxes, fontsize=18#R2    ax_joint.text(0.050.79f'RMSE={rmse:.4f} MPa', transform=ax_joint.transAxes, fontsize=18#RMSE    ax_joint.text(0.050.72f'MAE={mae:.4f} MPa', transform=ax_joint.transAxes, fontsize=18#MAE    ax_joint.text(0.050.65f'N={n_samples}', transform=ax_joint.transAxes, fontsize=18#样本数量    #纵轴标题    ax_joint.set_ylabel(f'$p_{{{label_id}}}$ Actual Value (MPa)', fontsize=24)    #子图编号    ax_joint.text(-0.151.1f'{chr(96 + int(label_id))}', transform=ax_joint.transAxes, fontsize=28, fontweight='bold')    #用于绘制核密度估计曲线    xx = np.linspace(0, max_val, 200)    # 在顶部图绘制KDE概率密度曲线    ax_marg_x.plot(xx,  #以生成的连续数值作为横坐标                   gaussian_kde(y_true)(xx),  #使用高斯核密度估计函数计算 y_true 数据在对应点的概率密度值作为纵坐标                   color='#E67E22',  #曲线颜色                   linewidth=1.2,  #线条宽度                   zorder=5)    # 在右侧图绘制KDE概率密度曲线    ax_marg_y.plot(gaussian_kde(y_true)(xx),                   xx,                   color='#1ABC9C',                   linewidth=1.2,                   zorder=5)    ax_marg_x.set_xlim(0, max_val) #顶部图的X轴范围    ax_marg_y.set_ylim(0, max_val) #右侧图的Y轴范围    #y=0 的基准线    ax_resid.axhline(0, color='black', linestyle='--', linewidth=1, zorder=5)    ax_resid.set_xlim(0, max_val) #残差图的X轴范围    fig.canvas.draw() # 再次执行渲染以确定刻度位置    yticks = ax_resid.get_yticks() #获取残差图当前的Y轴刻度值    for y_t in yticks: # 遍历刻度值        if y_t != 0# 排除0刻度线            # 绘制淡灰色的残差参考网格线            ax_resid.axhline(y_t,  #纵坐标值                             color='gray',  #线条颜色                             linestyle='--',  #线型                             linewidth=0.8,  #宽度                             alpha=0.3,  #透明度                             zorder=1)

第六部分

模型训练与超参数调优函数,注意使用的时候要注意修改这里的超参数以及交叉验证。
# =========================================================================================# ======================================6.模型训练与调优函数=======================================# =========================================================================================def train_best_models(X_train, y_train):    #模型列表及超参数搜索空间    model_configs = [        ("1", Ridge(), {'alpha': [0.11.010.0]}),        ("2", SVR(),         {'C': [110100],         'gamma': ['scale']}),        ("3", RandomForestRegressor(random_state=42),         {'n_estimators': [100200]}),        ("4", GradientBoostingRegressor(random_state=42),         {'learning_rate': [0.010.1],          'n_estimators': [100]}),        ("5", KNeighborsRegressor(),         {'n_neighbors': [357]}),        ("6", DecisionTreeRegressor(random_state=42),         {'max_depth': [510None]})    ]    best_models = {} #用于存储训练好的最佳模型    cv = KFold(n_splits=3, shuffle=True, random_state=42)  #交叉验证方案    # 遍历模型配置    for name, model, params in model_configs:        print(f"正在调优模型 p_{name} ({model.__class__.__name__})")        #初始化网格搜索        grid = GridSearchCV(model, params, cv=cv, scoring='r2', n_jobs=-1)        #执行搜索        grid.fit(X_train, y_train)        #保存最佳模型        best_models[name] = (grid.best_estimator_, model.__class__.__name__)    return best_models

第七部分

子图的拼接函数,用于生成最后的组合图
# =========================================================================================# ======================================7.图片拼接函数=======================================# =========================================================================================def stitch_images_grid(image_paths, n_cols, output_filename_base, save_dir):    if not image_paths: return # 如果路径列表为空则直接返回    images = [Image.open(path) for path in image_paths] #打开路径列表中的所有图片文件    img_width, img_height = images[0].size #获取第一张图片的宽度和高度作为标准尺寸    n_rows = (len(images) + n_cols - 1) // n_cols  #根据总图数和列数计算所需的行数    composite_image = Image.new('RGB', (n_cols * img_width, n_rows * img_height), color='white')  #创建一个白色底图    for i, img in enumerate(images): #遍历所有读取的图片        row, col = i // n_cols, i % n_cols #计算当前图片在大图中的行列索引        composite_image.paste(img, (col * img_width, row * img_height))  #将当前图片粘贴到指定位置        img.close()    composite_image.save(fr"{output_filename_base}.png")    composite_image.save(fr"{output_filename_base}.pdf")

第八部分

执行部分,主要的修改部分就集中在这里,包括数据的读取,颜色方案、标记方案的选择,数据集的划分,标准化处理,模型的训练与验证,绘图
# =========================================================================================# ======================================8.执行部分=======================================# =========================================================================================if __name__ == "__main__":    scheme_index  = 1  #颜色方案    MARKER_index = 5  #标记方案    #获取当前选定的配色和标记    current_color_list = COLOR_SCHEMES.get(scheme_index, COLOR_SCHEMES[1])    current_marker = MARKER_LIB.get(MARKER_index, 'o')    save_dir=r"1221" # 设置主结果保存目录    df = pd.read_excel(r"data.xlsx" )  #读取数据    X = df.iloc[:, :-1].values  #特征    y = df.iloc[:, -1].values  #目标    model_save_dir = r"Models" #模型存储路径    result_save_dir = r"Results_Excel" #预测结果存储路径    #划分训练集和测试集    X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)    #标准化处理    scaler = StandardScaler()    X_train_scaled = scaler.fit_transform(X_train)    X_test_scaled = scaler.transform(X_test)    #调用函数开始模型训练和调优    trained_models = train_best_models(X_train_scaled, y_train)    train_paths, test_paths = [], [] #用于记录图片路径    #遍历每个训练好的模型,执行预测、保存模型、保存结果、绘图    for name, (model, m_type) in trained_models.items():        model_filename = f"model_p{name}_{m_type}.pkl" #模型保存的文件名        #保存模型        joblib.dump(model, os.path.join(model_save_dir, model_filename))        #使用训练好的模型对测试集进行预测        y_test_pred = model.predict(X_test_scaled)        test_error = y_test - y_test_pred #残差        #构建测试集预测结果的DataFrame        df_test_res = pd.DataFrame({            'Actual': y_test, #真值            'Predicted': y_test_pred, #预测值            'Error': test_error #误差        })        #保存        df_test_res.to_excel(os.path.join(result_save_dir, f"test_results_p{name}.xlsx"), index=False)        #测试集图保存的基本路径        p_test = os.path.join(save_dir, f"test_p{name}_{scheme_index}_{MARKER_index}")        #调用绘图函数        plot_academic_evaluation(y_test, y_test_pred, name, m_type, p_test, current_color_list, current_marker)        test_paths.append(p_test + ".png"#记录图片路径        #对训练集进行预测        y_train_pred = model.predict(X_train_scaled)        train_error = y_train - y_train_pred #误差        #训练集结果        df_train_res = pd.DataFrame({            'Actual': y_train,            'Predicted': y_train_pred,            'Error': train_error        })        #保存        df_train_res.to_excel(os.path.join(result_save_dir, f"train_results_p{name}.xlsx"), index=False)        #训练集图保存路径        p_train = os.path.join(save_dir, f"train_p{name}_{scheme_index}_{MARKER_index}")        #调用绘图函数        plot_academic_evaluation(y_train, y_train_pred, name, m_type, p_train, current_color_list, current_marker)        train_paths.append(p_train + ".png"#记录路径    #组合图拼接    stitch_images_grid(test_paths,                       n_cols=3,                       output_filename_base=f"Final_Validation_Combined_{scheme_index}_{MARKER_index}",                       save_dir=save_dir)    stitch_images_grid(train_paths,                       n_cols=3,                       output_filename_base=f"Final_Training_Combined_{scheme_index}_{MARKER_index}",                       save_dir=save_dir)

如何应用到你自己的数据

1.选择你想要使用到的配色方案:

scheme_index  = 1  #颜色方案

2.选择你想要使用到的形状标记方案:

MARKER_index = 9  #标记方案

3.绘图结果的保存路径:

save_dir=r"" #绘图结果保存

4.读取原始数据:

df = pd.read_excel(r"data.xlsx" )  #读取数据

5.划分特征数据以及目标数据:

X = df.iloc[:, :-1].values  #特征y = df.iloc[:, -1].values  #目标

6.定义模型的保存路径以及预测结果的保存路径:

model_save_dir = r"Models" #模型存储路径result_save_dir = r"Results_Excel" #预测结果存储路径

7.定义训练数据、验证数据的划分比例:

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)

推荐

期刊图片复现|Python绘制二维偏依赖PDP图
期刊复现|python绘制基于SHAP分析和GAM模型拟合的单特征依赖图
期刊图片复现|python绘制带有渐变颜色shap特征重要性组合图(条形图+蜂巢图)
期刊复现|用Python绘制SHAP特征重要性总览图、依赖图、双特征交互效应SHAP图,解锁XGBoost模型的终极奥秘
期刊图片复现|Python绘制shap重要性蜂巢图+单特征依赖图+交互效应强度气泡图+交互效应依赖图(回归+二分类+分类)

获取方式

需要的后台私信我,注意只会分享练习数据和代码文件,不会提供答疑服务,代码文件中已经包含了每行代码的完整注释!!!

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-08-21 22:50:52 HTTP/2.0 GET : https://f.mffb.com.cn/a/509141.html
  2. 运行时间 : 0.297497s [ 吞吐率:3.36req/s ] 内存消耗:4,936.17kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=fe81411eeb33497cfbe2c0464db2ad28
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.001276s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001752s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000747s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000855s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001474s ]
  6. SELECT * FROM `set` [ RunTime:0.000639s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001655s ]
  8. SELECT * FROM `article` WHERE `id` = 509141 LIMIT 1 [ RunTime:0.001471s ]
  9. UPDATE `article` SET `lasttime` = 1787323853 WHERE `id` = 509141 [ RunTime:0.063411s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000779s ]
  11. SELECT * FROM `article` WHERE `id` < 509141 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001366s ]
  12. SELECT * FROM `article` WHERE `id` > 509141 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.001076s ]
  13. SELECT * FROM `article` WHERE `id` < 509141 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.015330s ]
  14. SELECT * FROM `article` WHERE `id` < 509141 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.018927s ]
  15. SELECT * FROM `article` WHERE `id` < 509141 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.021107s ]
0.301306s