read.cash Log in
h@hbkedge

龍家俊教你 機器學習 day32 #正態分佈創建方式 np.random.randn(d0, d1, …, dn) 功能:從標準正態分佈中返回一個或多個樣本值 np.random.normal(loc=0.0, scale=1.0, size=None) loc:float ​ 此概率分佈的均值(對應著整個分佈的中心centre) scale:float ​ 此概率分佈的標準差(對應於分佈的寬度,scale越大越矮胖,scale越小,越瘦高) size:int or tuple of ints ​ 輸出的shape,默認為None,只輸出一個值 np.random.standard_normal(size=None) 返回指定形狀的標準正態分佈的數組。 舉例:生成均值為1.75,標準差為1的正態分佈數據,1000個 x1 = np.random.normal(1.75, 1, 1000)

No comments yet

Log in to join in Reading is open to everyone. Replying needs an account.