-
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
Feature/time series #160
Feature/time series #160
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #160 +/- ##
==========================================
- Coverage 25.56% 25.50% -0.07%
==========================================
Files 29 29
Lines 4017 4027 +10
==========================================
Hits 1027 1027
- Misses 2990 3000 +10 ☔ View full report in Codecov by Sentry. |
@FariborzDaneshvar-NOAA just for the sake of future reference, can you please include some of the multi step plots, etc. that was generated using this approach? I mean can you please attach snapshots as a PR comment? |
This update doesn't change plots. It only passes surrogate_model in chunks to This is what we had before for percentiles: surrogate_percentiles = compute_surrogate_percentiles(
poly=surrogate_model,
q=percentiles,
dist=distribution,
convert_from_log_scale=convert_from_log_scale,
) But with this new update, it will use multiple chunks of surrogate_model (default number of timeslots is 1): # use chunks of surrogate model (for each timeslot) to calculate percentiles
surr_chunk_length = int(surrogate_model.shape[0] / timeslots)
for timestep in range(timeslots):
surrogate_percentiles_chunk = compute_surrogate_percentiles(
poly=surrogate_model[
(timestep * surr_chunk_length) : ((timestep + 1) * surr_chunk_length)
],
q=percentiles,
dist=distribution,
convert_from_log_scale=convert_from_log_scale,
)
if timestep == 0:
surrogate_percentiles = surrogate_percentiles_chunk
else:
surrogate_percentiles = numpy.concatenate(
(surrogate_percentiles, surrogate_percentiles_chunk), axis=1
) |
Thanks @FariborzDaneshvar-NOAA can you verify that we get the same plots as before if you run this code on the maxelev data? |
Here are the percentiles and probability plots of a given surrogate_model, from the old code (main branch) and the new code (feature/time_series branch) with timeslot variable:
Three plots are exactly the same, confirming that the newly added variable ( |
Thank you, I'll go ahead with the merge then! |
Added optional timeslot input (default=1) to
compute_surrogate_percentiles()
andcompute_surrogate_probability_field()
functions to avoid MemoryError when calculatingpoly1 = poly(*Z)