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

Function test_predict_class_proba

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

Source from the content-addressed store, hash-verified

1862
1863
1864def test_predict_class_proba(task_type):
1865 train_pool = Pool(TRAIN_FILE, column_description=CD_FILE)
1866 test_pool = Pool(TEST_FILE, column_description=CD_FILE)
1867 model = CatBoostClassifier(iterations=2, learning_rate=0.03, task_type=task_type, gpu_ram_part=TEST_GPU_RAM_PART, devices='0')
1868 model.fit(train_pool)
1869 pred = model.predict_proba(test_pool)
1870 preds_path = test_output_path(PREDS_PATH)
1871 np.save(preds_path, np.array(pred))
1872 return local_canonical_file(preds_path)
1873
1874
1875def test_no_cat_in_predict(task_type):

Callers

nothing calls this directly

Calls 8

fitMethod · 0.95
predict_probaMethod · 0.95
PoolClass · 0.90
CatBoostClassifierClass · 0.90
test_output_pathFunction · 0.85
local_canonical_fileFunction · 0.50
saveMethod · 0.45
arrayMethod · 0.45

Tested by

no test coverage detected