I want to use darts to model the predicted sales of our product. I am using the autoARIMA model.
After I have fitted a model I want to visually investigate how similar the model is to the known values. Is there anyway to make a prediction for all known values and put it on a graph?
At the moment I am graphing the next 8 predictions(blue line in graph below) but I would like it to graph what it would have guessed for the previous month if it didn't have that in the training data.
Another but less important question I have is, is there a way to predict 100 timesteps ahead without needing to explicitly specify the dates? If there isn't then is there a utility function to create the dates that would be valid for that time series?
import pandas as pd
from darts import TimeSeries
from darts.utils.missing_values import fill_missing_values
all_data = fill_missing_values(TimeSeries.from_csv("rows.csv", time_col="ds", freq="B"))
all_data.add_holidays("UK")
all_data["y"].plot()
from darts.models import AutoARIMA
model = AutoARIMA()
model.fit(series=all_data["y"], future_covariates=all_data["users_joined"])
results = pd.DataFrame(list(zip([10, 10, 10, 10, 10, 10, 10, 10], [pd.Timestamp("2022-09-16"), pd.Timestamp("2022-09-19"),
pd.Timestamp("2022-09-20"), pd.Timestamp("2022-09-21"),
pd.Timestamp("2022-09-22"),
pd.Timestamp("2022-09-23"),
pd.Timestamp("2022-09-26"),
pd.Timestamp("2022-09-27")])),
columns=["marketing_spend", "ds"])
model.predict(8,
future_covariates=all_data["marketing_spend"].concatenate(TimeSeries.from_dataframe(results, time_col="ds", freq="B"), axis = 0)).plot()
