next up previous contents
Next: B.4.4 lr_cgmle Up: B.4 Learners Previous: B.4.2 dtree   Contents


B.4.3 lr

This is an implementation of logistic regression (LR). LR computes $ \beta$ for which the model values $ \mu_i$ best approximate the dataset outputs $ y_i$ under the model

$\displaystyle \mu_i = \ensuremath{
\frac{ \ensuremath{\exp\left({{\beta}_0 + {\...
...eft({{\beta}_0 + {\beta}_1 {x_i}_1 +
\cdots {\beta}_{M} {x_i}_{M}}\right)} } }
$

where $ x_i$ is one dataset row. Please see [13,25,20,10] for details about logistic regression. This implementation uses iterative re-weighted least squares (IRLS) [20,10] to maximize the LR log-likelihood

$\displaystyle \sum_n{i=1}^R y_i \ln (u_i) + (1-y_i) \ln (1-u_i)
$

where $ R$ is the number of rows in the dataset. For logistic regression, IRLS is equivalent to Newton-Raphson [25]. To improve the speed of IRLS, this implementation uses conjugate gradient [26,27,31,7] as an approximate linear solver [20]. This solver is applied to the linear regression

$\displaystyle \left( X^T W X \right) \beta_{\mbox{new}} = X^T W z$ (B.7)

where $ W =$   diag$ (\mu_i (1-\mu_i))$ and $ z = X \beta_{\mbox{old}} + W^{-1} (y - \mu)$. The current estimate of $ \beta$ is scored using the likelihood ratio $ -2 log( L_{\mbox{sat}} / L_{\mbox{current}})$, where $ L_{\mbox{sat})}$ is the likelihood of of a saturated model with $ R$ parameters and $ L_{\mbox{current}}$ is the likelihood of the current model. This ratio is called the ``deviance'', and the IRLS iterations are terminated when the relative difference of the deviance between iterations is sufficiently small. Other termination measures can be added, such as a maximum number of iterations.




Keyword Arg Type Arg Vals Default
Common
cgdeveps float [1e-10, $ \infty$) 0.0
cgeps float [1e-10, $ \infty$) 0.001
lrmax int 0,..., $ \infty$ 30
rrlambda float [0, $ \infty$) 10.0
Rare
binitmean none    
cgbinit none    
cgwindow int 0, ..., $ \infty$ 3
cgdecay float [1.0, $ \infty$) 1000
cgmax int 0, ..., $ \infty$ 200
holdout_size float [0.0, 1.0] 0.0
lrdevdone float [0.0, $ \infty$] 0.0
lreps float [1e-10, $ \infty$) 0.05
margin float [0.0, $ \infty$) 0
modelmax float (modelmin, 1.0] 1.0
modelmin float [0.0, modelmax) 0.0
wmargin float [0.0, 0.5) 0.0
     



Common keywords and arguments:

Rare keywords and arguments:


next up previous contents
Next: B.4.4 lr_cgmle Up: B.4 Learners Previous: B.4.2 dtree   Contents
Copyright 2004 Paul Komarek, komarek@cmu.edu