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

Method num_feature

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

Get number of features. Returns ------- num_feature : int The number of features.

(self)

Source from the content-addressed store, hash-verified

2559 return predictor
2560
2561 def num_feature(self):
2562 """Get number of features.
2563
2564 Returns
2565 -------
2566 num_feature : int
2567 The number of features.
2568 """
2569 out_num_feature = ctypes.c_int(0)
2570 _safe_call(_LIB.LGBM_BoosterGetNumFeature(
2571 self.handle,
2572 ctypes.byref(out_num_feature)))
2573 return out_num_feature.value
2574
2575 def feature_name(self):
2576 """Get names of features.

Callers 2

feature_nameMethod · 0.95
feature_importanceMethod · 0.95

Calls 1

_safe_callFunction · 0.85

Tested by

no test coverage detected