Skip to content

Support Method of Moments Distribution Fitting - #79

Merged
martinvonk merged 2 commits into
devfrom
methods_moments
Sep 9, 2025
Merged

Support Method of Moments Distribution Fitting#79
martinvonk merged 2 commits into
devfrom
methods_moments

Conversation

@martinvonk

Copy link
Copy Markdown
Owner

No description provided.

@martinvonk martinvonk linked an issue Sep 9, 2025 that may be closed by this pull request
@martinvonk martinvonk self-assigned this Sep 9, 2025
@martinvonk martinvonk added the enhancement New feature or request label Sep 9, 2025
@martinvonk
martinvonk requested a review from Copilot September 9, 2025 08:41

This comment was marked as outdated.

@martinvonk
martinvonk changed the base branch from main to dev September 9, 2025 08:46
@martinvonk
martinvonk requested a review from Copilot September 9, 2025 08:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for Method of Moments (MM) distribution fitting as an alternative to the default Maximum Likelihood Estimation (MLE) method. The implementation allows users to specify the fitting method when creating standardized index calculations.

Key changes:

  • Added fit_method parameter to all standardized index functions and the SI class
  • Enhanced the distribution fitting functionality to support both MLE and MM methods
  • Updated documentation and examples to demonstrate the new fitting capability

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/spei/si.py Added fit_method parameter to all SI functions and class, defaulting to "MLE"
src/spei/dist.py Enhanced Dist class and fit_dist method to support both MLE and MM fitting methods
docs/examples/example02_distributions.ipynb Added example comparing MLE and MM fitting methods with visualization

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/spei/dist.py Outdated
Comment thread src/spei/dist.py
@martinvonk
martinvonk merged commit fa843fd into dev Sep 9, 2025
17 checks passed
@martinvonk
martinvonk deleted the methods_moments branch September 9, 2025 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow for methods of moments estimation of distribution

2 participants