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

Fixed Pytest warnings for machine_learning/forecasting #8958

Merged
merged 3 commits into from
Aug 14, 2023

Conversation

p1utoze
Copy link
Contributor

@p1utoze p1utoze commented Aug 14, 2023

Describe your change:

Fixes [#7305] [#8780]
The numpy Runtime warning was due to the 0 in seasonal_order tuple and regarding the ARIMA models. For estimation, it needs more observations to work well and the User Warning are raised because of the sample test >>> sarimax_predictor([4,2,6,8], [3,1,2,4], [2]) used by doctests.

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms include at least one URL that points to Wikipedia or another similar explanation.
  • If this pull request resolves one or more open issues then the description above includes the issue number(s) with a closing keyword: "Fixes #ISSUE-NUMBER".

Copy link
Contributor

@tianyizheng02 tianyizheng02 left a comment

Choose a reason for hiding this comment

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

LGTM! The build logs no longer show the Pytest warnings, which is nice. However, this PR doesn't completely fix #8780 as there are some deeper issues that still need to be addressed: where the code actually comes from, the use of existing ML models, and whether this code actually qualifies as an "algorithm". With that said, the more immediate issues seem to have been fixed, which is good.

@tianyizheng02
Copy link
Contributor

@CaedenPH, thoughts?

@tianyizheng02 tianyizheng02 linked an issue Aug 14, 2023 that may be closed by this pull request
Copy link
Contributor

@CaedenPH CaedenPH left a comment

Choose a reason for hiding this comment

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

@tianyizheng02
I would be inclined to merge this pull request but also have discussions on #8780 with what to do with this file and potentially rework later.
Therefore, I think it should close my issue (#7305) but not #8780

@tianyizheng02 tianyizheng02 merged commit ac68dc1 into TheAlgorithms:master Aug 14, 2023
3 checks passed
@tianyizheng02
Copy link
Contributor

@p1utoze Thanks for your contributions!

@p1utoze
Copy link
Contributor Author

p1utoze commented Aug 14, 2023

@tianyizheng02 I agree. I looked into that aspect as well that the algorithms mentioned clearly don't explain about the forecasting. Well, fixing the existing errors was much needed I felt and glad to contribute.

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

Successfully merging this pull request may close these issues.

[PYTEST WARNING] Machine learning forecasting
3 participants