question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Calc metric over init or member - how to make it flexible

See original GitHub issue

It would be nice to have the compute functions in a way that they only check for predictability over the member dimension, so the ensemble dimension is free to be plotted.

Now compute results only time as lead time. Then it would also give ensemble or initialization, so we can get a Lead year timeseries over the ensemble space.

This nicely shows how prediction skill is not constant but very dependent of initialization state. http://hdl.handle.net/21.11116/0000-0002-0A63-4 Fig. 6.1

Need to adapt computes and remove mean over all ensembles.

Propose: add flag mean_forecast=True as is, as we compute the mean forecast over all init states, and mean_forecast=False for the new part.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
bradyrxcommented, Feb 1, 2019

I like this idea a lot; I think you should open a PR just to implement this when you have time.

So if I understand this correctly, we take each initialization year and run a metric. So, say, we choose ensemble=1970. I now have 40 members with 10 lead years each. Do we then construct a vector of the first lead year for all 40 members and compare to 1971 in the reference? Then do the same for each lead year?

E.g. (example typed out here; not real):

A = DPLE['SST'].sel(ensemble=1970)
print(A)
[0.2, 0.1, 0.3, -0.2, 0.4, ...] # size is member size
B = FOSI['SST'].sel(ensemble=1970)
print(B)
[0.15] # actual anomaly from the hindcast
xr.corr([B]*DPLE.member.size, [A])

Hopefully that makes some sense…

0reactions
aaronspringcommented, May 22, 2019

pearson_r gives 0 if applied over members only

for other metrics both works

Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding Flexible Formulas - Oracle Help Center
Using a FLEX ID, a formula can calculate the current proposed budget based on last year's budget, the top-down plan, as well as...
Read more >
Beam Analysis: Flexibility Method - YouTube
Analyzing a beam using the flexibility method. For my introductory structural analysis course at SDSU. San Diego public transit bus photo in ...
Read more >
Make signature of compute_metrics parameter in Trainer class ...
For some models, I had to either pass some extra arguments to perform the metrics calculation or to access remote services to retrieve...
Read more >
How to include a dynamic array INSIDE a struct in C?
Structs with flexible array members at the end can only be allocated dynamically in C. Your assumption about pointer aritmetics being faster ...
Read more >
How to Calculate Unit Economics for Your Business - 2022
Method 2: Flexible LTV · GML (average gross margin per customer lifespan): The amount of profit generated by your business from a given...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found