Skip to content

Commit

Permalink
add doc fit
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoMVale committed Oct 13, 2023
1 parent c8a6b41 commit ce7fc9a
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion src/polykin/physprops/property_equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,34 @@ def fit(self,
T: FloatVector,
Y: FloatVector,
sigmaY: Optional[FloatVector] = None,
fitonly: list[str] = [],
fitonly: Optional[list[str]] = None,
logY: bool = False,
plot: bool = True,
) -> dict:
"""Fit equation to data using non-linear regression.
Parameters
----------
T : FloatVector
Temperature. Unit = K.
Y : FloatVector
Property to be fitted. Unit = Any.
sigmaY : FloatVector | None
Standard deviation of Y. Unit = [Y].
fitonly : list[str] | None
List with name of parameters to be fitted.
logY : bool
If `True`, the fit will be done in terms of log(Y).
plot : bool
If `True` a plot comparing data and fitted correlation will be
generated.
Returns
-------
dict
A dictionary of results with the following keys: 'success',
'parameters', 'covariance', and 'plot'.
"""

# Current parameter values
pnames = self._pnames[0] + self._pnames[1]
Expand Down

0 comments on commit ce7fc9a

Please sign in to comment.