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 xclim.indices.stats.fit method: MSE (maximum product of spacings) #2077

Merged
merged 16 commits into from
Feb 17, 2025

Conversation

SarahG-579462
Copy link
Contributor

@SarahG-579462 SarahG-579462 commented Feb 14, 2025

Pull Request Checklist:

  • This PR addresses an already opened issue (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features)
    • (If applicable) Documentation has been added / updated (for bug fixes / features)
  • CHANGELOG.rst has been updated (with summary of main changes)
    • Link to issue (:issue:number) and pull request (:pull:number) has been added

What kind of change does this PR introduce?

  • Adds a fit method: MSE, using scipy.stats.fit. Note that this is not available in the dist object.

Does this PR introduce a breaking change?

  • No.

Other information:

Copy link
Collaborator

@aulemahal aulemahal left a comment

Choose a reason for hiding this comment

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

This looks good, but I suggest adding a test, atleast to detect if scipy changes the signature.

I can't find a good explanation on the differences between rv_continuous.fit and stats.fit... It seems like the former might use analytical solutions while the latter never will. But it seems confusing to me! And stats.fit is not mentioned in scipy's "User guide".

@github-actions github-actions bot added the approved Approved for additional tests label Feb 14, 2025
@SarahG-579462 SarahG-579462 merged commit 2ac9150 into main Feb 17, 2025
22 checks passed
@SarahG-579462 SarahG-579462 deleted the fit-mse branch February 17, 2025 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Approved for additional tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Maximum spacing estimation method to stats.fit
3 participants