# PDPbox
[![PyPI version](https://badge.fury.io/py/PDPbox.svg)](https://badge.fury.io/py/PDPbox)
[![Build Status](https://travis-ci.com/SauceCat/PDPbox.svg?branch=master)](https://travis-ci.com/SauceCat/PDPbox)
python partial dependence plot toolbox
## Update! ð¹
<img src="images/3_years_codes.gif" />
Update for versions:
```
xgboost==1.3.3
matplotlib==3.1.1
sklearn==0.23.1
```
## Motivation
This repository is inspired by ICEbox. The goal is to visualize the impact of certain features towards model
prediction for any supervised learning algorithm. (now support all scikit-learn algorithms)
## The common headache
When using black box machine learning algorithms like random forest and boosting, it is hard to understand the
relations between predictors and model outcome.
For example, in terms of random forest, all we get is the feature importance.
Although we can know which feature is significantly influencing the outcome based on the importance
calculation, it really sucks that we donât know in which direction it is influencing. And in most of the real cases,
the effect is non-monotonic.
We need some powerful tools to help understanding the complex relations
between predictors and model prediction.
## Highlight
1. Helper functions for visualizing target distribution as well as prediction distribution.
2. Proper way to handle one-hot encoding features.
3. Solution for handling complex mutual dependency among features.
4. Support multi-class classifier.
5. Support two variable interaction partial dependence plot.
## Documentation
- Latest version: http://pdpbox.readthedocs.io/en/latest/
- Historical versions:
- [v0.1.0](https://github.com/SauceCat/PDPbox/blob/master/docs_history/v0.1/docs.md)
## Tutorials
https://github.com/SauceCat/PDPbox/tree/master/tutorials
## Change Logs
https://github.com/SauceCat/PDPbox/blob/master/CHANGELOG.md
## Installation
- through pip (latest stable versionï¼ 0.2.1)
```
$ pip install pdpbox
```
- through git (latest develop version)
```
$ git clone https://github.com/SauceCat/PDPbox.git
$ cd PDPbox
$ python setup.py install
```
## Testing
PDPbox can be tested using `tox`.
- First install `tox` and `tox-venv`
```
$ pip install tox tox-venv
```
- Call `tox` inside the pdpbox clone directory. This will run tests with python3.7.
- To test the documentation, call `tox -e docs`.
The documentation should open up in your browser if it is successfully build.
Otherwise, the problem with the documentation will be reported in the output of the command.
## Gallery
- **PDP:** PDP for a single feature
<img src='https://github.com/SauceCat/PDPbox/blob/master/images/pdp_plot.png' width=90%>
- **PDP:** PDP for a multi-class
<img src='https://github.com/SauceCat/PDPbox/blob/master/images/pdp_plot_multiclass.png' width=90%>
- **PDP Interact:** PDP Interact for two features with contour plot
<img src='https://github.com/SauceCat/PDPbox/blob/master/images/pdp_interact_contour.png' width=60%>
- **PDP Interact:** PDP Interact for two features with grid plot
<img src='https://github.com/SauceCat/PDPbox/blob/master/images/pdp_interact_grid.png' width=60%>
- **PDP Interact:** PDP Interact for multi-class
<img src='https://github.com/SauceCat/PDPbox/blob/master/images/pdp_interact_multiclass.png' width=90%>
- **Information plot:** target plot for a single feature
<img src='https://github.com/SauceCat/PDPbox/blob/master/images/target_plot.png' width=90%>
- **Information plot:** target interact plot for two features
<img src='https://github.com/SauceCat/PDPbox/blob/master/images/target_plot_interact.png' width=90%>
- **Information plot:** actual prediction plot for a single feature
<img src='https://github.com/SauceCat/PDPbox/blob/master/images/actual_plot.png' width=90%>
没有合适的资源?快使用搜索试试~ 我知道了~
PDPbox:python部分依赖图工具箱
共87个文件
py:29个
rst:13个
png:9个
需积分: 50 17 下载量 55 浏览量
2021-05-05
17:48:55
上传
评论 3
收藏 49.15MB ZIP 举报
温馨提示
PDP盒 python部分依赖图工具箱 更新! :cat_with_tears_of_joy: 版本更新: xgboost==1.3.3 matplotlib==3.1.1 sklearn==0.23.1 动机 该存储库受ICEbox启发。 目的是可视化某些功能对任何监督学习算法的模型预测的影响。 (现在支持所有scikit-learn算法) 常见头痛 当使用黑盒机器学习算法(如随机森林和增强算法)时,很难理解预测变量与模型结果之间的关系。 例如,就随机森林而言,我们所获得的只是功能的重要性。 尽管根据重要性计算可以知道哪个功能对结果产生了显着影响,但确实令人遗憾的是,我们不知道它在哪个方向上产生影响。 在大多数实际情况下,效果是非单调的。 我们需要一些强大的工具来帮助理解预测变量和模型预测之间的复杂关系。 强调 辅助功能用于可视化目标分布以及预测分布。 处理一键编码功能的正确方法。 解决功能之间复杂的相互依赖性的解
资源详情
资源评论
资源推荐
收起资源包目录
PDPbox-master.zip (87个子文件)
PDPbox-master
docs_history
v0.1
docs.md 6KB
.flake8 158B
.gitignore 1KB
setup.cfg 200B
README.md 4KB
CHANGELOG.md 5KB
tests
conftest.py 3KB
test_pdp_interact.py 12KB
test_pdp_calc_utils.py 11KB
test.py 69B
test_pdp_isolate.py 11KB
test_utils.py 18KB
test_target_plot_binary.py 5KB
test_target_plot_interact_binary.py 9KB
test_pdp_interact_display.py 12KB
displays
pdp_interact_binary.ipynb 485KB
pdp_isolate_regression.ipynb 1.65MB
pdp_interact_binary.py 3KB
pdp_isolate_regression.py 2KB
pdp_interact_multiclass.ipynb 1.79MB
pdp_interact_regression.ipynb 409KB
pdp_isolate_binary.py 6KB
pdp_isolate_multiclass.py 1KB
pdp_isolate_binary.ipynb 2.86MB
pdp_interact_regression.py 2KB
pdp_isolate_multiclass.ipynb 729KB
pdp_interact_multiclass.py 2KB
test_pdp_isolate_display.py 17KB
docs
pdp_interact.rst 91B
make.bat 810B
pdp_plot.rst 79B
conf.py 5KB
actual_plot.rst 109B
PDPInteract.rst 99B
index.rst 2KB
pdp_interact_plot.rst 106B
papers.rst 3KB
api.rst 330B
target_plot.rst 110B
target_plot_interact.rst 136B
requirements.txt 32B
plots
target_plot_renew.py 380B
pdp_isolate.rst 88B
actual_plot_interact.rst 137B
Makefile 603B
PDPIsolate.rst 96B
.gitattributes 32B
.coveragerc 119B
readthedocs.yml 115B
pdpbox
info_plots.py 26KB
pdp_plot_utils.py 21KB
info_plot_utils.py 35KB
datasets
ross
ross_info.json 376B
ross_data.csv 93.21MB
ross_model.pkl 30.32MB
titanic
titanic_model.pkl 223KB
titanic_data.csv 62KB
titanic_info.json 216B
otto
otto_model.pkl 77.08MB
otto_info.json 2KB
otto_data.csv 12.92MB
pdp_calc_utils.py 6KB
utils.py 14KB
_version.py 18KB
get_dataset.py 1KB
__init__.py 93B
pdp.py 33KB
requirements.txt 26B
images
pdp_interact_grid.png 78KB
actual_plot.png 53KB
pdp_interact_contour.png 81KB
target_plot.png 55KB
target_plot_interact.png 71KB
pdp_interact_multiclass.png 135KB
3_years_codes.gif 4.57MB
actual_plot_interact.png 36KB
pdp_plot_multiclass.png 161KB
pdp_plot.png 223KB
LICENSE.txt 1KB
MANIFEST.in 49B
tutorials
pdpbox_binary_classification.ipynb 1.58MB
pdpbox_multiclass_classification.ipynb 1.81MB
pdpbox_regression.ipynb 1.95MB
setup.py 656B
.travis.yml 594B
tox.ini 1003B
versioneer.py 67KB
共 87 条
- 1
马克维
- 粉丝: 26
- 资源: 4644
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0