Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when calculating the MSE and MAS between ols_forecast and true value. #116

Open
JieNi4 opened this issue Jul 25, 2024 · 4 comments
Open

Comments

@JieNi4
Copy link

JieNi4 commented Jul 25, 2024

Normalisation of the output of the Xreg model is used in timesfm.py if we use covariance_forecast. But the code only renormalise the output of timesfm with covariance. And the output of Xreg model is very small. So it's meaningless to compare with different models.

we should add this code 'xregs = _renormalize(xregs, per_instance_stats))' in timesfm.py file (about 745 raws).

@siriuz42
Copy link
Collaborator

The xreg output is mostly FYI. My intuition is that renormalizing xreg output makes little sense if we call TimesFM forecast first and use xreg to fit the residuals.

Do you have a specific usecase in mind?

@JieNi4
Copy link
Author

JieNi4 commented Jul 30, 2024

If we use xregmode = 'xreg + timesfm', then algorithm will first use xreg based on 'cov' predict the target y'. and then calculating the residuals between y' and the true label y : d. Then TimesFM will according to this delta predict the future residuals d' for the xreg model. Finally, Xreg will based on the new cov input predict the future target y''. The result finally is y_pred = y'' + d'. It's the basic function. In this method, it seems like xreg model will preform the more important role than timesfm model. And another question, shall we use other regression model like SVR, Boost ?

@siriuz42
Copy link
Collaborator

siriuz42 commented Aug 1, 2024

You understanding is correct. Other regression models also work and can be implemented in a similar fashion. Linear + ridge are provided here since they have closed form solutions which have relatively minimal (but still significant) impacts on the e2e inference latency.

@JieNi4
Copy link
Author

JieNi4 commented Aug 2, 2024

Thank you for your reply. It's a nice model. Hope a new version will be published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants