Skip to content

Commit a22a579

Browse files
[fix] Pytests Plots (#1445)
* adjusted conformal prediction plot * removed unused line --------- Co-authored-by: Oskar Triebe <ourownstory@users.noreply.github.com>
1 parent 583e15b commit a22a579

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

tests/test_plotting.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -665,9 +665,7 @@ def test_plot_conformal_prediction(plotting_backend):
665665
alpha = 0.1
666666
for method in ["naive", "cqr"]: # Naive and CQR SCP methods
667667
future = m.make_future_dataframe(test_df, periods=m.n_forecasts, n_historic_predictions=10)
668-
forecast = m.conformal_predict(
669-
future, calibration_df=cal_df, alpha=alpha, method=method, plotting_backend=plotting_backend
670-
)
668+
forecast = m.conformal_predict(future, calibration_df=cal_df, alpha=alpha, method=method)
671669
m.highlight_nth_step_ahead_of_each_forecast(m.n_forecasts)
672670
fig0 = m.plot(forecast, plotting_backend=plotting_backend)
673671
fig1 = m.plot_components(forecast, plotting_backend=plotting_backend)
@@ -691,9 +689,7 @@ def test_plot_conformal_prediction(plotting_backend):
691689
alpha = 0.1
692690
for method in ["naive", "cqr"]: # Naive and CQR SCP methods
693691
future = m.make_future_dataframe(df, periods=m.n_forecasts, n_historic_predictions=10)
694-
forecast = m.conformal_predict(
695-
future, calibration_df=cal_df, alpha=alpha, method=method, plotting_backend=plotting_backend
696-
)
692+
forecast = m.conformal_predict(future, calibration_df=cal_df, alpha=alpha, method=method)
697693
m.highlight_nth_step_ahead_of_each_forecast(m.n_forecasts)
698694
fig0 = m.plot(forecast)
699695
fig1 = m.plot_latest_forecast(forecast, include_previous_forecasts=10, plotting_backend=plotting_backend)
@@ -728,15 +724,13 @@ def test_advanced_conformal_prediction_plots():
728724
train_df, cal_df = m.split_df(train_df, freq="D", valid_p=0.15)
729725
m.fit(train_df, freq="D")
730726
alpha = 0.1
731-
plotting_backend = "plotly"
732727
for method in ["naive", "cqr"]: # Naive and CQR SCP methods
733728
future = m.make_future_dataframe(test_df, periods=m.n_forecasts, n_historic_predictions=10)
734729
forecast = m.conformal_predict(
735730
future,
736731
calibration_df=cal_df,
737732
alpha=alpha,
738733
method=method,
739-
plotting_backend=plotting_backend,
740734
show_all_PI=True,
741735
)
742736
fig0 = m.conformal_plot(forecast)
@@ -762,9 +756,7 @@ def test_plot_conformal_prediction_asymmetric(plotting_backend):
762756
alpha = (0.03, 0.07)
763757
method = "cqr"
764758
future = m.make_future_dataframe(test_df, periods=m.n_forecasts, n_historic_predictions=10)
765-
forecast = m.conformal_predict(
766-
future, calibration_df=cal_df, alpha=alpha, method=method, plotting_backend=plotting_backend
767-
)
759+
forecast = m.conformal_predict(future, calibration_df=cal_df, alpha=alpha, method=method)
768760
m.highlight_nth_step_ahead_of_each_forecast(m.n_forecasts)
769761
fig0 = m.plot(forecast, plotting_backend=plotting_backend)
770762
fig1 = m.plot_components(forecast, plotting_backend=plotting_backend)

0 commit comments

Comments
 (0)