高斯分佈的機率密度函數php
numpy中dom
numpy.random.normal(loc=0.0, scale=1.0, size=None) 函數
參數的意義爲:spa
loc:floatcode
機率分佈的均值,對應着整個分佈的中心centerorm
scale:floatblog
機率分佈的標準差,對應於分佈的寬度,scale越大越矮胖,scale越小,越瘦高ci
size:int or tuple of intsget
輸出的shape,默認爲None,只輸出一個值it
咱們更常常會用到np.random.randn(size)所謂標準正太分佈(μ=0, σ=1),對應於np.random.normal(loc=0, scale=1, size)