最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

jupyter notebook - How to change the labels on the y-axis of PyCaret's SHAP plot? - Stack Overflow

programmeradmin1浏览0评论
interpret_model(tuned_best_5[0].steps[-1][1])

In order to interpret my machine learning model, I am planning to use PyCaret's functions: interpret_model. However, since my columns in my dataset are encoded such as ID, Q1, Q2, Q3, Q4, etc, where ID: Username, Q1: Age, Q2: Salary (Spouse), Q3: Salary (Personal), Q4: Budget.

However, since I want to allow my users to understand what each code represents, I want to modify the output (y-axis) on the SHAP plot, but I am unable to do so.

Anyone able to help me with this? I believe I need to pass some arguments through **kwargs, but I'm unsure how to do so.

Sample Output

I tried to do the following previously:

ax = plt.gca()
ax.set_yticklabels([feature_mapping.get(tick.get_text(), tick.get_text()) for tick in ax.get_yticklabels()])
plt.show()

but since the output of interpret_model is None, I don't think my code will work at all.

发布评论

评论列表(0)

  1. 暂无评论