机器学习笔记(十四):异常检测

目录

1)Problem motivation

2)Gaussian distribution

3)Algorithm

4)Developing and evaluating an anomaly detection system

5)Anomaly detection vs. supervised learning

6)Choosing what features to use


1)Problem motivation

下面是异常检测的两个例子:识别欺骗和检测数据中心

2)Gaussian distribution

我们来回顾一下大学时学的高斯分布:

                                                                   p(x;u;\sigma)=\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{(x-u)^2}{2\sigma^2}}

下面是高斯分布的例子:

在实际应用中,我们可以这样求参数:

\mu =\frac{1}{m}\sum_{i=1}^{m}x^{(i)}

\sigma^2=\frac{1}{m}\sum_{i=1}^{m}(x^{(i)}-\mu)^2

3)Algorithm

1.数据集:{x^{1},x^{2},...,x^{m}}

2.计算每一个特征的\mu;\sigma^2;

3.概率计算:p(x)=\prod_{j=1}^{n}p(x_j;\mu_j;\sigma^2_j)

4)Developing and evaluating an anomaly detection system

具体的评价方法如下:

1)根据训练集数据,我们估计特征的平均值和方差并构建模型;

2)对交叉验证集,我们尝试使用不同的\varepsilon作为阈值,并根据F1值或者准确率与召回率选择阈值;

3)在测试集上进行预测;

5)Anomaly detection vs. supervised learning

6)Choosing what features to use

1)将数据转换为高斯分布;

2)误差分析;

3)构建新特征;

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/440072.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【Gym - 101606F】Flipping Coins(概率dp)

题干: Here’s a jolly and simple game: line up a row of N identical coins, all with the heads facing down onto the table and the tails upwards, and for exactly K times take one of the coins, toss it into the air, and replace it as it lands eith…

ROS actionlib学习(一)

actionlib是ROS中一个很重要的功能包集合,尽管在ROS中已经提供了srevice机制来满足请求—响应式的使用场景,但是假如某个请求执行时间很长,在此期间用户想查看执行的进度或者取消这个请求的话,service机制就不能满足了&#xff0c…

机器学习笔记(十五):推荐系统

目录 1)Problem formulation 2)Content-based recommendations 3)Collaborative filtering 4)Collaborative filtering algorithm 5)Vectorization: Low rank matrix factorization 6)Implementation…

*【CodeForces - 280C】Game on Tree(期望模型,期望的线性性)

题干: Momiji has got a rooted tree, consisting of n nodes. The tree nodes are numbered by integers from 1 to n. The root has number 1. Momiji decided to play a game on this tree. The game consists of several steps. On each step, Momiji chooses…

武侠风云(基础版)

基本任务: 1 建立角色类,角色拥有生命值的属性和攻击的方法,攻击值是随机的。 2 建立职业子类,刀客,(伤害少,血量多)剑客(伤害正常,血量正常,有几…

机器学习笔记(十六):大规模机器学习

目录 1)Learning with large datasets 2)Stochastic gradient descent 3)Mini-batch gradient descent 4)Stochastic gradient descent convergence 1)Learning with large datasets 回顾一下我们之前提到的这句…

【ZOJ - 3329】One Person Game(带循环的概率dp,数学期望,高斯消元,数学)

题干: There is a very simple and interesting one-person game. You have 3 dice, namely Die1, Die2 and Die3. Die1 has K1 faces. Die2 has K2 faces. Die3 has K3 faces. All the dice are fair dice, so the probability of rolling each value, 1 to K1, K…

智能聊天机器人系统

# 智能聊天机器人系统 # 1.系统简介 # 随着社会的各个公司以及大学对人工智能技术的深入研究和快速发展,人工智能技术将逐步应用到 # 方方面面。智能聊天机器人系统是基于各类传感器收集人类语音数据(智能电视、智能空调, # 智能冰箱、智能音…

机器学习笔记:总结

下面是我们本课程学到的要点: 1)监督学习:线性回归,逻辑回归,神经网络,SVM; 2)无监督学习:k均值,PCA,异常检测 3)特别应用&#xf…

ROS探索总结(十二)——坐标系统

在机器人的控制中&#xff0c;坐标系统是非常重要的&#xff0c;在ROS使用tf软件库进行坐标转换。 相关链接&#xff1a;http://www.ros.org/wiki/tf/Tutorials#Learning_tf 一、tf简介 我们通过一个小小的实例来介绍tf的作用。 1、安装turtle包 <span>$ rosdep instal…

【BZOJ - 3036】绿豆蛙的归宿(概率DAG图dp,拓扑排序,概率dp,期望的线性性)

题干&#xff1a; 随着新版百度空间的下线&#xff0c;Blog宠物绿豆蛙完成了它的使命&#xff0c;去寻找它新的归宿。 给出一个有向无环的连通图&#xff0c;起点为1终点为N&#xff0c;每条边都有一个长度。绿豆蛙从起点出发&#xff0c;走向终点。 到达每一个顶点时&#x…

【LightOJ - 1079】Just another Robbery(概率dp,概率背包)

题干&#xff1a; As Harry Potter series is over, Harry has no job. Since he wants to make quick money, (he wants everything quick!) so he decided to rob banks. He wants to make a calculated risk, and grab as much money as possible. But his friends - Hermi…

强烈推荐的TensorFlow、Pytorch和Keras的样例资源(深度学习初学者必须收藏)

目录 一、TensorFlow 二、Keras 三、Pytorch 总结 本文转自微信公众号&#xff1a;机器学习初学者 原创&#xff1a; 机器学习初学者 机器学习初学者 TensorFlow、Keras和Pytorch是目前深度学习的主要框架&#xff0c;也是入门深度学习必须掌握的三大框架&#xff0c;但…

【LightOJ - 1027】A Dangerous Maze(概率dp,数学期望)

题干&#xff1a; You are in a maze; seeing n doors in front of you in beginning. You can choose any door you like. The probability for choosing a door is equal for all doors. If you choose the ith door, it can either take you back to the same position wh…

由浅到深理解ROS(2)

ROS文件系统 用户可以直接参看官网&#xff1a; http://wiki.ros.org/ROS/Tutorials/NavigatingTheFilesystem ROS文件系统中的两个最基本的概念&#xff1a;Package和Manifest&#xff0c;即包和清单文件。 &#xff08;1&#xff09;Package是组织ROS代码的最基本单位&…

Django员工管理系统

Django员工管理系统&#xff08;ems&#xff09; 需求分析&#xff1a; 1.实现管理员的注册、登陆页面注册&#xff1a;用户名、真实名字、密码、确认密码、性别、验证码用户名需要判断是否合法、是否存在&#xff0c;loading图片提示密码和确认密码是否相同&#xff0c;load…

【LightOJ - 1104】Birthday Paradox(概率,思维)

题干&#xff1a; Sometimes some mathematical results are hard to believe. One of the common problems is the birthday paradox. Suppose you are in a party where there are 23 people including you. What is the probability that at least two people in the party…

爬虫小记

中国商标网 找到正确的入口 在此页面加入全部data数据获取xhr请求包

【LightOJ - 1038】Race to 1 Again(概率dp,数学期望)

题干&#xff1a; Rimi learned a new thing about integers, which is - any positive integer greater than 1 can be divided by its divisors. So, he is now playing with this property. He selects a number N. And he calls this D. In each turn he randomly choose…

使用matplotlib进行简单的数据展示

import numpy as np import matplotlib.pyplot as plt# 解决中文乱码 plt.rcParams[font.sans-serif] [SimHei] # 用来正常显示中文标签 plt.rcParams[axes.unicode_minus] False # 用来正常显示负号# 建立一个坐标系 plt.subplot(1, 1, 1) # 指明x和y值 x np.array([1, 2…