
Penalised logistic regression on a basis
Source:R/esl_native_ch56.R
morie_esl_penalized_logistic.RdMaximises the log-likelihood minus (lambda / 2) theta' Omega theta by penalised IRLS, theta = (N'WN + lambda Omega)^-1 N'Wz (ESL eqs 5.28-5.33); df is the trace of N (N'WN + lambda Omega)^-1 N'W.
Arguments
- N
Basis matrix (include a constant column for an intercept).
- y
0/1 response.
- Omega
Penalty matrix.
- lambda
Penalty, >= 0.
- max_iter, tol
Newton controls (convergence on the linear predictor N theta, identified even when theta is not, or on a relative change below 1e-14 in the penalised log-likelihood for an ill-conditioned basis).