bernoulli_Python-Bernoulli发行
bernoulli
Python-Bernoulli發行 (Python - Bernoulli Distribution)
The Bernoulli distribution is a special case of the Binomial distribution where a single experiment is conducted so that the number of observation is 1. So, the Bernoulli distribution therefore describes events having exactly two outcomes.
伯努利分布是二項分布的一種特例,在該二項分布中進行了一次實驗,因此觀察次數為1。因此,伯努利分布描述的事件恰好具有兩個結果。
We use various functions in numpy library to mathematically calculate the values for a bernoulli distribution. Histograms are created over which we plot the probability distribution curve.
我們在numpy庫中使用各種函數來數學計算bernoulli分布的值。 將創建直方圖,在該直方圖上繪制概率分布曲線。
from scipy.stats import bernoulli import seaborn as sbdata_bern = bernoulli.rvs(size=1000,p=0.6) ax = sb.distplot(data_bern,kde=True,color='crimson',hist_kws={"linewidth": 25,'alpha':1}) ax.set(xlabel='Bernouli', ylabel='Frequency')Its output is as follows ?
其輸出如下-
翻譯自: https://www.tutorialspoint.com/python_data_science/python_bernoulli_distribution.htm
bernoulli
總結
以上是生活随笔為你收集整理的bernoulli_Python-Bernoulli发行的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: .Net 垃圾回收机制原理(一)
- 下一篇: linux内核丢弃udp报文,内核udp