Anomaly Detection

本文介绍了如何构建概率模型p(x)进行异常检测,并使用高斯分布作为基础模型。通过参数估计方法确定均值μ和方差σ²,进而利用密度估计判断数据点是否为异常值。文中还探讨了单变量与多变量高斯模型的区别及其应用场景。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

这里写图片描述
build a model for the probability of xp(x)
a small thresholdϵ
这里写图片描述


Gaussian(Normal) Distribution

x~N(μ,σ2)
p(x; μ,σ2)

这里写图片描述
这里写图片描述


Parameter estimation

if x(i)~N(μ,σ2)
then μ=1mmi=1x(i)
σ2=1mmi=1(x(i)μ)2

这里写图片描述


Density Estimation

这里写图片描述

p(x)=nj=1p(xj;μj,σ2j)


Anomaly Detection Algorithm

这里写图片描述
这里写图片描述


这里写图片描述


Evaluation

这里写图片描述

It doesn’t matter if there are actually some anomalous ones in training set.

这里写图片描述

The alternative one is not recommended.

这里写图片描述

We can choose ϵ,features and so on by examming F1 score.


这里写图片描述
这里写图片描述


Non-gaussian features
这里写图片描述

Try to do some transformation to our x until it looks more like Gaussian.


  • Choose Feature
    这里写图片描述

  • Create Features
    这里写图片描述


Multivariate Gaussian Distribution

Problem:
这里写图片描述

To solve it:
这里写图片描述
这里写图片描述

Then we got:
这里写图片描述
这里写图片描述

So here’s algorithm for Anomaly detection with multivariate Gaussian
这里写图片描述


The difference between the two models

这里写图片描述

This new model, using a multivariate Gaussian distribution, corresponds exactly to the old model, if the covariance matrix sigma, has only 0 elements off the diagonals, and in pictures that corresponds to having Gaussian distributions, where the contours of this distribution function are axis aligned. So you aren’t allowed to model the correlations between the diffrent features.

So in that sense the original model is actually a special case of this multivariate Gaussian model.

这里写图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值