Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/r-utility-logp.R
This function calculates a base-2 logarithm of a probability value, returning a finite value for probability 0. It is used in examples presented in the book Cichosz, P. (2015): Data Mining Algorithms: Explained Using R. See Appendix B or http://www.wiley.com/go/data_mining_algorithms for more details.
1 | logp(p)
|
p |
a non-negative value or vector of values |
To avoid infinite results and the associated numerical problems for zero arguments, a finite result corresponding to the least possible positive argument is used.
If p>0
then log2(p)
and .Machine$double.min.exp
otherwise.
Pawel Cichosz <p.cichosz@elka.pw.edu.pl>
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.