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

Method _predict

catboost/python-package/catboost/core.py:2922–2930  ·  view source on GitHub ↗
(self, data, prediction_type, ntree_start, ntree_end, thread_count, verbose, parent_method_name, task_type="CPU")

Source from the content-addressed store, hash-verified

2920 raise CatBoostError("Invalid value of prediction_type={}: must be {}.".format(prediction_type, ', '.join(valid_prediction_types)))
2921
2922 def _predict(self, data, prediction_type, ntree_start, ntree_end, thread_count, verbose, parent_method_name, task_type="CPU"):
2923 verbose = verbose or self.get_param('verbose')
2924 if verbose is None:
2925 verbose = False
2926 data, data_is_single_object = self._process_predict_input_data(data, parent_method_name, thread_count)
2927 self._validate_prediction_type(prediction_type)
2928
2929 predictions = self._base_predict(data, prediction_type, ntree_start, ntree_end, thread_count, verbose, task_type)
2930 return predictions[0] if data_is_single_object else predictions
2931
2932 def predict(self, data, prediction_type='RawFormulaVal', ntree_start=0, ntree_end=0, thread_count=-1, verbose=None, task_type="CPU"):
2933 """

Callers 8

predictMethod · 0.95
predictMethod · 0.80
predict_probaMethod · 0.80
predict_log_probaMethod · 0.80
scoreMethod · 0.80
predictMethod · 0.80
scoreMethod · 0.80
predictMethod · 0.80

Calls 4

get_paramMethod · 0.95
_base_predictMethod · 0.80

Tested by

no test coverage detected