MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / attr

Method attr

python-package/lightgbmmt/basic.py:2786–2800  ·  view source on GitHub ↗

Get attribute string from the Booster. Parameters ---------- key : string The name of the attribute. Returns ------- value : string or None The attribute value. Returns None if attribute does not exist.

(self, key)

Source from the content-addressed store, hash-verified

2784 [name.startswith(('auc', 'ndcg@', 'map@')) for name in self.__name_inner_eval]
2785
2786 def attr(self, key):
2787 """Get attribute string from the Booster.
2788
2789 Parameters
2790 ----------
2791 key : string
2792 The name of the attribute.
2793
2794 Returns
2795 -------
2796 value : string or None
2797 The attribute value.
2798 Returns None if attribute does not exist.
2799 """
2800 return self.__attr.get(key, None)
2801
2802 def set_attr(self, **kwargs):
2803 """Set attributes to the Booster.

Callers 3

_to_graphvizFunction · 0.80
script.jsFile · 0.80
extra.jsFile · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected