2020李宏毅学习笔记——56.Anomaly Detection(6_7)

从图中可以看到,P(x)大的玩家可能是正常玩家(左上角的点),反之是异常玩家。
下面要像更加精确的用数字来表达这个事情,就要用的MLE:
Assuming the data points is sampled from a probability density function fθ(x)
θ determines the shape of fθ(x)
θ is unknown, to be found from data
在这里插入图片描述

1.数学计算类啊

在这里插入图片描述
要找θ∗ 使得PDF最大:
在这里插入图片描述
我们假设分布是高斯分布
在这里插入图片描述
这个分布看上去很复杂,但是我们只需要把它看做是输入为向量x,输出是这个向量x被sample到的几率。Input: vector x, output: probability density of sampling x.
θ which determines the shape of the function are mean μ and covariance matrix Σ
公式(1)就可以写成:
在这里插入图片描述
公式(2)可以写成:在这里插入图片描述在这里插入图片描述
注:当然,也可以假设参数θ不是高斯分布产生的,可以是更加复杂的网络参生的
μ ∗,Σ ∗ 可以直接根据MLE的公式算出来,直接贴结果:在这里插入图片描述
最后就可以把x代入下面的判断条件,来决定是否是异常玩家。在这里插入图片描述
可视化后:在这里插入图片描述
The colors represents the value of fμ∗,Σ∗(x) ,颜色月红越正常,越浅越异常。
由于我们是用向量来表示x,因此我们可以考虑不止两个维度:
x1 : Percent of messages that are spam (說垃圾話)
x2: Percent of button inputs during anarchy mode (無政府狀態發言)
x3 : Percent of button inputs that are START (按 START鍵)
x4 : Percent of button inputs that are in the top 1 group (跟大家一樣)
x5 : Percent of button inputs that are in the bottom 1 group (唱反調)
下面给三个实例,由于fμ∗,Σ∗(x)一般比较小,所以在前面加上log。
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值