################################################################# # THIS FILE CONTAINS THE CODE TO GENERATE THE FIGURE 2 SHOWN IN # # THE PAPER: # # Torgo,L and Lopes,E.: Utility-based Fraud Detection. In # # Proceedings of the 22nd IJCAI'2011 # ################################################################# # Author : Luis Torgo (ltorgo@dcc.fc.up.pt) Date: Mar 2011 # # License: GPL (>= 2) # ################################################################# require(DMwR) ################################################# ## Figure 2: Results with the artificial data set ################################################# pdf('figResArtDS.pdf',family='Times', width=12,height=6) par(mfrow=c(1,2)) # Reg.Trees+ORh+linearU load('artDS_model_rpart_ORh.Rdata') plot(inspData,pch='.',main='Reg.Trees+ORh+linearU') points(inspData[urank$outP$rank[1:20],],pch=3) points(inspData[urank$EUrank[1:20],],pch=5) smartlegend('left','top',c('top20 outlier ranking','top20 utility ranking'),pch=c(3,5)) # NNet+LOF+linearU load('artDS_model_nnet_LOF.Rdata') plot(inspData,pch='.',main='NNet+LOF+linearU') points(inspData[urank$outP$rank[1:20],],pch=3) points(inspData[urank$EUrank[1:20],],pch=5) smartlegend('left','top',c('top20 outlier ranking','top20 utility ranking'),pch=c(3,5)) dev.off()