Comments (7)
maybe we just leave this. probably this should rather be addressed in xskillscore
from climpred.
When running pytest we quite a few warnings. Should get rid of those if possible. Some of them are I guess only based on some \s for latex style docstrings but others come from the metrics.
from climpred.
very often I get this kind of warning. I guess it happens always when we have a nan masked grid cell and then divide by that. also happens for pearson_r
and all the compute skills
from climpred.
this Nan warning happens inside xskillscore.pearson_r when applying it to masked values (land grid cells for ocean output.)
from climpred.
There's a suggestion here for how to handle it: https://stackoverflow.com/questions/29688168/mean-nanmean-and-warning-mean-of-empty-slice
This suggests to only wrap places you know you'll get the warning, e.g.
# I expect to see RuntimeWarnings in this block
with warnings.catch_warnings():
warnings.simplefilter("ignore", category=RuntimeWarning)
foo = np.nanmean(x, axis=1)
Although I could see this becoming messy to put everywhere. Or perhaps we have a decorator we can put around pearson_r
and other stats wrappers.
from climpred.
a nicer and also probabily more performant way would be to only apply the metric when the inputs are not nan. the result is also nan, but to mask the area where the metric will be applied. dont know how thats possible but we did something similar for predictability_horizon
from climpred.
You could replace NaNs with -999 or something, then after the fact re-replace them with NaN.
from climpred.
Related Issues (20)
- HindcastEnsemble.verify() fails when valid_time of different object time than time HOT 3
- Refactor doctests for xarray 2022.06.01 HOT 1
- `HindcastEnsemble.remove_bias` with only one `lead` element drops `lead` dimension
- change `skill(init, lead)` to `skill(valid_time, lead)` to visualize forecasting barrier and reverse HOT 1
- make tqdm optional
- `HindcastEnsemble.resample()` working on `time` and `lead` HOT 1
- ⚠️ upstream-dev CI: `test_PerfectModelEnsemble_plot_bootstrapped_skill_over_leadyear` yerr negative HOT 2
- Using datatrees to represent datasets HOT 3
- Notebook downloading forecasts with herbie
- ValueError 'init' because it is not a variable or dimension in this dataset HOT 2
- Package dependency troubles with `python 3.11` HOT 7
- alignment=same_verifs throws CoordinateError HOT 1
- Reporting a vulnerability HOT 1
- Issue on page /quick-start.html HOT 1
- Implementing mean error as a verification metric? HOT 1
- `xclim.DetrendedQuantileMapping` with `train_test_split="unfair"` failing HOT 5
- Duplicate Classification entry
- New release of Climpred ? HOT 9
- Numerous documentation build warnings
- Codecov actions require tokens for v4 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from climpred.