Iteratively reweighted least squares (source code)

= Iteratively reweighted least squares
{wiki}

IRLS fits a generalized linear model by repeatedly solving a weighted least-squares approximation to its score equations.