scikit-learn/scikit-learn — pull request #1287 by pprett (2012-10-28 18:46:41+00:00)
Title: WIP Gbrt partial dependency plots

This PR provides functionality to interpret GBRT models via partial dependency plots [1]. Partial dependency plots summarize the marginal effect of certain features on the target response.

Below are some example PDPs for the california housing dataset (response is median house price); the example is taken from ELSII Section 10.14.1:

![1-way pdp](https://lh3.googleusercontent.com/-NuzNLaYWB2U/UI11gKCQKzI/AAAAAAAACBk/j99CnUPa_iU/s1105/gbrt-pdp-1.png)

![2-way pdp](https://lh5.googleusercontent.com/-GAp9lOMe0uA/UI11iTczkQI/AAAAAAAACBs/xs4qO4L3gMo/s1105/gbrt-pdp-2.png)

The functionality is exposed via the function ``gradient_boosting.partial_dependency``; it is designed for both convenience and flexibility. E.g. one can either pass a grid of data points on which the partial dependency function will be evaluated or one can simply pass the training data and the function will automatically generate a reasonable data grid.

Evaluating the partial dependency function on a single tree is implemented in cython - this routine can be used to generate similar plots for single decision trees or Random Forest.

The PR includes:

- ``partial_dependency`` functionality
- dataset loader for california housing dataset (from StatLib)
- Full example taken from ELSII 10.14.1