Skip to Main Content
Python 机器学习实践:测试驱动的开发方法
book

Python 机器学习实践:测试驱动的开发方法

by Matthew Kirk
January 2018
Intermediate to advanced content levelIntermediate to advanced
211 pages
8h 31m
Chinese
China Machine Press
Content preview from Python 机器学习实践:测试驱动的开发方法
朴素贝叶斯分类
45
欺诈性的,并且雇用客户服务代表相应的开销约为每小时
15
美元,那么每年总共需
要花费
200
小时和
3000
美元。
解决这个问题的另一种方法是想办法确定一个订单是欺诈订单的概率超过
50%
。在这
种情况下,我们希望减少必须要查看的订单数量。但这正是使得事情变得困难的地方,
因为我们唯一可以确定的是它是欺诈订单的概率为
10%
。鉴于这种情况,我们又回到
了原点,需要检查所有订单,因为它们不是欺诈订单的可能性更大。
假设我们知道欺诈订单通常使用礼品卡和多个促销代码。通过这些信息,我们如何确
定一个订单是否为欺诈订单,也就是说我们如何根据购买者使用礼品卡这个条件来确
定这个订单是一个欺诈订单的概率?
要回答这个问题,我们首先要来谈谈条件概率。
条件概率
大多数人理解我们所说的某一事件发生的概率。例如,一个订单是欺诈订单的概率是
10%
。这很简单直接。但是对应一个使用礼品卡的订单,它是欺诈性的概率是多少呢?
为了处理更复杂的问题,我们需要引入条件概率,定义如下:
公式
4-1
:条件概率
first place. Assuming that it takes up to 60 seconds per order to determine whether
it’s fraudulent or not, and a customer service representative costs around $15 per
hour to hire, that totals 200 hours and $3,000 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Python for Bioinformatics

Mastering Python for Bioinformatics

Ken Youens-Clark

Publisher Resources

ISBN: 9787111581666