MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / anderson_darling

Function anderson_darling

tensorflow/python/kernel_tests/random/util.py:92–99  ·  view source on GitHub ↗

Anderson-Darling test for a standard normal distribution.

(x)

Source from the content-addressed store, hash-verified

90
91
92def anderson_darling(x):
93 """Anderson-Darling test for a standard normal distribution."""
94 x = np.sort(np.ravel(x))
95 n = len(x)
96 i = np.linspace(1, n, n)
97 z = np.sum((2 * i - 1) * np.log(normal_cdf(x)) +
98 (2 * (n - i) + 1) * np.log(1 - normal_cdf(x)))
99 return -n - z / n
100
101
102def test_truncated_normal(assert_equal, assert_all_close, n, y,

Callers

nothing calls this directly

Calls 4

normal_cdfFunction · 0.85
sortMethod · 0.45
sumMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected