pylimma.array_weights_quick
- pylimma.array_weights_quick(y, fit, *, layer=None)[source]
Compute approximate array quality weights from a linear model fit.
Faithful port of R limma’s
arrayWeightsQuick(). Computes1 / colMeans(res*res / (sigma^2 * (1 - h)))wherehis the leverage diagonal of the design’s hat matrix andresis the residual matrix from the fit.- Parameters:
- Returns:
Approximate array quality weights, shape (n_samples,).
- Return type:
ndarray