()
| 8013 | |
| 8014 | |
| 8015 | def test_prediction_plot(): |
| 8016 | preds_path = test_output_path('predictions.json') |
| 8017 | n_features = 3 |
| 8018 | n_samples = 500 |
| 8019 | np.random.seed(42) |
| 8020 | X = np.random.rand(n_samples, n_features) |
| 8021 | y = np.random.rand(n_samples) |
| 8022 | model = CatBoostRegressor(iterations=200) |
| 8023 | model.fit(X, y, silent=True) |
| 8024 | |
| 8025 | res, _ = model.plot_predictions(data=X[:2, ], features_to_change=[0, 1], plot=False) |
| 8026 | json.dump(res, open(preds_path, 'w')) |
| 8027 | return local_canonical_file(preds_path) |
| 8028 | |
| 8029 | |
| 8030 | def test_binclass_with_nontrivial_classes(): |
nothing calls this directly
no test coverage detected