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

Function test_no_cat_in_predict

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

Source from the content-addressed store, hash-verified

1873
1874
1875def test_no_cat_in_predict(task_type):
1876 train_pool = Pool(TRAIN_FILE, column_description=CD_FILE)
1877 model = CatBoostClassifier(iterations=2, learning_rate=0.03, task_type=task_type, gpu_ram_part=TEST_GPU_RAM_PART, devices='0')
1878 model.fit(train_pool)
1879
1880 test_features_data, _ = load_simple_dataset_as_lists(is_test=True)
1881 pred1 = model.predict(test_features_data)
1882 pred2 = model.predict(Pool(test_features_data, cat_features=CAT_FEATURES))
1883 assert np.all(pred1 == pred2)
1884
1885
1886def test_save_model(task_type):

Callers

nothing calls this directly

Calls 6

fitMethod · 0.95
predictMethod · 0.95
PoolClass · 0.90
CatBoostClassifierClass · 0.90
allMethod · 0.45

Tested by

no test coverage detected