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

Weighted versions of goodness of fit measures? #11

Closed
rogiersbart opened this issue Apr 3, 2020 · 3 comments
Closed

Weighted versions of goodness of fit measures? #11

rogiersbart opened this issue Apr 3, 2020 · 3 comments

Comments

@rogiersbart
Copy link

Hi there,

just a suggestion/question for some enhancement of the package:
Did you consider implementing weighted versions of the goodness of fit measures?
We use hydroGOF as a backend in RMODFLOW (see rogiersbart/RMODFLOW#18) for model performance evaluation, but in groundwater modelling it is common to work with weights that are for instance based on the measurement error. Any thoughts on this? Would this be a useful extension for hydroGOF? Or do you consider this out of scope?

@hzambran
Copy link
Owner

hzambran commented Apr 28, 2020

I apologise for my very late reply, but these days have been complicated...

Thank for raising this point, which is perfectly within the scope of hydroGOF.
BTW, thanks for developing RMODFLOW, which is of high interest for many people !!

The only function that currently has implemented the possibility you describe is NSE, using the argument FUN:

function to be applied to ‘sim’ and ‘obs’ in order to obtain transformed values thereof before computing the Nash-Sutcliffe efficiency.

Is something like:

library(hydroGOF)
obs <- 1:10/10
sim <- 2:11/10
w    <- 0.1*obs/sum(0.1*obs)
myfun <- function(x, w) return(x*w)
NSE(sim=sim, obs=obs, FUN=myfun, w=w)

what you are looking for?

@rogiersbart
Copy link
Author

Well, now it's my turn to apologize ...

We are basically looking for inverse-variance weighting, mostly for ME, MAE, MSE and RMSE.
The FUN argument of NSE() does indeed seem to provide a solution.
Any chance this might be useful to include in the other measures as well?
If not, we can always foresee the weighting at our side of course.

@hzambran
Copy link
Owner

Done in hydroGOF 0.5-0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants