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

Method get_test_eval

catboost/python-package/catboost/core.py:1830–1840  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1828 self._object._set_test_evals(test_evals)
1829
1830 def get_test_eval(self):
1831 test_evals = self._object._get_test_evals()
1832 if len(test_evals) == 0:
1833 if self.is_fitted():
1834 raise CatBoostError('The model has been trained without an eval set.')
1835 else:
1836 raise CatBoostError('You should train the model first.')
1837 if len(test_evals) > 1:
1838 raise CatBoostError("With multiple eval sets use 'get_test_evals()'")
1839 test_eval = test_evals[0]
1840 return test_eval[0] if len(test_eval) == 1 else test_eval
1841
1842 def get_test_evals(self):
1843 test_evals = self._object._get_test_evals()

Calls 3

is_fittedMethod · 0.95
lenFunction · 0.85
CatBoostErrorClass · 0.50

Tested by 1