ื”ืจืฆืช ืžื•ื“ืœ ื›ืš ืฉื™ืงื‘ืœ ืงื•ื‘ืฅ CSV ื›ืงืœื˜, ื•ื™ื“ืคื™ืก ืืช ื”ืคืœื˜ ืœืงื•ื‘ืฅ ื˜ืงืกื˜

25 views
Skip to first unread message

Einat Miller Kreiczer

unread,
Feb 1, 2016, 10:40:18โ€ฏAM2/1/16
to Israel R User Group

ื”ื™ื™, ื™ืฉ ืœื™ ื›ืžื” ืžื•ื“ืœื™ื ืฉื‘ื ื™ืชื™ ื‘ R ย ื•ืื ื™ ืจื•ืฆื” ืœื“ืขืช ืื™ืš ืœื”ืฉืชืžืฉ ื‘ื”ื.

ืื ื™ ืจื•ืฆื” ืœืงื‘ืœ ื ืชื•ื ื™ื ื“ืจืš ืงื•ื‘ืฅ ROLLOUT.CSV , ืœื”ืจื™ืฅ ืืช ื”ืžื•ื“ืœ ืฉื‘ื ื™ืชื™ ื•ืฉื”ื”ื—ืœื˜ื” ืœื’ื‘ื™ ื”ืžืฉืชื ื” ื”ืชืœื•ื™ BUYER_FLAG ืชื•ื“ืคืก ืœืงื•ื‘ืฅ ื˜ืงืกื˜

ย 

ื“ื•ื’ืžื 1 (ืจื’ืจืกื™ื” ืœื•ื’ื™ืกื˜ื™ืช)

ย 

ย 

mdl <- glm(formula = BUYER_FLAG ~ . , family= "binomial", data = ds_tr (

y_hat = predict(mdl, data = ds_tr , type = 'response('

ืื ื™ ืžื ื™ื—ื” ืฉื”ืงืจื™ืื” ืฉืœ ื”ื ืชื•ื ื™ื ืชื”ื™ื” ื‘ืื•ืคืŸ ื”ื‘ื:

ds = read.csv(file_path, na.strings="")

ื•ืื– ืืช ds ืื ื™ ืืชืŸ ื‘ืชื•ืจ newdata

y_hat = predict(mdl, newdata =ย  ds, type = 'response')

y = (ds_te$BUYER_FLAG == 1)

cutoff= (y_hat > 0.5)

ย 

ย 

ืื™ืš ืื ื™ ืฉื•ืคื›ืช ืืช ื”ืชื•ืฆืื•ืช ืœืงื•ื‘ืฅ ื˜ืงืกื˜? ืชื•ื“ื”!


Ofrit Lesser

unread,
Feb 1, 2016, 11:03:12โ€ฏAM2/1/16
to israel-r-...@googlegroups.com

write.csv ืื• ย write.table ื™ืขืฉื• ืืช ื”ืขื‘ื•ื“ื”

--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-g...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

This email has been sent from a virus-free computer protected by Avast.
www.avast.com
Reply all
Reply to author
Forward
0 new messages