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

Function test_cv

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

Source from the content-addressed store, hash-verified

3462
3463
3464def test_cv(task_type):
3465 pool = Pool(TRAIN_FILE, column_description=CD_FILE)
3466 train_dir_prefix = test_output_path('')
3467 results = cv(
3468 pool,
3469 {
3470 "iterations": 20,
3471 "learning_rate": 0.03,
3472 "loss_function": "Logloss",
3473 "eval_metric": "AUC",
3474 "task_type": task_type,
3475 "gpu_ram_part": TEST_GPU_RAM_PART,
3476 "train_dir": os.path.join(train_dir_prefix, 'catboost_info'),
3477 },
3478 )
3479 assert "train-Logloss-mean" in results
3480
3481 prev_value = results["train-Logloss-mean"][0]
3482 for value in results["train-Logloss-mean"][1:]:
3483 assert value < prev_value
3484 prev_value = value
3485 return local_canonical_file(remove_time_from_json(os.path.join(train_dir_prefix, JSON_LOG_CV_PATH(0))))
3486
3487
3488@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 7

PoolClass · 0.90
cvFunction · 0.90
test_output_pathFunction · 0.85
remove_time_from_jsonFunction · 0.85
JSON_LOG_CV_PATHFunction · 0.85
local_canonical_fileFunction · 0.50
joinMethod · 0.45

Tested by

no test coverage detected