Bernoulli distribution
Bernoulli(p) is a coin flip: 1 with probability p, 0 otherwise.
In ML papers
is a single yes/no trial: it gives 1 with probability and 0 with probability . Its mean is and its variance .
In ML it models binary labels (a sigmoid output is the of a Bernoulli, and the binary cross-entropy loss is its negative log-likelihood) and random masks. In dropout (Srivastava et al. 2014), each unit is kept according to , where is the probability of keeping a unit.
How to type it
| LaTeX | Shows |
|---|---|
\operatorname{Bernoulli}(p) | |
\operatorname{Bern}(p) |
A worked example
A dropout mask with keep probability keeps about 80 of every 100 units.
Common confusions
- Papers differ on whether is the probability of keeping or of dropping a unit in dropout; PyTorch's Dropout argument p is the drop probability.