pylimma.weighted_lowess
- pylimma.weighted_lowess(x, y, weights=None, delta=None, npts=200, span=0.3, iterations=4, output_style='loess')[source]
Weighted LOWESS smoother - R-compatible entry point.
Thin wrapper around
loess_fit()that mirrors R limma’sweightedLowess(x, y, ...)argument order and parameter names. Use this when porting R code that callsweightedLowessdirectly. New Python code should preferloess_fit().- Parameters:
x (array_like) – Predictor and response (R’s argument order - note that
loess_fit()takes(y, x)).y (array_like) – Predictor and response (R’s argument order - note that
loess_fit()takes(y, x)).weights (array_like, optional) – Per-observation weights.
delta (float, optional) – Clustering tolerance for the anchor-point-based smoother. Ignored by the current implementation, which uses the exact (non-clustered) weighted LOWESS algorithm. A warning is emitted if supplied.
npts (int, default 200) – Number of anchor points. Ignored by the current implementation for the same reason as
delta. A warning is emitted if the caller supplies a non-default value.span (
float) – Seeloess_fit().iterations (
int) – Seeloess_fit().output_style ({"loess", "lowess"}, default "loess") –
"loess": return{"fitted", "residuals", "weights", "delta"}in the caller’s original point order (matches R’sloess()/loessFit()output shape andloess_fit())."lowess": return{"x", "y", "delta"}with both arrays sorted byxascending (matches R’slowess()output shape).
- Returns:
Schema depends on
output_style- see above.- Return type: