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

Function test_fit_from_file

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

Source from the content-addressed store, hash-verified

1417
1418
1419def test_fit_from_file(task_type):
1420 train_pool = Pool(TRAIN_FILE, column_description=CD_FILE)
1421 model = CatBoost({'iterations': 2, 'loss_function': 'RMSE', 'task_type': task_type, 'gpu_ram_part': TEST_GPU_RAM_PART, 'devices': '0'})
1422 model.fit(train_pool)
1423 predictions1 = model.predict(train_pool)
1424
1425 model.fit(TRAIN_FILE, column_description=CD_FILE)
1426 predictions2 = model.predict(train_pool)
1427 assert all(predictions1 == predictions2)
1428 assert 'train_finish_time' in model.get_metadata()
1429
1430
1431def test_fit_from_empty_features_data(task_type):

Callers

nothing calls this directly

Calls 6

fitMethod · 0.95
predictMethod · 0.95
PoolClass · 0.90
CatBoostClass · 0.90
get_metadataMethod · 0.80
allFunction · 0.50

Tested by

no test coverage detected