0. error function

erf(x)=1π∫−xxe−t2dt" role="presentation">erf(x)=1π−−√∫x−xe−t2dterf(x)=1π∫−xxe−t2dt

python 下的 math 标准库定义着 erf 的实现。

1. 从 error function 到标准正态分布 cdf 的实现

标准正态分布的累积分布函数无法用基本的解析形式表示,但却可通过的简单形式变换而计算得到:

Φ(x)=12+12erf⁡(x/2)=12erfc⁡(−x/2)" role="presentation">Φ(x)=12+12erf(x/2–√)=12erfc(−x/2–√)Φ(x)=12+12erf⁡(x/2)=12erfc⁡(−x/2)

2. python 实现

def phi(x, mu=0, sigma=1):
return (1 + math.erf((x-mu) / math.sqrt(2) / math.sqrt(sigma)))/2

Gauss error function的更多相关文章

  1. 转:ORA-15186: ASMLIB error function = [asm_open], error = [1], 2009-05-24 13:57:38

    转:ORA-15186: ASMLIB error function = [asm_open], error = [1], 2009-05-24 13:57:38http://space.itpub. ...

  2. Hive错误:Error: FUNCTION 'NUCLEUS_ASCII' already exists. (state=X0Y68,code=30000)

    问题 初始化derby失败: [root@bigdata111 apache-hive-2.3.0-bin]# schematool -dbType derby -initSchemaSLF4J: C ...

  3. LR接口性能测试提示Code - 60990 Error: Two Way Communication Error: Function two_way_comm_post_message / two_ (转载)

    一.在做JAVA接口性能测试时,场景在运行中出现:Code - 60990 Error: Two Way Communication Error: Function two_way_comm_post ...

  4. 机器学习 损失函数(Loss/Error Function)、代价函数(Cost Function)和目标函数(Objective function)

    损失函数(Loss/Error Function): 计算单个训练集的误差,例如:欧氏距离,交叉熵,对比损失,合页损失 代价函数(Cost Function): 计算整个训练集所有损失之和的平均值 至 ...

  5. complementary error function

    首先正态分布的概率密度函数为: P{|X-μ|<σ}=2Φ(1)-1=0.6826,  P{|X-μ|<2σ}=2Φ(2)-1=0.9544,  P{|X-μ|<3σ}=2Φ(3)- ...

  6. Compiler Error: Function call with parameters that may be unsafe

    如下的代码: #include <stdio.h> #include <string> #include <algorithm> #include <cass ...

  7. ERROR Function not available to this responsibility.Change responsibilities or contact your System Administrator.

    APPLIES TO: Navigation:  Help > Diagnostics > Custom Code > Personalize  or  Help > Diag ...

  8. error: function declaration isn’t a prototype [-Werror=strict-prototypes]

    "warning: function declaration isn't a prototype" was caused by the function like that:   ...

  9. /include/caffe/common.cuh(9): error: function "atomicAdd(double *, double)" has already been defined

    https://stackoverflow.com/questions/39274472/error-function-atomicadddouble-double-has-already-been- ...

随机推荐

  1. EF - Database First 开发方式

    概述 Database First 又叫数据库优先的开发方式,是一种比较旧的开发方式,现在越来越多的企业已经不再使用此种开发方式. 当然,对于一些旧项目进行升级,在已经有了数据库的情况下,使用此种方式 ...

  2. 数据库恢复(database restore)之兵不血刃——半小时恢复客户数据库

    昨天,一个客户打打来电话,说他们的数据库坏了,不能用了,需要我帮助恢复下,这马上要放假了,居然出了这事儿,自己也不太喜欢恢复数据库这类,尤其是他们的数据库是个win上的库,但心里很清楚,客户比咱着急, ...

  3. 利用神经网络进行网络流量识别——特征提取的方法是(1)直接原始报文提取前24字节,24个报文组成596像素图像CNN识别;或者直接去掉header后payload的前1024字节(2)传输报文的大小分布特征;也有加入时序结合LSTM后的CNN综合模型

    国外的文献汇总: <Network Traffic Classification via Neural Networks>使用的是全连接网络,传统机器学习特征工程的技术.top10特征如下 ...

  4. vue2.0 transition 手风琴

    <div class="food"> <button @click="show=!show">show</button> & ...

  5. python3- __slots__

    Python允许在定义class的时候,定义一个特殊的__slots__变量,来限制该class实例能添加的属性: class Student(object): __slots__ = ('name' ...

  6. 由于 Exception.tostring()失败,因此无法打印异常字符串

    console程序执行错误时,不显示异常信息. 解决方法: 在命令行修改显示字符格式  chcp 936

  7. 【Loadrunner_WebService接口】对项目中的GetProduct接口生成性能脚本

    一.环境 https://xxx.xxx.svc?wsdl 用户名:username 密码:password 对其中的GetProduct接口进行测试 备注:GetProducts.xml文件内容和S ...

  8. python 自然语言处理(三)____条件频率分布

    条件频率分布就是频率分布的集合,每个频率分布有一个不同的“条件”,这个条件通常是文本的类别.当语料文本分为几类(文体,主题,作者等)时,可以计算每个类别独立的频率分布,这样,就可以通过条件频率分布研究 ...

  9. python-列表,元组,range

    # 列表# lst = ["光头强", 1, True, {}, (1, ), {123}, ["周杰伦",[], "周杰", " ...

  10. day17-json格式转换

    Json简介:Json,全名 JavaScript Object Notation,是一种轻量级的数据交换格式.Json最广泛的应用是作为AJAX中web服务器和客户端的通讯的数据格式.现在也常用于h ...