8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Bunch
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is unfortunate but there is a clash between the values key and the values build-in method in the Bunch returned by partial_dependence.
values
partial_dependence
In [1]: X = [[0, 0, 2], [1, 0, 0]] ...: y = [0, 1] ...: from sklearn.inspection import partial_dependence ...: from sklearn.ensemble import GradientBoostingClassifier ...: gb = GradientBoostingClassifier(random_state=0).fit(X, y) ...: results = partial_dependence(gb, features=[0], X=X, percentiles=(0, 1), ...: grid_resolution=2, kind="average") In [1]: In [2]: results.values Out[2]: <function Bunch.values> In [3]: results.keys() Out[3]: dict_keys(['average', 'values'])
We cannot access the values with results.values
results.values
We might expect to access the values with results.values
System: python: 3.8.12 | packaged by conda-forge | (default, Sep 16 2021, 01:38:21) [Clang 11.1.0 ] executable: /Users/glemaitre/mambaforge/envs/dev/bin/python machine: macOS-12.0.1-arm64-arm-64bit Python dependencies: pip: 21.3 setuptools: 58.2.0 sklearn: 1.1.dev0 numpy: 1.21.2 scipy: 1.8.0.dev0+1902.b795164 Cython: 0.29.24 pandas: 1.3.3 matplotlib: 3.4.3 joblib: 1.0.1 threadpoolctl: 3.0.0 Built with OpenMP: True threadpoolctl info: user_api: blas internal_api: openblas prefix: libopenblas filepath: /Users/glemaitre/mambaforge/envs/dev/lib/libopenblas_vortexp-r0.3.18.dylib version: 0.3.18 threading_layer: openmp architecture: VORTEX num_threads: 8 user_api: openmp internal_api: openmp prefix: libomp filepath: /Users/glemaitre/mambaforge/envs/dev/lib/libomp.dylib version: None num_threads: 8
The text was updated successfully, but these errors were encountered:
I really think we should rename values here to something else.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
This is unfortunate but there is a clash between the
values
key and thevalues
build-in method in theBunch
returned bypartial_dependence
.Steps/Code to Reproduce
Expected Results
We cannot access the values with
results.values
Actual Results
We might expect to access the values with
results.values
Versions
The text was updated successfully, but these errors were encountered: