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

interpret_model(tuned_best_5[0].steps[-1][1])In order to interpret my machine learning model, I am plan

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742345213a4426408.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信