-
Notifications
You must be signed in to change notification settings - Fork 3
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
Rl cleanup #20
Rl cleanup #20
Conversation
Codecov Report
@@ Coverage Diff @@
## master #20 +/- ##
==========================================
+ Coverage 95.22% 99.05% +3.83%
==========================================
Files 9 10 +1
Lines 314 319 +5
Branches 52 53 +1
==========================================
+ Hits 299 316 +17
+ Misses 11 1 -10
+ Partials 4 2 -2
Continue to review full report at Codecov.
|
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 @Rlamboll. There's a few things I'd tweak so I'll make a few PRs so we can discuss!
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.
lgtm. Only last question. What should happen if your x and y are the same array ie you do the quantile analysis on two identical datasets? You won’t get a linear interpolation back out will you? Rather steps?
It's in steps, yes, as it will only return values found in the y dataset. You can see the answer to this question if you've ever run the plotting.py function (/script that runs this) on CO2 vs CO2 with quantiles on - it's pretty linear and as expected in the center of the distribution for all reasonable quantiles, but at the edges of the data there's less data so quantiles are pulled in the direction of the average value and are notably noisy. |
Is it worth adding a test for this? Or putting in one of the example notebooks? The reason I ask is that if you use the infiller to infill a timeseries you already have, you won't get back what you put in which can be confusing so it would be good to document why. |
If you have equally-spaced datapoints, match them up with the boxes and have very rapidly-decaying weights, the 0.5 quantile will be the original value. You can't guarantee it otherwise, no.
|
Ok I think it would be good to explain that in a notebook then. We can either do that in this PR or we can open an issue and then do it in a later PR, I'm happy either way (and conscious of time). |
OK, I've added stuff to the notebook to demonstrate the quirks of the windows value and retooled a test to check that you get out what you put in when there's nothing to average over. I've also removed the warning message. |
@Rlamboll I also didn't understand the last part of the notebook. Can you please add some more explanatory plots (or we make an issue and deal with it later). |
Co-Authored-By: Zeb Nicholls <zebedee.nicholls@climate-energy-college.org>
Co-Authored-By: Zeb Nicholls <zebedee.nicholls@climate-energy-college.org>
Co-Authored-By: Zeb Nicholls <zebedee.nicholls@climate-energy-college.org>
Co-Authored-By: Zeb Nicholls <zebedee.nicholls@climate-energy-college.org>
…n another push request
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 @Rlamboll. One suggested extra comment which I think would be helpful otherwise good to go (after rebasing)!
Pull request
Please confirm that this pull request has done the following:
CHANGELOG.rst
addedAdding to CHANGELOG.rst
Please add a single line in the changelog notes similar to one of the following: