Logistic Regression, Prediction and ROC

# 70 71 search for optimal cut off probability the

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: double penalizing getting 1 wrong). https://blackboar d.uc.edu/bbcswebdav/pid- 9566224- dt- content- r id- 55868231_2/cour ses/14SS_BANA7046002/notes%284%29.html 10/15 2/17/2014 Log istic Reg r ession, Pr ediction and ROC pu =02 ct . #Smerccs ymti ot cs1< fnto(,p){ ot - ucinr i ma(( = 0 &(i>pu) |(r= 1 &(i< en(r = ) p ct) ( =) p pu)) ct) } #Aymti cs smerc ot cs2< fnto(,p){ ot - ucinr i wih1=2 egt wih0=1 egt c =( = 1 &(i<pu) #oia vco -tu i 1 r=) p ct lgcl etr re f ata 1btpeit0 cul u rdc c =( = 0 &(i>pu) #oia vct -tu i 0 r=) p ct lgcl eor re f ata 0btpeit1 cul u rdc rtr(enwih1*c +wih0*c) eunma(egt 1 egt 0) } 10-fold cross validation, note we are using the full data to train and evaluate the model. lbaybo) irr(ot cei.l3< gmY~X +X +X12 fml =bnma, rdtgm - l( 3 8 1_, aiy ioil cei.aa rdtdt) c.eut=c.l(rdtdt,cei.l3 cs1 1) vrsl vgmcei.aa rdtgm, ot, 0 c.eutdla vrsl\$et # 008 008 #1 .70 .71 Search for optimal cut-off probability The following code does a grid search from pcut = 0.01 to pcut = 0.99 with the objective of minimizing overall cost in the...
View Full Document

## This document was uploaded on 03/18/2014.

Ask a homework question - tutors are online