A fast approximation of the cumulative distribution function of the standard normal.
(x)
| 1048 | |
| 1049 | |
| 1050 | def approx_standard_normal_cdf(x): |
| 1051 | """ |
| 1052 | A fast approximation of the cumulative distribution function of the |
| 1053 | standard normal. |
| 1054 | """ |
| 1055 | return 0.5 * (1.0 + th.tanh(np.sqrt(2.0 / np.pi) * (x + 0.044715 * th.pow(x, 3)))) |
| 1056 | |
| 1057 | |
| 1058 | def discretized_gaussian_log_likelihood(x, *, means, log_scales): |
no outgoing calls
no test coverage detected