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

[Minor] fix future regressor #1585

Merged
merged 18 commits into from
Jun 21, 2024

Conversation

MaiBe-ctrl
Copy link
Collaborator

🔬 Background

🔮 Key changes

  • Explain the main changes introduced by this pull request for the reviewer.

📋 Review Checklist

  • I have performed a self-review of my own code.
  • I have commented my code, added docstrings and data types to function definitions.
  • I have added pytests to check whether my feature / fix works.

Please make sure to follow our best practices in the Contributing guidelines.

Copy link

codecov bot commented Jun 19, 2024

Codecov Report

Attention: Patch coverage is 78.26087% with 5 lines in your changes missing coverage. Please review.

Project coverage is 88.16%. Comparing base (79ea9cd) to head (cfde05b).
Report is 1 commits behind head on main.

Current head cfde05b differs from pull request most recent head c4cc704

Please upload reports for the commit c4cc704 to get more accurate results.

Files Patch % Lines
neuralprophet/utils.py 66.66% 4 Missing ⚠️
neuralprophet/forecaster.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1585   +/-   ##
=======================================
  Coverage   88.16%   88.16%           
=======================================
  Files          41       41           
  Lines        5374     5366    -8     
=======================================
- Hits         4738     4731    -7     
+ Misses        636      635    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@ourownstory ourownstory left a comment

Choose a reason for hiding this comment

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

I added three comments, please check

@@ -1107,7 +1112,7 @@ def fit(
self.fitted = True
return metrics_df

def predict(self, df: pd.DataFrame, decompose: bool = True, raw: bool = False):
def predict(self, df: pd.DataFrame, decompose: bool = True, raw: bool = False, auto_extend=False):
Copy link
Owner

Choose a reason for hiding this comment

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

To avoid the linked issues being raised, auto_extend should default to True, unless my logic is off?

Copy link
Collaborator Author

@MaiBe-ctrl MaiBe-ctrl Jun 21, 2024

Choose a reason for hiding this comment

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

auto_extend for me means that we don't do the cutting at the end. So we cut all the time except for the case where it will cause the whole dataframe to be nan. Can still reverse it

@@ -749,6 +749,7 @@ def add_events(
def add_country_holidays(
self,
country_name: Union[str, list],
subdivision_name: Optional[Union[str, dict]] = None,
Copy link
Owner

Choose a reason for hiding this comment

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

seems like the subdivision commits slipped in here.
we can either remove those commits or merge that PR first and be careful that these lines do not longer reappear due to commit squashing.

@@ -397,12 +397,12 @@ def __post_init__(self):
self.seasonality_local_reg = False

# If seasonality_local_reg = True
if self.seasonality_local_reg == True:
if self.seasonality_local_reg:
Copy link
Owner

Choose a reason for hiding this comment

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

This also seems to come from another PR

Copy link
Owner

Choose a reason for hiding this comment

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

Also, this change will always override a set seasonality_local_reg and overwrite it to be 1 which does not appear intentional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No was trying to solve the flake8 errors - doesn't make any difference anyways

@ourownstory ourownstory merged commit f1a3820 into ourownstory:main Jun 21, 2024
5 of 10 checks passed
Copy link

Model Benchmark

Benchmark Metric main current diff
PeytonManning MAE_val 0.34955 0.34955 0.0%
PeytonManning RMSE_val 0.50049 0.50049 0.0%
PeytonManning Loss_val 0.01771 0.01771 0.0%
PeytonManning MAE 0.34653 0.34653 0.0%
PeytonManning RMSE 0.49312 0.49312 0.0%
PeytonManning Loss 0.01464 0.01464 0.0%
PeytonManning time 15.018 14.75 -1.78%
AirPassengers MAE_val 30.6285 30.6285 0.0%
AirPassengers RMSE_val 31.5254 31.5254 0.0%
AirPassengers Loss_val 0.01277 0.01277 0.0%
AirPassengers MAE 6.16861 6.16861 0.0%
AirPassengers RMSE 7.85225 7.85225 0.0%
AirPassengers Loss 0.00065 0.00065 0.0%
AirPassengers time 9.54199 9.28 -2.75%
EnergyPriceDaily MAE_val 5.41157 5.41157 0.0%
EnergyPriceDaily RMSE_val 6.71538 6.71538 0.0%
EnergyPriceDaily Loss_val 0.02525 0.02525 0.0%
EnergyPriceDaily MAE 5.94936 5.94936 0.0%
EnergyPriceDaily RMSE 7.9833 7.9833 0.0%
EnergyPriceDaily Loss 0.02579 0.02579 0.0%
EnergyPriceDaily time 18.1459 17.83 -1.74%
YosemiteTemps MAE_val 0.56412 0.56412 0.0%
YosemiteTemps RMSE_val 0.83161 0.83161 0.0%
YosemiteTemps Loss_val 0.0004 0.0004 0.0%
YosemiteTemps MAE 0.98449 0.98449 0.0%
YosemiteTemps RMSE 1.75389 1.75389 0.0%
YosemiteTemps Loss 0.00132 0.00132 0.0%
YosemiteTemps time 40.008 38.61 -3.49%
\nModel training plots\n ## Model Training ### PeytonManning ![](https://asset.cml.dev/3f1106eec6cbcdc027eba6be6facdb1ca27fa1fe?cml=svg%2Bxml&cache-bypass=c347c940-7263-4346-89b1-b0c25aa295a9) ### YosemiteTemps ![](https://asset.cml.dev/e8f030afe97e92f42a15a8070d163936ad994061?cml=svg%2Bxml&cache-bypass=a71c29e9-1d3c-4fba-a996-fffb3464ca9b) ### AirPassengers ![](https://asset.cml.dev/49860d361e5e48376530bc11ae75aa2703fdbd7d?cml=svg%2Bxml&cache-bypass=62e614dc-cec9-4eb0-99db-0ef0dcf9a3ed) ### EnergyPriceDaily ![](https://asset.cml.dev/ea307c95649c9afd52a11529f825463e73d39a7c?cml=svg%2Bxml&cache-bypass=d3b78574-5f3b-416b-8a2c-889d3f453ccb) \n

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