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

Added min model error options, incl "by site" #142

Merged
merged 16 commits into from
Jul 3, 2024

Conversation

brendan-m-murphy
Copy link
Contributor

@brendan-m-murphy brendan-m-murphy commented Jun 14, 2024

Also added "robust" option to use median absolute deviation in place of standard deviation.

  • Summary of changes

In an ini file use:

compute_min_error = True
min_error_options = {"by_site": True, "robust": True, "average_over": "by_site"} 

to use new options. (Either "by_site" or "robust" can be omitted; or min_error_options can be omitted entirely)

  • Please check if the PR fulfills these requirements

Also added "robust" option to use median absolute deviation
in place of standard deviation.
@joe-pitt
Copy link
Contributor

Adding an option for a percentile-based calculation on min_model_error. This changes what is required in the ini - calculate_min_error now takes either "percentile" or "residual". Need to update docs/templates to reflect this

@joe-pitt
Copy link
Contributor

One thing that has just occurred to me - do we need to raise an error in the case when calculate_min_error is neither "percentile", "residual" or None? I guess at the moment if someone gets the spelling wrong it would silently skip the min error calculation

Raises ValueError if value is not None or one of the
two available methods.
Removed "average over" option to take mean (or median)
over a subset of the obs, since we weren't using this option.

Now there is just an option to calculate the min error separately
for each site, or to calculate one value for each site (along with
the robust/non-robust option.)
@brendan-m-murphy
Copy link
Contributor Author

@joe-pitt I've updated the docs with the new options and added some code to raise an error if the value of compute_min_error is something we don't recognise.

@brendan-m-murphy brendan-m-murphy marked this pull request as ready for review July 3, 2024 10:22
Copy link
Contributor

@joe-pitt joe-pitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I think it does close Issue #136 , at least in that we now have various options and it would be easy to add more

@brendan-m-murphy brendan-m-murphy merged commit c01d502 into devel Jul 3, 2024
3 checks passed
@brendan-m-murphy brendan-m-murphy deleted the min_error_by_site_plus_robust branch July 3, 2024 10:43
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

Successfully merging this pull request may close these issues.

Need to rethink min model error
2 participants