当前位置:首页>python>期刊图片复现|Python分类任务分析全流程深度解析-混淆矩阵、SHAP特征重要性总览图、交互作用强度气泡图、单特征依赖图、双特征交互效应图

期刊图片复现|Python分类任务分析全流程深度解析-混淆矩阵、SHAP特征重要性总览图、交互作用强度气泡图、单特征依赖图、双特征交互效应图

  • 2026-08-18 23:11:27
期刊图片复现|Python分类任务分析全流程深度解析-混淆矩阵、SHAP特征重要性总览图、交互作用强度气泡图、单特征依赖图、双特征交互效应图

代码绘制成果展示

论文:Divergent responses of canopy structure and productivity to drought and  their driving mechanisms in northern Chinas grasslands

本套代码构建了一个从数据提取、模型调优到可解释性分析及分析出图的完整机器学习分析流程。首先读取数据集,划分训练集与测试集,通过网格搜索结合交叉验证自动探寻最佳超参数,从而构建出具备极强非线性捕捉能力的XGBoost分类模型;在完成初步的预测评估并绘制包含ROC曲线、混淆矩阵及多指标对比柱状图的综合性能面板后,切入核心的SHAP归因分析环节。分析利用TreeSHAP算法高效计算全局样本的主效应与交互SHAP值,绘制出融合宏观特征重要性与数据分布的组合图,以及直观揭示驱动因子间两两协同互作强度的气泡热力图;在单因素依赖图与双特征交互图中,内嵌了基于Bootstrap自举重采样的LOWESS非参数局部加权平滑算法,为散点趋势附上了严谨的95%置信区间,还能够自动探测并高亮标注出环境驱动因子作用于模型输出时触发阈值(由负转正)的交叉点。在多维特征交互时,该流程还能敏锐捕捉到次级因子状态改变所引发的共阈值突变现象,同时整套流程搭载了60种经典配色的定制颜色库,可实现出版级科研图表的批量输出。

结果图

代码解释

第一部分

库的导入以及字体设置
# =========================================================================================# ====================================== 1. 环境设置 =======================================# =========================================================================================import pandas as pdimport numpy as npimport matplotlib.pyplot as pltimport osfrom statsmodels.nonparametric.smoothers_lowess import lowess

第二部分

设置颜色库
# =========================================================================================# ======================================2.颜色库=======================================# =========================================================================================COLOR_SCHEMES = {    0: {'train''blue''test''red''hist''#4B0082''shap_scatter''#00008B''lowess''#9400D3',        'ci''#D3D3D3''inter_low''blue''inter_low_fit''darkblue''inter_high''red',        'inter_high_fit''darkred''cmap': ["blue""#4B0082""red"]},}

第三部分

拟合线和置信区间计算函数:为散点图生成LOWESS拟合曲线及其置信区间。通过有放回地抽取数据子集,对每一个子集进行LOWESS平滑拟合,并统一映射到一个标准的X轴上。然后计算原始数据的中心拟合线以及95%置信区间上下界。
# =========================================================================================# ======================================5.拟合线和置信区间计算函数=======================================# =========================================================================================# 使用LOWESS拟合数据,通过Bootstrap生成大量拟合线,从而计算出95%的置信区间def bootstrap_lowess_ci(x, y, n_boot=200, frac=0.5, ci_level=0.95):    sorted_indices_orig = np.argsort(x)  # 获取原始x数据升序排列的索引    x_sorted_orig, y_sorted_orig = x.iloc[sorted_indices_orig].values, y[sorted_indices_orig]  # 对原始x和y数据进行排序    main_smoothed = lowess(y_sorted_orig, x_sorted_orig, frac=frac)  # LOWESS平滑    lower_bound = np.quantile(boot_lines_arr, alpha, axis=0)  # 置信下界    upper_bound = np.quantile(boot_lines_arr, 1 - alpha, axis=0)  # 置信上界    return main_smoothed, (x_range, lower_bound, upper_bound)  # 拟合曲线、x范围、置信上下界

第四部分

阈值点寻找函数:在SHAP依赖图中寻找特征对模型预测从负面影响(SHAP < 0)转向正面影响(SHAP > 0)的零界点或阈值。
# =========================================================================================# ======================================6.阈值点寻找函数=======================================# =========================================================================================# 寻找曲线穿过y=0的所有交点/X坐标。通过检测y值正负号的变化,利用两点线性插值法精确计算出过零点的x坐标def find_roots(x_curve, y_curve):    roots = []  # 存放根/零点的列表    sign_changes = np.where(np.diff(np.sign(y_curve)))[0]  # 计算y值的符号差,找出正负号发生变化的相邻点索引    x_root = x1 - y1 * (x2 - x1) / (y2 - y1)  # 计算出零点x坐标    roots.append(x_root)  # 保存    return roots  # 返回所有找到的零点列表

第五部分

阈值点绘制以及标注函数:找到交点阈值后在X坐标处绘制一条垂直虚线。同时循环检查新标签位置是否与已存在的标签重叠。如果有重叠,就将标签自动下移,直至找到空位。最后在这个位置绘制带有背景框的文本。
# =========================================================================================# ======================================7.阈值点绘制以及标注函数=======================================# =========================================================================================# 算出零点,还在图表上画出垂直虚线,标上数值标签def find_and_plot_crossings(ax, x_curve, y_curve, color, x_range):        ax.text(x_root,  # x                y_pos,  # y                f' {x_root:.2f} ',  # 文本                color='white',  # 颜色                backgroundcolor=color,  # 颜色                ha='center',  # 水平                va='top',  # 垂直                fontsize=18,  # 字体大小                fontweight='bold',  # 加粗                bbox=dict(facecolor=color, edgecolor='none', pad=1),  # 文本框                transform=ax.get_xaxis_transform())  # 设置坐标变换        drawn_texts.append((x_root, y_pos))  # 保存

第六部分

分类评估图绘制函数:包括ROC曲线、混淆矩阵、性能指标柱状图 (Accuracy、Precision、Recall 和 F1-Score)。
# =========================================================================================# ==============================8.分类评估图=======================================# =========================================================================================def plot_classification_results(metrics, colors, output_folder, n_classes):    y_train_true, y_train_prob = metrics['train']['true'], metrics['train']['prob']  #训练集真实标签和预测概率    y_test_true, y_test_prob = metrics['test']['true'], metrics['test']['prob']  #测试集真实标签和预测概率    ax_roc.plot([01], [01], 'k--', lw=2, label='Random Chance')  #绘制参考对角线    ax_roc.set_xlabel('False Positive Rate', fontsize=18)  #x轴标题    ax_roc.set_ylabel('True Positive Rate', fontsize=18)  #y轴标题    ax_roc.set_title('ROC Curve', fontsize=22)  #主标题    ax_roc.legend(loc='lower right', fontsize=14)  #图例    ax_roc.grid(True)  #网格线    apply_plot_styles(ax_roc)  #坐标轴边框设置    save_fig_dual(fig_roc, output_folder, 'classification_roc_curve')  #保存    ax_cm.set_xlabel('Predicted Label', fontsize=18)  #x轴标题    ax_cm.set_ylabel('True Label', fontsize=18)  #y轴标题    ax_cm.set_title('Confusion Matrix (Validation)', fontsize=22)  #主标题    ax_bar.legend(fontsize=14, loc='lower right')  # 图例    ax_bar.grid(axis='y', linestyle='--', alpha=0.7)  #网格线    apply_plot_styles(ax_bar)  #坐标轴设置    save_fig_dual(fig_bar, output_folder, 'classification_metrics_bar')  #保存    plt.close(fig_bar)  #关闭

第七部分

特征重要性条形图与SHAP蜂巢图组合图绘制函数:特征重要性条形图与SHAP蜂巢图,图表自上而下按照特征对模型全局重要性的大小进行了降序排列,水平条形图对应上方的坐标轴,代表各特征的平均绝对SHAP值,即宏观上的全局重要性大小;而表层的蜂群散点图对应下方的坐标轴,展示了每个数据样本在特定特征下的具体SHAP值分布情况,散点的颜色反映了该特征本身数值的高低,从而清晰地揭示了某个特征的高值或低值是如何微观且具体地对模型预测结果产生正向或负向驱动影响的。
# =========================================================================================# ======================================9.特征重要性条形图与SHAP蜂巢图组合图绘制函数=======================================# =========================================================================================def plot_shap_summary(shap_values, X_test, feature_names, shap_df, base_values, colors, output_folder):    # 创建画布    fig = plt.figure(figsize=(1010), dpi=300)    ax_sw = fig.add_axes([0.320.110.590.77])  # 定义主坐标轴在画布上的相对位置及大小    ax_bar = ax_sw.twiny()  # 创建共享Y轴    apply_plot_styles(ax_sw)  # 调整边框和刻度粗细    apply_plot_styles(ax_bar)  # 调整边框和刻度粗细    colorbar_ax = fig.axes[-1]  # 获取颜色条轴    colorbar_ax.tick_params(labelsize=16)  # 刻度设置    colorbar_ax.set_ylabel("", labelpad=0)  # 去掉原始标题    # 保存    save_fig_dual(fig, output_folder, 'combined_shap_summary_plot')    plt.close(fig)  # 关闭

第八部分

特征交互强度气泡热力图绘制函数:特征交互强度的气泡热力图,横纵坐标为影响预测目标的各个驱动因子,右上三角矩阵展示了任意两个特征之间的平均SHAP交互效应绝对值,图中气泡的大小和颜色深浅共同映射了交互作用的强度,气泡尺寸越大且颜色越偏向红色代表两个特征间的协同交互作用越强烈,偏向蓝色或气泡极小则代表交互作用微弱,而对角线位置的自交互项被强制设为零,旨在直观且突出地反映不同特征两两之间对模型预测结果影响。
# =========================================================================================# ======================================10.特征交互强度气泡热力图绘制函数=======================================# =========================================================================================def plot_bubble_heatmap(shap_interaction, feature_names, colors, output_folder):    n_features = len(feature_names)  # 获取特征总数    inter_matrix = np.zeros((n_features, n_features))  # 用于存储两两交互强度    # y轴标题    ax.set_ylabel("Trigger thresholds\nDriving factors",  # 文本                  fontsize=18,  # 字体大小                  fontweight='bold',  # 加粗                  labelpad=-2)  # 间距    # 子图编号    ax.text(0.08,  # x            0.84,  # y            '(a)',  # 编号            transform=ax.transAxes,  # 坐标系            fontsize=28,  # 字体大小            fontweight='bold')  # 加粗    cax = ax.inset_axes([0.050.050.030.35])  # 创建颜色条轴    cbar.ax.set_yticklabels([f'{v:.3f}' for v in cbar_ticks], fontsize=14, fontweight='bold')    y_positions = [0.40.2830.1660.05]  # 气泡图例位置    save_fig_dual(fig, output_folder, 'shap_interaction_bubble_heatmap_diag_zero')  # 保存    plt.close(fig)  # 关闭

第九部分

SHAP单因素依赖图绘制函数:排名前9位重要特征的SHAP单因素依赖图网格,每个子图均采用了双Y轴设计,其中背景柱状图对应左侧的Distribution轴,反映了该特征在样本数据中的频数分布状态;蓝色的散点和紫色的LOWESS平滑拟合曲线(带有灰色的95%置信区间阴影)对应右侧的SHAP value轴,展示了特征取值变化对其自身SHAP值(即对预测结果的独立贡献)的非线性影响趋势;图中的水平黑色虚线代表SHAP作用为0的基准线,而垂直的黑色虚线及其上方黑底白字的数值标签则精准标注了拟合曲线跨越零点时的特征阈值,即该特征作用由负面彻底转为正面的临界转折点。
# =========================================================================================# ======================================11.SHAP单因素依赖图绘制函数=======================================# =========================================================================================def plot_dependence(X_test, shap_values, feature_names, colors, save_folder):    n_features = min(9len(feature_names))  # 只选择前9个最重要特征进行绘制    # 创建画布    fig, axes = plt.subplots(33, figsize=(1512))    axes = axes.flatten()  # 展平为一维数组,便于按顺序循环遍历调用    labels = [chr(97 + i) for i in range(n_features)]  # 生成子图编号        ax1.set_ylim(0, counts.max() * 1.1)  # 左侧y轴范围        # 绘制散点        ax2.scatter(x_values,  # x                    shap_vals,  # y                    alpha=0.7,  # 透明度                    s=25,  # 散点大小                    color=colors['shap_scatter'],  # 颜色                    label='Sample',  # 图例标签                    zorder=2)                  find_and_plot_crossings(ax2, main_fit[:, 0], main_fit[:, 1], 'black', x_range)  # 寻找阈值并绘制        ax1.set_xlabel(f'{feature_name}', fontsize=18)  # x轴标题        h1, l1 = ax1.get_legend_handles_labels()  # 提取直方图的图例句柄和标签        h2, l2 = ax2.get_legend_handles_labels()  # 提取散点、拟合线图例句柄和标签        # 添加图例

第十部分

特征交互效应依赖图绘制函数:交互强度排名前9位的双特征交互效应依赖图网格,每个子图同样采用双Y轴设计,浅灰色的背景柱状图显示主特征的数据分布频数,而双色散点图则展示了这两个特征的互作效应对模型SHAP值的具体影响;图中的散点颜色由右侧独立颜色条代表的次要特征数值大小所映射,图中的深红和深蓝两条拟合曲线及其对应的浅色置信区间,分别代表了次要特征处于高值组(大于中位数)和低值组(小于等于中位数)两个条件下的主特征SHAP影响趋势,垂直黑色虚线及紫底白字的数值标签则高亮标注了这两条高低分组曲线在横轴上共同穿过零点附近的交互突变阈值,深刻揭示了次要特征状态的改变是如何扭转或放大主特征对模型预测贡献的。
# =========================================================================================# ======================================12.特征交互效应依赖图绘制函数=======================================# =========================================================================================def plot_interaction(X_test, shap_interaction, feature_names, colors, save_folder):                    color='black',  # 颜色                    linestyle='--',  # 样式                    lw=2,  # 粗细                    zorder=0)  # 层        y_lim = max(np.abs(shap_vals).max() * 1.10.1)  # 右侧最大值        ax2.set_ylim(-y_lim, y_lim)  # 右侧y轴范围        # 颜色条轴        cax_auto = ax2.inset_axes([1.240.00.041.0])        # 创建颜色条        cbar = fig.colorbar(points, cax=cax_auto)        # 标题        cbar.set_label(s_name, size=18, labelpad=5)        # 刻度设置        cbar.ax.tick_params(labelsize=18)        cbar.ax.tick_params(axis='y', width=2, length=4, direction='in')        # 控制颜色条自身的外边框线宽        for spine in cbar.ax.spines.values():            spine.set_linewidth(1.5)        ax2.legend(h2 + h1, l2 + l1, loc='lower right', fontsize=13)    plt.tight_layout()  # 调整布局    save_fig_dual(fig, save_folder, 'interaction_top9_grid')  # 保存    plt.close(fig)  # 关闭

第十一部分

执行部分:从指定路径加载数据。以7:3的比例切分训练集和测试集。初始化XGBoost模型,定义了树的数量、深度和学习率等核心超参数。使用带交叉验证(CV=3)的网格搜索求解最佳模型参数,并对得到的最佳模型记录训练集和测试集的性能指标。调用 shap.Explainer 结合树模型的高效TreeSHAP算法,计算测试集全部样本的特征主效应SHAP值以及二阶交互作用。计算SHAP绝对均值并按重要性从大到小对特征名称、数据矩阵、SHAP矩阵和交互矩阵进行重排序,调用上面的函数分析绘图。
# =========================================================================================# ======================================13.执行部分 =======================================# =========================================================================================if __name__ == '__main__':    output_folder = r'F:\公众号素材\20260728shap重要性+依赖图+交互效应图-分类任务'  # 结果输出路径    test_size = 0.3  # 测试集比例    random_state = 0  # 随机种子    os.makedirs(output_folder, exist_ok=True)  # 是否存在,若无则自动创建一个新文件夹    # 划分数据    X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=test_size, random_state=random_state)    # 超参数    param_grid = {'n_estimators': [50100200],                  'max_depth': [235],                  'learning_rate': [0.050.1]}    # 实例化XGBoost分类模型    xgb_model = xgb.XGBClassifier(random_state=random_state)    # 配置网格搜索    grid_search = GridSearchCV(estimator=xgb_model, param_grid=param_grid, scoring='f1_macro', cv=3, n_jobs=-1)    print("\n正在计算SHAP 值")                                                                               ascending=False)  #特征重要性表并降序排列        sorted_features = shap_df["feature"].values.tolist()  #提取排好序的特征名列表        sorted_indices = [feature_names.index(f) for f in sorted_features]  #获取重排后的特征原索引        X_test_sorted = X_test[sorted_features]  #依重要性重排测试集特征        shap_values_sorted = shap_values[:, sorted_indices]  #依重要性重排SHAP值        shap_interaction_sorted = shap_interaction[:, sorted_indices][:, :, sorted_indices]  #依重要性重排交互值

如何应用到你自己的数据

1.设置文件夹地址,执行部分:

output_folder = r'分类任务'

2.设置测试集比例,执行部分:

test_size = 0.3  # 测试集比例

3.设置随机种子,执行部分:

random_state = 0  # 随机种子

4.设置目标变量,执行部分:

target_column_name = 'Vegetation_Anomaly'  # 目标变量名

5.设置超参数网格,执行部分:

param_grid = {'n_estimators': [50, 100, 200],              'max_depth': [2, 3, 5],              'learning_rate': [0.05, 0.1]}

6.设置要解释的类别,执行部分:

EXPLAIN_CLASSES = 'all'

7.设置是否进行批量绘图,执行部分:

plot_all = True

推荐

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

获取方式

公众号中的所有所有的免费代码都已经下架了,都并入到付费部分里了,付费合集代码和数据的购买通道已经开通,全部合集150元,无后续收费,目前包含270+篇代码+数据+参考论文,后续将会持续更新,决定购买请后台私信我,注意只会分享练习数据、参考论文和代码文件,仅提供有关代码的答疑,不会提供其他答疑服务,代码文件中已经包含了每行代码的完整注释,购买前请确保真的需要!!!

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-08-22 02:34:28 HTTP/2.0 GET : https://f.mffb.com.cn/a/507521.html
  2. 运行时间 : 0.596959s [ 吞吐率:1.68req/s ] 内存消耗:4,850.75kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=9047f52d7ef59c01bbea43b5e5fe4adc
  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.001118s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001364s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.016052s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000757s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001379s ]
  6. SELECT * FROM `set` [ RunTime:0.000561s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001721s ]
  8. SELECT * FROM `article` WHERE `id` = 507521 LIMIT 1 [ RunTime:0.014739s ]
  9. UPDATE `article` SET `lasttime` = 1787337268 WHERE `id` = 507521 [ RunTime:0.025545s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.006175s ]
  11. SELECT * FROM `article` WHERE `id` < 507521 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.030148s ]
  12. SELECT * FROM `article` WHERE `id` > 507521 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.098762s ]
  13. SELECT * FROM `article` WHERE `id` < 507521 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.128008s ]
  14. SELECT * FROM `article` WHERE `id` < 507521 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.026383s ]
  15. SELECT * FROM `article` WHERE `id` < 507521 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.025504s ]
0.600618s