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

Function test_predict_class

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

Source from the content-addressed store, hash-verified

1842
1843
1844def test_predict_class(task_type):
1845 train_pool = Pool(TRAIN_FILE, column_description=CD_FILE)
1846 test_pool = Pool(TEST_FILE, column_description=CD_FILE)
1847 model = CatBoostClassifier(iterations=2, learning_rate=0.03, task_type=task_type, gpu_ram_part=TEST_GPU_RAM_PART, devices='0')
1848 model.fit(train_pool)
1849 preds_path = test_output_path(PREDS_TXT_PATH)
1850 with open(preds_path, 'w') as f:
1851 pprint.PrettyPrinter(stream=f).pprint(
1852 model.predict(test_pool, prediction_type="Class")
1853 )
1854 return local_canonical_file(preds_path)
1855
1856
1857def test_zero_learning_rate(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