Spaces:
Running
Running
| # utils/plot.py | |
| import matplotlib.pyplot as plt | |
| def plot_forecast(y_true, y_pred, title="Forecast"): | |
| fig = plt.figure() | |
| plt.plot(y_true, label="Actual") | |
| plt.plot(y_pred, label="Forecast", linestyle="dashed") | |
| plt.title(title) | |
| plt.xlabel("Time Step") | |
| plt.ylabel("Value") | |
| plt.legend() | |
| return fig | |