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

Unchanged ex-ante and ex-post beliefs #518

Merged
merged 12 commits into from Nov 17, 2022

Conversation

Flix6x
Copy link
Contributor

@Flix6x Flix6x commented Oct 31, 2022

This PR: 1) prevents more redundant data from entering the database, and 2) retains data that one might usually consider not to be redundant. Let me explain:

  1. We usually wish to remove unchanged beliefs from saved data. Whereas before, only data was removed that didn't represent a changed belief with respect to the already saved data, now also data is removed that doesn't represent a changed belief with respect to the other new data.
  2. Before this PR, when a measurement (ex-post belief) was equal to the most recent forecast (ex-ante belief), it wasn't saved. However, we started making a visual distinction between ex-post and ex-ante beliefs in charts (solid and dashed lines, respectively). Therefore, we wish to save the oldest ex-post belief explicitly, regardless of whether it represents a changed belief.

…function

Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x added the Data label Oct 31, 2022
@Flix6x Flix6x self-assigned this Oct 31, 2022
Signed-off-by: F.N. Claessen <felix@seita.nl>
@coveralls
Copy link
Collaborator

coveralls commented Oct 31, 2022

Pull Request Test Coverage Report for Build 3437344904

  • 15 of 16 (93.75%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.06%) to 65.08%

Changes Missing Coverage Covered Lines Changed/Added Lines %
flexmeasures/api/common/utils/api_utils.py 0 1 0.0%
Totals Coverage Status
Change from base Build 3436864090: 0.06%
Covered Lines: 6574
Relevant Lines: 9484

💛 - Coveralls

Signed-off-by: F.N. Claessen <felix@seita.nl>
… beliefs

Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x marked this pull request as ready for review October 31, 2022 13:58
@Flix6x Flix6x requested a review from nhoening October 31, 2022 13:58
@Flix6x Flix6x changed the title Unchanged ex ante and ex post beliefs Unchanged ex-ante and ex-post beliefs Oct 31, 2022
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

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

Nice work, but again I have recommendations for readability, mostly.

flexmeasures/data/services/time_series.py Outdated Show resolved Hide resolved
flexmeasures/data/services/time_series.py Show resolved Hide resolved
flexmeasures/data/services/time_series.py Show resolved Hide resolved
flexmeasures/data/services/time_series.py Outdated Show resolved Hide resolved
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…_ex-post_beliefs

# Conflicts:
#	documentation/changelog.rst
@Flix6x Flix6x requested a review from nhoening November 10, 2022 13:59
@Flix6x Flix6x added this to the 0.12.0 milestone Nov 10, 2022
@Flix6x Flix6x merged commit 35591a3 into main Nov 17, 2022
@Flix6x Flix6x deleted the unchanged_ex-ante_and_ex-post_beliefs branch November 17, 2022 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants