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

[refactor] Encapsulate _make_future_dataframe and _check_dataframe #1279

Merged
merged 3 commits into from
Apr 18, 2023

Conversation

LeonieFreisinger
Copy link
Collaborator

🔬 Background

Related to #1133
This PR is part of a series of PRs belonging to step 2 of restructuring the forecaster.py. Step 1 was to move identified functions out of the forecaster.py into dedicated files. Step 2 is to encapsulate the input arguments of the moved functions. Step2 will be implemented step-by-step within multiple PRs

🔮 Key changes

  • Encapsulate _make_future_dataframe
  • Encapsulate _check_dataframe. Note: model still needs to be passed, since config is set within function

📋 Review Checklist

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

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

@LeonieFreisinger LeonieFreisinger self-assigned this Apr 18, 2023
@LeonieFreisinger LeonieFreisinger added this to the Release 0.6.0 milestone Apr 18, 2023
@LeonieFreisinger LeonieFreisinger added the status: needs review PR needs to be reviewed by Reviewer(s) label Apr 18, 2023
@LeonieFreisinger
Copy link
Collaborator Author

@noxan Would be amazing to get your review. Do you have any suggestions on how to type the model input variable?

@github-actions
Copy link

github-actions bot commented Apr 18, 2023

Model Benchmark

Benchmark Metric main current diff
AirPassengers MAE_val 15.2698 15.2698 0.0%
AirPassengers RMSE_val 19.4209 19.4209 0.0%
AirPassengers Loss_val 0.00195 0.00195 0.0%
AirPassengers MAE 9.82902 9.82902 0.0%
AirPassengers RMSE 11.7005 11.7005 0.0%
AirPassengers Loss 0.00056 0.00056 0.0%
AirPassengers time 4.07522 4.16 2.08%
YosemiteTemps MAE_val 1.71298 1.71298 0.0%
YosemiteTemps RMSE_val 2.2607 2.2607 0.0%
YosemiteTemps Loss_val 0.00095 0.00095 0.0%
YosemiteTemps MAE 1.45187 1.45187 0.0%
YosemiteTemps RMSE 2.16721 2.16721 0.0%
YosemiteTemps Loss 0.00066 0.00066 0.0%
YosemiteTemps time 91.0577 95.82 5.23% ⚠️
PeytonManning MAE_val 0.58159 0.58159 0.0%
PeytonManning RMSE_val 0.72216 0.72216 0.0%
PeytonManning Loss_val 0.01239 0.01239 0.0%
PeytonManning MAE 0.41671 0.41671 0.0%
PeytonManning RMSE 0.55961 0.55961 0.0%
PeytonManning Loss 0.00612 0.00612 0.0%
PeytonManning time 11.4471 11.76 2.73%
Model training plots

Model Training

PeytonManning

YosemiteTemps

AirPassengers

@codecov-commenter
Copy link

codecov-commenter commented Apr 18, 2023

Codecov Report

Merging #1279 (d558aa9) into main (19f6de4) will increase coverage by 0.00%.
The diff coverage is 94.11%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##             main    #1279   +/-   ##
=======================================
  Coverage   89.88%   89.88%           
=======================================
  Files          38       38           
  Lines        5073     5074    +1     
=======================================
+ Hits         4560     4561    +1     
  Misses        513      513           
Impacted Files Coverage Δ
neuralprophet/data/process.py 92.43% <ø> (ø)
neuralprophet/forecaster.py 87.38% <ø> (ø)
neuralprophet/data/split.py 90.52% <94.11%> (+0.10%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@noxan noxan left a comment

Choose a reason for hiding this comment

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

LGTM

@noxan noxan changed the title [minor ] lighten forecaster step 2 - encapsulate _make_future_dataframe and _check_dataframe [refactor] Encapsulate _make_future_dataframe and _check_dataframe Apr 18, 2023
@noxan
Copy link
Collaborator

noxan commented Apr 18, 2023

@noxan Would be amazing to get your review. Do you have any suggestions on how to type the model input variable?

the model should be of type NeuralProphet - but not sure if it's worth adding that type, we should get ride of the that variable sooner or later anyhow

@noxan noxan merged commit f851666 into main Apr 18, 2023
@noxan noxan deleted the lighten_forecaster_3 branch April 18, 2023 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs review PR needs to be reviewed by Reviewer(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants