projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ecc2f3
)
Comment what log-logistic and logit-exp are for.
author
Taylor R Campbell
<campbell@mumble.net>
Wed, 31 Oct 2018 16:44:43 +0000
(16:44 +0000)
committer
Taylor R Campbell
<campbell@mumble.net>
Wed, 31 Oct 2018 16:44:43 +0000
(16:44 +0000)
src/runtime/arith.scm
patch
|
blob
|
history
diff --git
a/src/runtime/arith.scm
b/src/runtime/arith.scm
index 0adb24ef5e90e9a8a3fc0af1646bc19b9e13e1af..edf7ca3fec58343fd010c881f1ffd8f366f0b10b 100644
(file)
--- a/
src/runtime/arith.scm
+++ b/
src/runtime/arith.scm
@@
-2408,6
+2408,8
@@
USA.
(log (/ (+ 1/2 p-1/2) (- 1/2 p-1/2))))))
;;; log logistic(x) = log (1/(1 + e^{-x})) = -log (1 + e^{-x})
+;;;
+;;; This is the log density of the logistic distribution.
(define (log-logistic x)
(guarantee-real x 'log-logistic)
@@
-2419,6
+2421,8
@@
USA.
(flo:- 0. (flo:log (flo:+ 1. (flo:exp -1.)))))
;;; logit(e^t) = log e^t/(1 - e^t)
+;;;
+;;; Inverse of log logistic.
(define (logit-exp t)
(guarantee-real t 'logit-exp)