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

Method num_data

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

Get the number of rows in the Dataset. Returns ------- number_of_rows : int The number of rows in the Dataset.

(self)

Source from the content-addressed store, hash-verified

1559 return self.group
1560
1561 def num_data(self):
1562 """Get the number of rows in the Dataset.
1563
1564 Returns
1565 -------
1566 number_of_rows : int
1567 The number of rows in the Dataset.
1568 """
1569 if self.handle is not None:
1570 ret = ctypes.c_int()
1571 _safe_call(_LIB.LGBM_DatasetGetNumData(self.handle,
1572 ctypes.byref(ret)))
1573 return ret.value
1574 else:
1575 raise LightGBMError("Cannot get num_data before construct dataset")
1576
1577 def num_feature(self):
1578 """Get the number of columns (features) in the Dataset.

Callers 3

__inner_predictMethod · 0.45
_make_n_foldsFunction · 0.45

Calls 2

_safe_callFunction · 0.85
LightGBMErrorClass · 0.85

Tested by

no test coverage detected