-
Notifications
You must be signed in to change notification settings - Fork 55
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
feature: improve price forecast #349
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Some things can be done easier. Data records are always sorted by date unless you directly access self.records - so please never do.
price_weighted_mean = np.ma.average(prices_of_hour_masked, weights=weights) | ||
|
||
return float(price_weighted_mean) | ||
|
||
@cache_in_file(with_ttl="1 hour") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe caching can be done for a longer time as data is only updated once a day.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the api data is only updating once a day. problem is when we set the caching to long, we can ignore that update for some time.
worst case would be updatetime+cachetime.
1h would be on the save side.
id we would know when the api update is done we could check for the current time and cache 1day
# return history, history2, prediction # for debug main | ||
|
||
|
||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you make this a comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unable to make it run bc of mypy if i keep it in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is good. Just the test must be updated to reflect the new logic.
Modifying elecpriceakkudoktor.py so it can hold up to 5 weeks of data.
Depending on the amount of data we will run different forecasts.
With 5 weeks we will use ets.