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

[SILENT BUG] Fitted values not requested when needed #69

Closed
AzulGarza opened this issue Oct 5, 2022 · 1 comment
Closed

[SILENT BUG] Fitted values not requested when needed #69

AzulGarza opened this issue Oct 5, 2022 · 1 comment

Comments

@AzulGarza
Copy link
Member

Some methods and functionality (bootstrapped prediction intervals) need the fitted values of the models. But the following iteration omits to request them.

if model_name in Y_df:
y_hat_insample = Y_df.pivot(columns='ds', values=model_name).loc[uids].values
y_hat_insample = y_hat_insample.astype(np.float32)
if has_fitted:
common_vals['y_hat_insample'] = y_hat_insample
if bootstrap and has_level:
common_vals['bootstrap_samples'] = _bootstrap_samples(
y_insample=common_vals['y_insample'],
y_hat_insample=y_hat_insample,
y_hat=y_hat_model,
n_samples=1_000
)
common_vals['bootstrap'] = bootstrap
common_vals['level'] = level
else:
# some methods have the residuals argument
# but they don't need them
# ej MinTrace(method='ols')
common_vals['y_hat_insample'] = None

The above leads to unintelligible bugs.

@cchallu cchallu removed the bug label Jun 6, 2023
@elephaint
Copy link
Contributor

I think this has already been addressed here

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

4 participants