3-cs-fraudulent-transactions

3-cs-fraudulent-transactions - #$-$"0&12#$ Spring 2013 1...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Spring 2013 !"#$ #&'()* +,"'('-$.& /,".#"0&12.# !"#$" &'()*+# , 1 Statistics 503, Spring 2013, ISU 342'& &5$ ("&" -./"#0(*1". /#"0 #+)"#*2 34 2(5+20+. ,6787,9 #+)"#*28 : ;(#1(35+2 -<= 2(5+20(. 1>+.*1?+# @#">= )#">AB* 1>+.*1?+# CA(.*= .A03+# "/ 2"5> A.1*2 "/ )#">AB* D(5= 0".+*(#4 ;(5A+ "/ 2"5> A.1*2 -.2)= 1.>1B(*"# "/ 1.2)+B*1". (.> #+2A5* E "F8 /#(A>8 A.F."G. H."* 1.2)+B*+>I 2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Statistics 503, Spring 2013, ISU > load(file.choose()) > library(DMwR) > data(sales) > head(sales) ID Prod Quant Val Insp 1 v1 p1 182 1665 unkn 2 v2 p1 3072 8780 unkn 3 v3 p1 20393 76990 unkn 4 v4 p1 112 1100 unkn 5 v3 p1 6164 20260 unkn 6 v5 p2 104 1155 unkn > dim(sales) [1] 401146 5 678-2,1.9 3 Statistics 503, Spring 2013, ISU > summary(sales) ID Prod Quant Val v431 : 10159 p1125 : 3923 Min. : 100 Min. : 1005 v54 : 6017 p3774 : 1824 1st Qu.: 107 1st Qu.: 1345 v426 : 3902 p1437 : 1720 Median : 168 Median : 2675 v1679 : 3016 p1917 : 1702 Mean : 8442 Mean : 14617 v1085 : 3001 p4089 : 1598 3rd Qu.: 738 3rd Qu.: 8680 v1183 : 2642 p2742 : 1519 Max. :473883883 Max. :4642955 (Other):372409 (Other):388860 NA's :13842 NA's :1182 Insp ok : 14462 unkn :385414 fraud: 1270 > nlevels(sales$ID) [1] 6016 > nlevels(sales$Prod) [1] 4548 678-2,1.9 4
Background image of page 2
Statistics 503, Spring 2013, ISU > summary(sales) ID Prod Quant Val v431 : 10159 p1125 : 3923 Min. : 100 Min. : 1005 v54 : 6017 p3774 : 1824 1st Qu.: 107 1st Qu.: 1345 v426 : 3902 p1437 : 1720 Median : 168 Median : 2675 v1679 : 3016 p1917 : 1702 Mean : 8442 Mean : 14617 v1085 : 3001 p4089 : 1598 3rd Qu.: 738 3rd Qu.: 8680 v1183 : 2642 p2742 : 1519 Max. :473883883 Max. :4642955 (Other):372409 (Other):388860 NA's :13842 NA's :1182 Insp ok : 14462 unkn :385414 fraud: 1270 > nlevels(sales$ID) [1] 6016 > nlevels(sales$Prod) [1] 4548 678-2,1.9 4 Statistics 503, Spring 2013, ISU > summary(sales) ID Prod Quant Val v431 : 10159 p1125 : 3923 Min. : 100 Min. : 1005 v54 : 6017 p3774 : 1824 1st Qu.: 107 1st Qu.: 1345 v426 : 3902 p1437 : 1720 Median : 168 Median : 2675 v1679 : 3016 p1917 : 1702 Mean : 8442 Mean : 14617 v1085 : 3001 p4089 : 1598 3rd Qu.: 738 3rd Qu.: 8680 v1183 : 2642 p2742 : 1519 Max. :473883883 Max. :4642955 (Other):372409 (Other):388860 NA's :13842 NA's :1182 Insp ok : 14462 unkn :385414 fraud: 1270 > nlevels(sales$ID) [1] 6016 > nlevels(sales$Prod) [1] 4548 678-2,1.9 4
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Statistics 503, Spring 2013, ISU > summary(sales) ID Prod Quant Val v431 : 10159 p1125 : 3923 Min. : 100 Min. : 1005 v54 : 6017 p3774 : 1824 1st Qu.: 107 1st Qu.: 1345 v426 : 3902 p1437 : 1720 Median : 168 Median : 2675 v1679 : 3016 p1917 : 1702 Mean : 8442 Mean : 14617 v1085 : 3001 p4089 : 1598 3rd Qu.: 738 3rd Qu.: 8680 v1183 : 2642 p2742 : 1519 Max. :473883883 Max. :4642955 (Other):372409 (Other):388860 NA's :13842 NA's :1182 Insp ok : 14462 unkn :385414 fraud: 1270 > nlevels(sales$ID) [1] 6016 > nlevels(sales$Prod) [1] 4548 678-2,1.9 A lot not inspected 4 Statistics 503, Spring 2013, ISU > summary(sales) Quant Val Min. : 100 Min. : 1005 1st Qu.: 107 1st Qu.: 1345 Median : 168 Median : 2675 Mean : 8442 Mean : 14617 3rd Qu.: 738 3rd Qu.: 8680 Max. :473883883 Max. :4642955 NA's :13842 NA's :1182 Insp ok : 14462 unkn :385414 fraud: 1270 > nlevels(sales$ID) [1] 6016 > nlevels(sales$Prod) [1] 4548 678-2,1.9 Useless! A lot not inspected 4
Background image of page 4
Statistics 503, Spring 2013, ISU > summary(sales) Quant Val Min. : 100 Min. : 1005 1st Qu.: 107 1st Qu.: 1345 Median : 168 Median : 2675 Mean : 8442 Mean : 14617 3rd Qu.: 738 3rd Qu.: 8680 Max. :473883883 Max. :4642955 NA's :13842 NA's :1182 Insp ok : 14462 unkn :385414 fraud: 1270 > nlevels(sales$ID) [1] 6016 > nlevels(sales$Prod) [1] 4548 678-2,1.9 Useless! A lot not inspected More salesmen than products 4 Statistics 503, Spring 2013, ISU :1##1.9# <(*( 01221.$ ". JA(.*1*4 (.> ;(5A+ ;(#1(35+2 CA(.*1*4 12 01221.$ 0"#+ "/*+. *'(. ;(5A+ &"031.+> *'+#+ (#+ KKK 01221.$2 ". 3"*'8 G'1B' 12 0"2* "/ *'+ 77KL 01221.$2 ". ;(5A+ 5
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Statistics 503, Spring 2013, ISU > sales$Insp.result <- sales$Insp > sales$Insp <- as.character(sales$Insp) > sales$Insp <- ifelse(sales$Insp=="unkn", "no", "yes") > table(sales$Insp) no yes 385414 15732 > table(sales$Insp)/nrow(sales) no yes 0.96078236 0.03921764 > sales$Insp.result <- as.character(sales$Insp.result) > sales$Insp.result[sales$Insp.result=="unkn"] <- NA > sales$Insp.result <- factor(sales$Insp.result) > table(sales$Insp.result) fraud ok 1270 14462 > table(sales$Insp.result)/nrow(sales[!is.na(sales $Insp.result),]) fraud ok 0.08072718 0.91927282 ;.#8$0&12.# 6 Statistics 503, Spring 2013, ISU > sales$Insp.result <- sales$Insp > sales$Insp <- as.character(sales$Insp) > sales$Insp <- ifelse(sales$Insp=="unkn", "no", "yes") > table(sales$Insp) no yes 385414 15732 > table(sales$Insp)/nrow(sales) no yes 0.96078236 0.03921764 > sales$Insp.result <- as.character(sales$Insp.result)
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 37

3-cs-fraudulent-transactions - #$-$"0&12#$ Spring 2013 1...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online