作家
登录

Python机器学习实战:信用卡欺诈检测

作者: 来源: 2017-04-11 14:48:19 阅读 我要评论

Iteration 1 : recall score = 0.958904109589  
  • Iteration 2 : recall score = 0.917808219178  
  • Iteration 3 : recall score = 1.0  
  • Iteration 4 : recall score = 0.972972972973  
  • Iteration 5 : recall score = 0.954545454545 
  •  
  • Mean recall score 0.960846151257 
  •  
  • C parameter: 0.1 
  •  
  • Iteration 1 : recall score = 0.835616438356  
  • Iteration 2 : recall score = 0.86301369863  
  • Iteration 3 : recall score = 0.915254237288  
  • Iteration 4 : recall score = 0.932432432432  
  • Iteration 5 : recall score = 0.878787878788 
  •  
  • Mean recall score 0.885020937099 
  •  
  • C parameter: 1 
  •  
  • Iteration 1 : recall score = 0.835616438356  
  • Iteration 2 : recall score = 0.86301369863  
  • Iteration 3 : recall score = 0.966101694915  
  • Iteration 4 : recall score = 0.945945945946  
  • Iteration 5 : recall score = 0.893939393939 
  •  
  • Mean recall score 0.900923434357 
  •  
  • C parameter: 10 
  •  
  • Iteration 1 : recall score = 0.849315068493  
  • Iteration 2 : recall score = 0.86301369863  
  • Iteration 3 : recall score = 0.966101694915  
  • Iteration 4 : recall score = 0.959459459459  
  • Iteration 5 : recall score = 0.893939393939 
  •  
  • Mean recall score 0.906365863087 
  •  
  • C parameter: 100 
  •  
  • Iteration 1 : recall score = 0.86301369863  
  • Iteration 2 : recall score = 0.86301369863  
  • Iteration 3 : recall score = 0.966101694915  
  • Iteration 4 : recall score = 0.959459459459  
  • Iteration 5 : recall score = 0.893939393939 
  •  
  • Mean recall score 0.909105589115 
  •  
  • Best model to choose from cross validation is with C parameter = 0.01 
  • 在应用机械进修算法的时刻,很重要的一部就是参数的调节,在这里我们选择应用最经典的分类算法,逻辑回归!切切别把逻辑回归当成是回归算法,它就是最实用的二分类算法!这里我们须要推敲的c参数就是正则化处罚项的力度,那么若何选择到最好的参数呢?这里我们就须要交叉验证啦,然后用不合的C参数去跑雷同的数据,目标就是去看看啥样的C参数可以或许使得最终模型的效不雅最好!可以到不合的参数对最终的结不雅产生的影响照样蛮大年夜的,这里最好的办法就是悠揭捉?证集去寻找了!

    模型已经造出来了,那么怎么评判哪个模型好,哪个模型不好呢?我们这里须要好好想一想!

    一般都是用精度来衡量,也就是常说的精确率,然则我们来想一想,我们的目标是什么呢?是不是要检测出来那些异常的样本呀!换个例子来说,假如如今病院给了我们一个义务要检测出来1000个病攘闼楝有癌症的那些人。那么假设数据集中1000小我中有990个无癌症,只有10个有癌症,我们须要把这10小我检测出来。假设我们用精度来衡量,那么即便这10小我没检测出来,也是有 990/1000 也就是99%的精度,然则这个模型却没任何价值!这点是异常重要的,因为不合的评估办法会得出不合的谜底,必定要根据问题的本质,去选择最合适的评估办法。


      推荐阅读

      关于火热的「人工智能」,这里有你关心的N个问题的解答

    人工智能火了相当长一阵子,很多本钱、创颐魅者、大年夜小公司似乎都在追逐这可贵的风口,特别是李开复师长教师在多个公共场所宣传人工智能概念之后,到处可见的都是关于人工智能的报道和>>>详细阅读


    本文标题:Python机器学习实战:信用卡欺诈检测

    地址:http://www.17bianji.com/lsqh/34721.html

    关键词: 探索发现

    乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

    网友点评
    自媒体专栏

    评论

    热度

    精彩导读
    栏目ID=71的表不存在(操作类型=0)