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

Function test_ones_weight

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

Source from the content-addressed store, hash-verified

2290
2291
2292def test_ones_weight(task_type):
2293 pool = Pool(TRAIN_FILE, column_description=CD_FILE)
2294 weight = np.ones(pool.num_row())
2295 pool.set_weight(weight)
2296 model = CatBoostClassifier(iterations=2, learning_rate=0.03, task_type=task_type, gpu_ram_part=TEST_GPU_RAM_PART, devices='0')
2297 model.fit(pool)
2298 output_model_path = test_output_path(OUTPUT_MODEL_PATH)
2299 model.save_model(output_model_path)
2300 return compare_canonical_models(output_model_path)
2301
2302
2303def test_non_ones_weight(task_type):

Callers

nothing calls this directly

Calls 7

set_weightMethod · 0.95
fitMethod · 0.95
PoolClass · 0.90
CatBoostClassifierClass · 0.90
test_output_pathFunction · 0.85
compare_canonical_modelsFunction · 0.85
save_modelMethod · 0.80

Tested by

no test coverage detected