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

Function test_predict_class_raw

catboost/python-package/ut/medium/test.py:1176–1186  ·  view source on GitHub ↗
(task_type)

Source from the content-addressed store, hash-verified

1174
1175
1176def test_predict_class_raw(task_type):
1177 train_pool = Pool(TRAIN_FILE, column_description=CD_FILE)
1178 test_pool = Pool(TEST_FILE, column_description=CD_FILE)
1179 model = CatBoostClassifier(iterations=2, task_type=task_type, gpu_ram_part=TEST_GPU_RAM_PART, devices='0')
1180 model.fit(train_pool)
1181 preds_path = test_output_path(PREDS_TXT_PATH)
1182 with open(preds_path, 'w') as f:
1183 pprint.PrettyPrinter(stream=f).pprint(
1184 model.predict(test_pool)
1185 )
1186 return local_canonical_file(preds_path)
1187
1188
1189def test_raw_predict_equals_to_model_predict(task_type):

Callers

nothing calls this directly

Calls 7

fitMethod · 0.95
predictMethod · 0.95
PoolClass · 0.90
CatBoostClassifierClass · 0.90
test_output_pathFunction · 0.85
openFunction · 0.50
local_canonical_fileFunction · 0.50

Tested by

no test coverage detected