(niter, n=10)
| 374 | |
| 375 | @pytest.mark.parametrize('niter', [100, 500]) |
| 376 | def test_multiregression(niter, n=10): |
| 377 | xs = np.arange(n).reshape((-1, 1)).astype(np.float32) |
| 378 | ys = np.hstack([ |
| 379 | (xs > 0.5 * n), |
| 380 | (xs < 0.5 * n) |
| 381 | ]).astype(np.float32) |
| 382 | |
| 383 | model = CatBoostRegressor(loss_function='MultiRMSE', iterations=niter) |
| 384 | model.fit(xs, ys) |
| 385 | ys_pred = model.predict(xs) |
| 386 | model.score(xs, ys) |
| 387 | |
| 388 | preds_path = test_output_path(PREDS_TXT_PATH) |
| 389 | np.savetxt(preds_path, np.array(ys_pred), fmt='%.8f') |
| 390 | |
| 391 | assert ys_pred.shape == ys.shape |
| 392 | return local_canonical_file(preds_path) |
| 393 | |
| 394 | |
| 395 | @pytest.mark.parametrize('niter', [1, 100, 500]) |
nothing calls this directly
no test coverage detected