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 neural nets regressor shape #1589

Merged
merged 10 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

github-actions bot commented Jun 20, 2024

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 14.6846 14.86 1.19%
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.30409 9.37 0.71%
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 17.4123 17.98 3.26% ⚠️
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 38.8016 39.19 1.0%
\nModel training plots\n ## Model Training ### PeytonManning ![](https://asset.cml.dev/caebf60d39dce01989ee1b29f696e25f597fa393?cml=svg%2Bxml&cache-bypass=3c6af48c-7be3-433b-b9a8-565028e6d353) ### YosemiteTemps ![](https://asset.cml.dev/3486d64ca3964ba47e24df38dc6ee1abe8944845?cml=svg%2Bxml&cache-bypass=96460348-acea-4f29-a769-8efa73bab49a) ### AirPassengers ![](https://asset.cml.dev/9d9110dd64068d96c9907f315a799eae5408435b?cml=svg%2Bxml&cache-bypass=cab6e8f5-cc70-40b8-92ba-c52ac5e2505b) ### EnergyPriceDaily ![](https://asset.cml.dev/b6ec5bebee95f077fe8dc41fd9be797cda5a2b2a?cml=svg%2Bxml&cache-bypass=94d1358e-593d-4aa5-924e-e52e79b62cb2) \n

@@ -34,7 +34,7 @@ def __init__(self, config, id_list, quantiles, n_forecasts, device, config_trend
regressor_net.append(nn.Linear(d_inputs, self.d_hidden_regressors, bias=True))
d_inputs = self.d_hidden_regressors
# final layer has input size d_inputs and output size equal to no. of forecasts * no. of quantiles
Copy link
Owner

Choose a reason for hiding this comment

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

^ this comment may need updating.

Q: Is this NN truly applied separately to each observation and each forecast target?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's been applied for each batch layer by layer

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.

If the removal of multiplying the outputs with n_forecasts addresses the problem, there may be more places where this needs to be addressed.
Essentially all of the files in components/future_regressors need to be screened for this, especially any with NN, but also auxiliary functions.
It seems like these code areas lack tests - we should add those, too.

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.

Fixed shared NN and partially fixed shared nn coef, created new bug report.

@ourownstory ourownstory merged commit 0aafec9 into main Jun 21, 2024
7 of 11 checks passed
@ourownstory ourownstory deleted the bug/1554-fix_neural_nets_regressor branch June 21, 2024 07:14
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.

Neural network future regressor invalid shape in model
2 participants