【机器学习】异常点检测_sklearn

这篇博客探讨了机器学习中的异常值检测,包括Novelty和Outlier的区别。重点介绍了sklearn库中的一类SVM(OneClassSVM)、椭圆包络(EllipticEnvelope)、隔离森林(Isolation Forest)和局部异常因子(Local Outlier Factor)等方法,并对这些方法进行了对比。同时提到了其他如正态分布、马氏距离和DBSCAN等异常检测方法。
摘要由CSDN通过智能技术生成

异常值检测方法可以用于寻找/判断outlier样本极度不平衡二分类
sklearn提供了几种异常值检测方法
说明:2.7. Novelty and Outlier Detection
例子:Outlier detection with several methods

注意Novelty和Outlier的区别

novelty detection:
  The training data is not polluted by outliers, and we are interested in detecting anomalies in new observations.
outlier detection:
  The training data contains outliers, and we need to fit the central mode of the training data, ignoring the deviant observations.

即Novelty Detection要求所有训练数据都是正常的,不包含异常点,模型用于探测新加入的点是否异常;OneClassSVM属于此类
而Outlier Detection允许训练数据中有异常点,模型会尽可能适应训练数据而忽视异常点;EllipticEnvelopeIsolationForestLocalOutlierFactor属于此类

OneClassSVM

一分类SVM,等同于SVDD,sklearn中为svm.OneClassSVM,参考

无监督︱异常、离群点检测 一分类——OneClassSVM
SVDD(Support Vector Domain Description) 支持向量数据域描述(2)
sklearn官方文档-OneClassSVM

class sklearn.svm.OneClassSVM(kernel=’rbf’, degree=3, gamma=’auto’, coef0=0.0, tol=0.001, nu=0.5, shrinking=True, cache_size=200, verbose=False, max_iter=-1, random_state=None)
-

基本思想:确定一个超球体,使得球尽可能小,而又包含了尽可能多的点,球内视为正,球外视为异常。则目标函数

F(R,a
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值