(prediction_type)
| 2078 | |
| 2079 | @pytest.mark.parametrize('prediction_type', ['RawFormulaVal', 'Probability', 'Class']) |
| 2080 | def test_multilabel(prediction_type): |
| 2081 | pool = Pool(SCENE_TRAIN_FILE, column_description=SCENE_CD_FILE) |
| 2082 | classifier = CatBoostClassifier(iterations=2, loss_function='MultiLogloss', thread_count=8) |
| 2083 | classifier.fit(pool) |
| 2084 | output_model_path = test_output_path(OUTPUT_MODEL_PATH) |
| 2085 | classifier.save_model(output_model_path) |
| 2086 | new_classifier = CatBoostClassifier() |
| 2087 | new_classifier.load_model(output_model_path) |
| 2088 | pred = new_classifier.predict(pool, prediction_type=prediction_type) |
| 2089 | preds_path = test_output_path(PREDS_PATH) |
| 2090 | if prediction_type == 'Class': |
| 2091 | np.savetxt(preds_path, np.array(pred), fmt='%.0f') |
| 2092 | else: |
| 2093 | np.savetxt(preds_path, np.array(pred), fmt='%.8f') |
| 2094 | return local_canonical_file(preds_path) |
| 2095 | |
| 2096 | |
| 2097 | @pytest.mark.parametrize('target_count', [1, 2, 3]) |
nothing calls this directly
no test coverage detected