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

feat: _calculate_sigma() explicitly handles series with 1 data point (n=0) #699

Merged
merged 2 commits into from
Nov 14, 2023

Conversation

cparmet
Copy link
Contributor

@cparmet cparmet commented Nov 14, 2023

Addresses #698

An internal warning was raised if a Naive() model is fit to a series with only 1 data point. That's because calculating sigma involves a divide by zero. This PR handles that scenario with the method suggested by @jmoralez.

Note: The CONTRIBUTING.md guide refers to ./action-files/lint. I don't see this file in main. Did I miss it or is there another way to perform the desired linting used by statsforecast?

@CLAassistant
Copy link

CLAassistant commented Nov 14, 2023

CLA assistant check
All committers have signed the CLA.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jmoralez jmoralez linked an issue Nov 14, 2023 that may be closed by this pull request
@jmoralez jmoralez added the fix label Nov 14, 2023
Copy link
Member

@jmoralez jmoralez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jmoralez jmoralez merged commit 18f2acd into Nixtla:main Nov 14, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Utils] _calculate_sigma has warning if series has 1 data point
3 participants