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

Support non-scalar initial guess and bounds in scipp.curve_fit #3437

Closed
SimonHeybrock opened this issue May 2, 2024 · 0 comments · Fixed by #3452
Closed

Support non-scalar initial guess and bounds in scipp.curve_fit #3437

SimonHeybrock opened this issue May 2, 2024 · 0 comments · Fixed by #3452
Assignees

Comments

@SimonHeybrock
Copy link
Member

SimonHeybrock commented May 2, 2024

The current implementation assumes that initial guesses (p0) and bounds are scalar, e.g., 0-D variables.

When fitting, e.g., a 1-D function to 2-D data, we may have different initial guess and bounds for each slice of the data, i.e., for each independent fit. curve_fit should be able to support this.

  • Make sure to check coords of initial guesses, if present this should match the data's coord (the coord not participating in the fit).
  • Initial guess must have dims, just like data and we should reject, e.g., plain NumPy arrays which would require positional association of values with data slices.
  • Slice dims for p0 and bounds.
  • Note that different params can have a different set of dims.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants