#2659·prophet

Unable to capture the fit for curve for sales data. Looking for specific reasons where Prophet fails

Author: nabeel-ioCreated Feb 12, 2025Updated Nov 28, 2025

This data contains a daily aggregation of multiple products for daily total sales (shown in red). Now I am intrigued since the prophet model cannot capture the fit. It does not seem so complicated but still I don't understand what I am doing wrong. BTW I am completely new to this model.

sales_ts
train = sales_ts.loc[:, ["ds","y"]][sales_ts["set_type"] == "train"]
test = sales_ts.loc[:, ["ds","y"]][sales_ts["set_type"] == "test"]
model = prophet.Prophet(interval_width=0.95, daily_seasonality=True)
model.fit(train)
future = model.make_future_dataframe(periods=154, freq="D")
forecast = model.predict(future)


fig, ax = plt.subplots(2, 1, figsize=(15, 6))
sns.lineplot(x=forecast["ds"], y=forecast["yhat"], label="pred",ax=ax[0])
sns.lineplot(x=train["ds"], y=train["y"], color="red",label="actual",ax=ax[0])
sns.lineplot(x=train["ds"], y=train["y"], color="red",label="actual",ax=ax[1])
plt.savefig('output.png')

Image