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. Git的安装和创建版本库

    1.Git是分布式版本控制系统 2.安装Git 下载Git后,按照默认设置即可实现安装,安装完毕后点击git目录下的Git Bash 输入以下命令符: git config --global user ...

  2. struts项目部署在Tomca上在断网情况下启动报错

    转载请注明出处:http://www.cnblogs.com/Joanna-Yan/p/6015693.html 前段时间,项目部署到现场后,反馈Tomcat能正常启动,但是项目有时访问不了也不报错. ...

  3. Struts 2 初步入门(三)

    接Struts 2初步入门(二) 若想用多个通配符设定访问: <struts> <package name="default" namespace="/ ...

  4. SpringMVC中JSP页面显示为源码

    @RequestMapping(value = "login") public ModelAndView login(ModelAndView mav) throws Except ...

  5. POJ 1390 Blocks(记忆化搜索+dp)

    POJ 1390 Blocks 砌块 时限:5000 MS   内存限制:65536K 提交材料共计: 6204   接受: 2563 描述 你们中的一些人可能玩过一个叫做“积木”的游戏.一行有n个块 ...

  6. learning ddr pagesize calculate

    example: if DDR is 512MB*16*8 COLBITS = 10,  A0-A9 be used for cloumn address. ORG = 16 ,  each bank ...

  7. day25-python操作redis一

    1.     Python操作nosql数据库 NoSQL,泛指非关系型的数据库.随着互联网web2.0网站的兴起,传统的关系数据库在应付web2.0网站,特别是超大规模和高并发的SNS类型的web2 ...

  8. sqlalchem表关联(一对多,一对一,多对多)

    简介: 一:一对多关系 1.表示一对多的关系时,在子表类中通过 foreign key (外键)限制本列的值,然后,在父表类中通过 relationship() 方法来引用子表的类. 2.示例代码: ...

  9. maven scope和项目发布需要注意的地方

    Maven Scope的使用: http://www.cnblogs.com/wangyonghao/p/5976055.html servlet-api和jsp-api等jar包,一般由servle ...

  10. Android : 输入设备键值从底层到应用层的映射流程

    一.Android输入子系统简介: Android输入事件的源头是位于/dev/input/下的设备节点,而输入系统的终点是由WMS管理的某个窗口.最初的输入事件为内核生成的原始事件,而最终交付给窗口 ...