Lines Matching refs:discrepancy
22 Background: The discrepancy of the sample set i/(N-1); i=0, ..., N-1 is 2/N,
23 twice the discrepancy of the sample set (i+1/2)/N; i=0, ..., N-1. In our case
25 is not bounded (it is for Monte Carlo integration, where discrepancy was
43 def Discrepancy(samples, interval_multiplier=10000):
44 """Computes the discrepancy of a set of 1D samples from the interval [0,1].
49 http://mathworld.wolfram.com/Discrepancy.html
82 # Compute local discrepancy and update max_local_discrepancy.
91 """A discrepancy based metric for measuring jank.
97 Discrepancy(B) > Discrepancy(A).
99 Two variants of discrepancy can be computed:
101 Relative discrepancy is following the original definition of
102 discrepancy. It characterized the largest area of jank, relative to the
104 because the best case discrepancy for a set of N samples is 1/N (for
108 Absolute discrepancy also characterizes the largest area of jank, but its
115 absolute discrepancy, but D has lower relative discrepancy than C.
120 discrepancy = Discrepancy(samples, interval_multiplier)
123 # Compute absolute discrepancy
124 discrepancy /= sample_scale
126 # Compute relative discrepancy
127 discrepancy = Clamp((discrepancy-inv_sample_count) / (1.0-inv_sample_count))
128 return discrepancy