You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

回归模型双变量交互评估:PartialDependenceDisplay等值线全为0问题

问题

训练回归模型后,尝试评估两个变量间的双向交互作用,使用sklearn的PartialDependenceDisplay.from_estimator绘制偏依赖图时,发现图中所有等值线的数值均为0。已确认模型加载、数据读取无异常,且更换其他变量组合后仍出现相同问题。

代码示例
from sklearn.inspection import partial_dependence, PartialDependenceDisplay
model = load_model(model_path)
model_features = model.feature_name_

fig, ax = plt.subplots(figsize=(10,5))
X = training_data[model_features]
PartialDependenceDisplay.from_estimator(model, X, features=[('temperature',  'speed')], ax=ax, n_jobs=-1, grid_resolution=20)
对应可视化图

等值线全为0的偏依赖交互图

内容的提问来源于stack exchange,提问作者new world

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.18 13:57:02