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

Method _check_label_shape

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

Check label length and dimension.

(self, label, samples_count)

Source from the content-addressed store, hash-verified

974 raise CatBoostError("Labels variable is empty.")
975
976 def _check_label_shape(self, label, samples_count):
977 """
978 Check label length and dimension.
979 """
980 if len(label) != samples_count:
981 raise CatBoostError("Length of label={} and length of data={} is different.".format(len(label), samples_count))
982
983 def _check_baseline_type(self, baseline):
984 """

Callers 1

_initMethod · 0.95

Calls 3

lenFunction · 0.85
CatBoostErrorClass · 0.50
formatMethod · 0.45

Tested by

no test coverage detected