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

Adds support for mlforecast in the forecasting operator #753

Merged
merged 12 commits into from
May 3, 2024

Conversation

codeloop
Copy link
Member

@codeloop codeloop commented Apr 5, 2024

Add support for mlforecast in the forecasting operator

  • Feature for modelling using recursive and per step model for forecast horizon
  • Add arguments for the data preprocessing and feature engineering
  • Add the report for model with historical fitted values
  • Add the third party library license information
  • Migrate from datapane to report_creator

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Apr 5, 2024
@codeloop codeloop changed the title Add support for mlforecast in the forecasting operator [WIP] Add support for mlforecast in the forecasting operator Apr 5, 2024
@codeloop codeloop added the draft label Apr 5, 2024
Copy link

github-actions bot commented Apr 5, 2024

📌 Cov diff with main:

Coverage-0%

📌 Overall coverage:

Coverage-59.67%

mrDzurb
mrDzurb previously approved these changes Apr 8, 2024
@@ -8,6 +8,7 @@ dependencies:
- oracle-ads>=2.9.0
- prophet
- neuralprophet
- mlforecast
Copy link
Member

Choose a reason for hiding this comment

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

Do we need BA for this?

Copy link
Member Author

@codeloop codeloop Apr 21, 2024

Choose a reason for hiding this comment

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

Applied for LT & BA, awaiting legal review to complete.

@@ -158,6 +159,15 @@ def get_all_data_long(self, include_horizon=True):
on=[self._datetime_column_name, ForecastOutputColumns.SERIES],
).reset_index()

def get_all_data_long_test(self):
Copy link
Member

Choose a reason for hiding this comment

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

What's the meaning of "test" here?

Copy link
Member Author

@codeloop codeloop Apr 21, 2024

Choose a reason for hiding this comment

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

Referring to just the forecast horizon part here, updated the function signature to a better name. Thanks!

@codeloop codeloop changed the title [WIP] Add support for mlforecast in the forecasting operator Adds support for mlforecast in the forecasting operator Apr 21, 2024
@darenr
Copy link
Member

darenr commented Apr 21, 2024

What additional features does the mlforecast library add to the operator? Is there a benchmark where this shows improvement over prophet - I'm just curious what the rationale was for adding this. Not saying it's not a good idea, just curious what the reasons are?

@codeloop
Copy link
Member Author

What additional features does the mlforecast library add to the operator? Is there a benchmark where this shows improvement over prophet - I'm just curious what the rationale was for adding this. Not saying it's not a good idea, just curious what the reasons are?

Yes, we do have time and metric benchmark for mlforecast against prophet, it offers an improvement over it in both the measures,
lgbm with MLForecast has a speedup of 20.95 compared with prophet

We can see that lgbm with MLForecast was able to provide metrics at least twice as good as Prophet as seen in the column improvement above, and way faster.
more detailed analysis for a commonly benchmarked electricity load forecasting dataset @ https://nixtlaverse.nixtla.io/mlforecast/docs/tutorials/electricity_load_forecasting.html#comparison-with-prophet.
We want to add a boosting-based forecasting model, mlforecast offers this along with support for feature engineering and scalability options.

Copy link

⚠️ This PR changed pyproject.toml file. ⚠️

  • PR Creator must update 📃 THIRD_PARTY_LICENSES.txt, if any 📚 library added/removed in pyproject.toml.
  • PR Approver must confirm 📃 THIRD_PARTY_LICENSES.txt updated, if any 📚 library added/removed in pyproject.toml.

Copy link

📌 Cov diff with main:

Coverage-0%

📌 Overall coverage:

Coverage-61.46%

Copy link

⚠️ This PR changed pyproject.toml file. ⚠️

  • PR Creator must update 📃 THIRD_PARTY_LICENSES.txt, if any 📚 library added/removed in pyproject.toml.
  • PR Approver must confirm 📃 THIRD_PARTY_LICENSES.txt updated, if any 📚 library added/removed in pyproject.toml.

Copy link

📌 Cov diff with main:

Coverage-0%

📌 Overall coverage:

Coverage-61.46%

Copy link

⚠️ This PR changed pyproject.toml file. ⚠️

  • PR Creator must update 📃 THIRD_PARTY_LICENSES.txt, if any 📚 library added/removed in pyproject.toml.
  • PR Approver must confirm 📃 THIRD_PARTY_LICENSES.txt updated, if any 📚 library added/removed in pyproject.toml.

Copy link

📌 Cov diff with main:

Coverage-0%

📌 Overall coverage:

Coverage-61.45%

Copy link
Member

@ahosler ahosler left a comment

Choose a reason for hiding this comment

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

Awesome work. Good job pushing this through

@ahosler ahosler enabled auto-merge (rebase) May 3, 2024 16:43
@ahosler ahosler merged commit d410494 into main May 3, 2024
1 of 2 checks passed
Copy link

github-actions bot commented May 3, 2024

⚠️ This PR changed pyproject.toml file. ⚠️

  • PR Creator must update 📃 THIRD_PARTY_LICENSES.txt, if any 📚 library added/removed in pyproject.toml.
  • PR Approver must confirm 📃 THIRD_PARTY_LICENSES.txt updated, if any 📚 library added/removed in pyproject.toml.

@ahosler ahosler deleted the feature/mlforecast_operator branch May 3, 2024 16:43
Copy link

github-actions bot commented May 3, 2024

📌 Cov diff with main:

Coverage-0%

📌 Overall coverage:

Coverage-61.48%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forecasting OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants