def test_create_report(mock_model, iteration_results, report): vol = BaseVolatilityEstimator(mock_model) vol.fitted = True vol.iterations_results = iteration_results vol._create_report() pd.testing.assert_frame_equal(vol.report, report, check_less_precise=3)
def test_get_samples_to_plot(mock_model, iteration_results, iterations_train, iterations_test, iterations_delta): vol = BaseVolatilityEstimator(mock_model) vol.fitted = True vol.iterations_results = iteration_results train, test, delta = vol._get_samples_to_plot(metric_name='roc_auc') pd.testing.assert_series_equal(train, iterations_train) pd.testing.assert_series_equal(test, iterations_test) pd.testing.assert_series_equal(delta, iterations_delta)