sklearn.utils.Bunch
-
sklearn.utils.Bunch(**kwargs)
[source] -
Container object exposing keys as attributes.
Bunch objects are sometimes used as an output for functions and methods. They extend dictionaries by enabling values to be accessed by key,
bunch["value_key"]
, or by an attribute,bunch.value_key
.Examples
>>> b = Bunch(a=1, b=2) >>> b['b'] 2 >>> b.b 2 >>> b.a = 3 >>> b['a'] 3 >>> b.c = 6 >>> b['c'] 6
Examples using sklearn.utils.Bunch
© 2007–2020 The scikit-learn developers
Licensed under the 3-clause BSD License.
https://scikit-learn.org/0.24/modules/generated/sklearn.utils.Bunch.html