Consider the geometric range space where $X \subset ^dddX$ is the disjoint union of a red and blue set. For each halfspace define a function that measures the “difference” between the fraction of red and fraction of blue points which fall in the range . In this context the maximum discrepancy problem is to find the $h^* = \arg \max{h \in (X, _d)} \Phi(h)\hat{h}\Phi(h^*) - \Phi(\hat{h}) \le \varepsilon$. This is the central problem in linear classification for machine learning, in spatial scan statistics for spatial anomaly detection, and shows up in many other areas. We provide a solution for this problem in $O(|X| + (1/\varepsilon^d) \log^4 (1/\varepsilon))$ time, which improves polynomially over the previous best solutions. For we show that this is nearly tight through conditional lower bounds. For different classes of we can either provide a time lower bound for the exact solution with a reduction to APSP, or an lower bound for the approximate solution with a reduction to 3SUM. A key technical result is a -approximate halfspace range counting data structure of size with $O(\log (1/\varepsilon))O(|X| + (1/\varepsilon^d) \log^4 (1/\varepsilon))$ time.

生成讲解博客的中文版本

生成AI智能校验的中文版本