Repository navigation
PiecewiseWLS
CLI: --model piecewise_wls. Class: loqculate.models.piecewise_wls.PiecewiseWLS.
Same mean function as PiecewiseCF:
I keep this class so I can compare TRF against the closed-form search on the same peptides. It is not the CLI default.
scipy.optimize.curve_fit with method defaulting to TRF, maxfev=5000, bounds
init_method default is "legacy": slope from the mean signals at the two highest unique concentrations, noise intercept from the lowest, linear intercept from the top point. "auto" is a WLS line above the two lowest concentrations. The CLI does not expose init_method; a CLI piecewise_wls fit is legacy init.
If TRF raises RuntimeError or ValueError, fit() stores the clamped initial guess and does not raise.
If np.ptp(y) == 0 (constant area, including all zeros), TRF is skipped. Slope is 0 and both intercepts equal that constant. That path exists because a tiny positive TRF slope on a flat curve produced a finite LOD on arm64.
params_ has slope, intercept_linear, intercept_noise. There is no knot_x.
LOD uses the same arithmetic as PiecewiseCF: intersection ddof=1 std, min_noise_points / min_linear_points / max(x) guards.
LOQ is bootstrap only. loq() has no method argument. Grid, window, and <= threshold match PiecewiseCF (grid_points=100, sliding_window=3, cv_thresh=0.20). The window is consecutive grid points.
There is no loq_delta and no CLI --fast on this model.
init_method="legacy", n_boot_reps=100, seed=42, min_noise_points=2, min_linear_points=1, sliding_window=3, grid_points=100. fit() requires at least 3 observations.
loqculate v0.4.1 | Home | Getting started | CLI reference | Troubleshooting | Changelog | MIT License
loqculate Wiki
Start
Models
Use loqculate
Solve a problem
Contribute