You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've running some models with TSMixer. However, these models were univariate forecasting.
Right now, I want to apply the forecast_with_covariates. Unfortunately, this function is giving to me many mistakes. I've been trying to access to the documentation and the helper docs in python, but this is not as helpful as I want.
To be specific, I have a dataframe with my target variable and a covariate variable. This dataframe has three items to forecast, so I created a nested list. In each sublist, I have 5 values for each item. While for the covariate, I have 6 values for each sublist. I want to forecast, one point ahead. I understood, that I need to pass these additional point in the covariate list. So I have something like this.
@siriuz42 I don't understand why, but now the model was able to run. I mean, I changed from "timesfm + xreg" into "x_reg + timesfm". Can you explain this to me, please?
Hey,
I've running some models with TSMixer. However, these models were univariate forecasting.
Right now, I want to apply the forecast_with_covariates. Unfortunately, this function is giving to me many mistakes. I've been trying to access to the documentation and the helper docs in python, but this is not as helpful as I want.
To be specific, I have a dataframe with my target variable and a covariate variable. This dataframe has three items to forecast, so I created a nested list. In each sublist, I have 5 values for each item. While for the covariate, I have 6 values for each sublist. I want to forecast, one point ahead. I understood, that I need to pass these additional point in the covariate list. So I have something like this.
`
inputs = [[1, 2, 3, 4, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5]]
exog = [[11, 12, 13, 14, 15, 16], [11, 12, 13, 14, 15, 16],[11, 12, 13, 14, 15, 16]]
model = timesfm.Timesfm(
hparams=timesfm.TimesFmHparams(
backend="cpu",
per_core_batch_size=32,
horizon_len=1
),
checkpoint=timesfm.TimesFmCheckpoint(
hugginface_repo_id="google/timesfm-1.0-200m-pytorch")
)
forecast, _ = model.forecast_with_covariates(
inputs = inputs,
dynamic_numerical_covariates={"exog": exog},
freq=[0]*len(inputs[0]),
xreg_mode="timesfm + xreg",
ridge=0.0,
force_on_cpu=False,
normalize_xreg_target_per_input=True,
)
`
My mistake says:
ValueError: operands could not be broadcast together with shapes (5,) (0,)
Does anyone can explain to me how to use this option of the model? Also, what does it really mean the freq argument?
The text was updated successfully, but these errors were encountered: