MCPcopy Create free account
hub / github.com/catboost/catboost / _check_label_empty

Method _check_label_empty

catboost/python-package/catboost/core.py:969–974  ·  view source on GitHub ↗

Check label is not empty.

(self, label)

Source from the content-addressed store, hash-verified

967 raise CatBoostError("Invalid label type={}: must be array like.".format(type(label)))
968
969 def _check_label_empty(self, label):
970 """
971 Check label is not empty.
972 """
973 if len(label) == 0:
974 raise CatBoostError("Labels variable is empty.")
975
976 def _check_label_shape(self, label, samples_count):
977 """

Callers 1

_initMethod · 0.95

Calls 2

lenFunction · 0.85
CatBoostErrorClass · 0.50

Tested by

no test coverage detected