sklearn.ensemble.partial_dependence.partial_dependence(gbrt, target_variables, grid=None, X=None, percentiles=(0.05, 0.95), grid_resolution=100)
[source]
Partial dependence of target_variables
.
Partial dependence plots show the dependence between the joint values of the target_variables
and the function represented by the gbrt
.
Read more in the User Guide.
Parameters: |
|
---|---|
Returns: |
|
>>> samples = [[0, 0, 2], [1, 0, 0]] >>> labels = [0, 1] >>> from sklearn.ensemble import GradientBoostingClassifier >>> gb = GradientBoostingClassifier(random_state=0).fit(samples, labels) >>> kwargs = dict(X=samples, percentiles=(0, 1), grid_resolution=2) >>> partial_dependence(gb, [0], **kwargs) (array([[-4.52..., 4.52...]]), [array([ 0., 1.])])
sklearn.ensemble.partial_dependence.partial_dependence
© 2007–2018 The scikit-learn developers
Licensed under the 3-clause BSD License.
http://scikit-learn.org/stable/modules/generated/sklearn.ensemble.partial_dependence.partial_dependence.html