foehnix.iwls_logit

foehnix.iwls_logit(logitx, y, beta=None, standardize=True, maxit=100, tol=1e-08)[source]

Iterative weighted least squares solver for a logistic regression model.

Parameters:
logitx : dict

Must contain:

  • 'values' : pandas.DataFrame the model matrix
  • 'center' : pandas.Series, containing the mean of each model matrix row
  • 'scale' : Series, containing the standard deviation of matrix rows
  • 'is_standardized': boolean if matrix is standardized
y : numpy.ndarray

predictor values of shape(len(observations), 1)

beta : numpy.ndarray

initial regression coefficients. If None will be initialized with 0.

standardize : bool

If True (default) the model matrix will be standardized

maxit : int

maximum number of iterations, default 100.

tol : float

tolerance for improvement between iterations, default 1e-8.

Returns:
: dict