Data pipeline improvements - #61
Draft
dominiquekleeven wants to merge 5 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces old PR #43
This PR relates to the following issue #29
The goal of the PR is to improve the data processing, and also prepare for a future migration to
Dartsby implementing the necessary steps (resampling of target and covariates, deduplication, handling NaN values, etc.).Summary
evaluate_modelfunction to themodel_providerprotocol.test_prophet_model_performance.py, which uses the evaluation method to validate forecast accuracy and performance.evaluate_modelalso enables us to later display metrics in the Web UI. At that stage, results should be stored alongside the model.Evaluation Metrics (NEW) –
test_prophet_model_performance.pyDataset:
mock-datapoints-power-grid.json(~130k datapoints)Using default model settings (no fine tuning)
Evaluation Metrics (OLD)
https://github.com/openremote/service-ml-forecast/tree/old-data-processing-metrics
Dataset:
mock-datapoints-power-grid.json(~130k datapoints)Using default model settings (no fine tuning)
Side-by-Side Comparison
The metrics do not reflect production performance, they should be interpreted as a comparison between old and new. With old being the baseline.
Conclusion
By de-duplicating datapoints, filling gaps/NaN values, and resampling data to a consistent interval, the dataset size is dramatically reduced and becomes more uniform.
This cleaner dataset makes it easier for Prophet to detect trends, resulting in significantly faster training and forecasting times and improved accuracy across all metrics.