random tools in statistical theory

random tools in statistical theory


- w parameter initialize with standard distribution

import numpy as np

np.random.normal(0,1.0,(r,c))      # 0 : mean ;  1.0 : standard deviation ; r : height of matrix of w ;

np.random.randn(r,c)

np.random.standard_normal((r,c))


- b parameter initialize with 0

np.zeros((r,c))


扫描二维码关注公众号,回复: 880244 查看本文章

- np.random.uniform(0,1.0,10)   # 0 : low ;  1.0 : high ; 10 : number of output


- np.random.binomial(1,0.5)     # 二项式分布;输出像扔硬币结果:0 或者1











猜你喜欢

转载自blog.csdn.net/honk2012/article/details/80262569