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

Function test_copy_model

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

Source from the content-addressed store, hash-verified

3449
3450
3451def test_copy_model():
3452 pool = Pool(TRAIN_FILE, column_description=CD_FILE)
3453 model1 = CatBoostRegressor(iterations=5)
3454 model1.fit(pool)
3455 model2 = model1.copy()
3456 predictions1 = model1.predict(pool)
3457 predictions2 = model2.predict(pool)
3458 assert _check_data(predictions1, predictions2)
3459 output_model_path = test_output_path(OUTPUT_MODEL_PATH)
3460 model2.save_model(output_model_path)
3461 return compare_canonical_models(output_model_path)
3462
3463
3464def test_cv(task_type):

Callers

nothing calls this directly

Calls 10

fitMethod · 0.95
predictMethod · 0.95
PoolClass · 0.90
CatBoostRegressorClass · 0.90
test_output_pathFunction · 0.85
compare_canonical_modelsFunction · 0.85
save_modelMethod · 0.80
_check_dataFunction · 0.70
copyMethod · 0.45
predictMethod · 0.45

Tested by

no test coverage detected