Custom Function
curve_fit
Fit a curve with curve_fit method.
This function returns FitResult see the documentation for more information what is possible with it.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fit_func
|
Function to fit. |
required | |
x
|
_NDARRAY
|
x data. |
required |
data
|
_NDARRAY
|
data to fit. |
required |
p0
|
Optional[List[Any]]
|
Initial guess for the parameters. |
None
|
bounds
|
Optional[Union[List[Tuple[Any, Any]], Tuple[Any, Any]]]
|
Bounds for the parameters. |
(-inf, inf)
|
**kwargs
|
Additional keyword arguments to curve_fit. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
FitResult |
FitResult
|
Fit result. |
Source code in ffit/front.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|