From a22a5794865cd7dd9b8cf931b96aa1157c1fc95d Mon Sep 17 00:00:00 2001 From: Simon Alexander Wittner <108267997+SimonWittner@users.noreply.github.com> Date: Tue, 17 Oct 2023 15:09:45 -0700 Subject: [PATCH] [fix] Pytests Plots (#1445) * adjusted conformal prediction plot * removed unused line --------- Co-authored-by: Oskar Triebe --- tests/test_plotting.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/tests/test_plotting.py b/tests/test_plotting.py index 499c9e70e..7b5c4d9de 100644 --- a/tests/test_plotting.py +++ b/tests/test_plotting.py @@ -665,9 +665,7 @@ def test_plot_conformal_prediction(plotting_backend): alpha = 0.1 for method in ["naive", "cqr"]: # Naive and CQR SCP methods future = m.make_future_dataframe(test_df, periods=m.n_forecasts, n_historic_predictions=10) - forecast = m.conformal_predict( - future, calibration_df=cal_df, alpha=alpha, method=method, plotting_backend=plotting_backend - ) + forecast = m.conformal_predict(future, calibration_df=cal_df, alpha=alpha, method=method) m.highlight_nth_step_ahead_of_each_forecast(m.n_forecasts) fig0 = m.plot(forecast, plotting_backend=plotting_backend) fig1 = m.plot_components(forecast, plotting_backend=plotting_backend) @@ -691,9 +689,7 @@ def test_plot_conformal_prediction(plotting_backend): alpha = 0.1 for method in ["naive", "cqr"]: # Naive and CQR SCP methods future = m.make_future_dataframe(df, periods=m.n_forecasts, n_historic_predictions=10) - forecast = m.conformal_predict( - future, calibration_df=cal_df, alpha=alpha, method=method, plotting_backend=plotting_backend - ) + forecast = m.conformal_predict(future, calibration_df=cal_df, alpha=alpha, method=method) m.highlight_nth_step_ahead_of_each_forecast(m.n_forecasts) fig0 = m.plot(forecast) fig1 = m.plot_latest_forecast(forecast, include_previous_forecasts=10, plotting_backend=plotting_backend) @@ -728,7 +724,6 @@ def test_advanced_conformal_prediction_plots(): train_df, cal_df = m.split_df(train_df, freq="D", valid_p=0.15) m.fit(train_df, freq="D") alpha = 0.1 - plotting_backend = "plotly" for method in ["naive", "cqr"]: # Naive and CQR SCP methods future = m.make_future_dataframe(test_df, periods=m.n_forecasts, n_historic_predictions=10) forecast = m.conformal_predict( @@ -736,7 +731,6 @@ def test_advanced_conformal_prediction_plots(): calibration_df=cal_df, alpha=alpha, method=method, - plotting_backend=plotting_backend, show_all_PI=True, ) fig0 = m.conformal_plot(forecast) @@ -762,9 +756,7 @@ def test_plot_conformal_prediction_asymmetric(plotting_backend): alpha = (0.03, 0.07) method = "cqr" future = m.make_future_dataframe(test_df, periods=m.n_forecasts, n_historic_predictions=10) - forecast = m.conformal_predict( - future, calibration_df=cal_df, alpha=alpha, method=method, plotting_backend=plotting_backend - ) + forecast = m.conformal_predict(future, calibration_df=cal_df, alpha=alpha, method=method) m.highlight_nth_step_ahead_of_each_forecast(m.n_forecasts) fig0 = m.plot(forecast, plotting_backend=plotting_backend) fig1 = m.plot_components(forecast, plotting_backend=plotting_backend)