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

Add eva main function and add eva.fit_gev fitstart options #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stellema
Copy link
Member

  • Added main() function to eva.py so that GEV parameters can be saved in a workflow.
    • Added eva.py to setup.py entry_points, so unseen will have to be reinstalled before it will work (e.g., run pip install --no-deps -e .)
  • Added lmoments3 to ci/environment.yml
  • Updates to eva.fit_gev:
    • Renamed keywords to more descriptive names:
      • test_fit_goodness => assert_good_fit
      • test_relative_fit => pick_best_model
    • Added keyword fitstart that replaces generate_estimates and user_estimates. The new keyword can be a string or a list of initial estimates.
    • Added a bunch of options that utilise the fit or fit start methods from scipy and xclim and one that uses the L-moments method. I've found the linear moments estimate LMM is very good, but kept scipy_fitstart as the default because it reproduces the original scipy.stats.genextreme.fit method. The scipy_fitstart and scipy difference is a bit confusing because using 'scipy' will basically fit the parameters twice.
    • The functionality of generate_estimates can be reproduced using scipy_subset.
    • The retry attempt in the goodness of fit test hasn't really changed (except it is now in a separate function). We could retry the fit using different fitstart methods, but I don't think this is a good idea because it could impact reproducibility.
    • The eva tests have been updated for consistency and now utilise pytest fixtures.
    • Updated fit_gev output so that is more consistent with xclim.indices.stats.fit, including renaming theta => dparams and adding attributes tofit_gev output.
  • Deleted fit_stationary_gev

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.

1 participant