Description Usage Arguments Value Note Author(s) Examples
Similar to @seealso estimatePdf
, this function returns
the probability for a discrete value, given some observations.
1 | getProbForDiscrete(data, value)
|
data |
vector of observations that have the same type as the given value. |
value |
a single observation of the same type as the data vector. |
the probability of value given data.
If no observations are given, then this function will warn and return a probability of zero for the value given. While we could technically return positive infinity, 0 is more suitable in the context of Bayesian inferencing.
Sebastian Hönel sebastian.honel@lnu.se
1 2 | mmb::getProbForDiscrete(data = c(), value = iris[1,]$Species)
mmb::getProbForDiscrete(data = iris$Species, value = iris[1,]$Species)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.