rampedpyrox.Daem.calc_L_curve¶
-
Daem.
calc_L_curve
(timedata, ax=None, nLam=150, lam_max=100.0, lam_min=0.001, plot=False)¶ Function to calculate the L-curve for a given model and timedata instance in order to choose the best-fit smoothing parameter, lambda.
Parameters: - timedata (rp.TimeData) –
rp.TimeData
instance containing the time and fraction remaining arrays to use in L curve calculation. - ax (None or matplotlib.axis) – Axis to plot on. If None and
plot = True
, automatically creates amatplotlip.axis
instance to return. Defaults to None. - nLam (int) – Number of lambda values to consider. Defaults to 150.
- lam_max (float or int) – Maximum lambda value to search. Defaults to 1e2.
- lam_min (float or int) – Minimum lambda value to search. Defaults to 1e-3.
- plot (Boolean) – Tells the method to plot the resulting L curve or not. Defaults to False.
Returns: - lam_best (float) – The calculated best-fit lambda value.
- axis (None or matplotlib.axis) – If
plot = True
, returns an updated axis handle with plot.
Raises: ScalarError
– If lam_max or lam_min are not scalar.ScalarError
– If nLam is not int.
See also
calc_L_curve()
- Package-level method for
calc_L_curve
.
References
- [1] D.C. Forney and D.H. Rothman (2012) Inverse method for calculating
- respiration rates from decay time series. Biogeosciences, 9, 3601-3612.
- [2] P.C. Hansen (1994) Regularization tools: A Matlab package for
- analysis and solution of discrete ill-posed problems. Numerical Algorithms, 6, 1-35.
- timedata (rp.TimeData) –