Jump to content

User:NullPointerError/sandbox

From Wikipedia, the free encyclopedia

The median trick is a generic approach that increases the chances of a probabilistic algorithm to succeed.[1] Apparently first used in 1986[2] by Jerrum et al.[3] for approximate counting algorithms, the technique was later applied to a broad selection of classification and regression problems.[2]

The idea of median trick is very simple: run the randomized algorithm with numeric output multiple times, and use the median of the obtained results as a final answer. For example, if an algorithm takes a set of data as input, and has sublinear runtime, then the same algorithm can be run repeatedly (or in parallel) over randomly sampled subsets of input data, and, per Chernoff inequality, the median of the results will converge to solution rapidly.[4] Similarly, for the algorithms that are sublinear in space (e.g., counting the distinct elements of a stream), different randomizations of the algorithm (say, with different hash functions) may be used for repeated runs over the same data.[5]

Statement

[edit]

Given a set of independent random variables , and an unknown deterministic number .

Suppose that each random variable falls within with probability where is a constant, then the median trick states that with probability .

In other words, in order to ensure that with probability , it suffices to use samples.

Proof

Let be the indicator variable for the event that . Then, the event fails to occur only if at least half of , that is, .

By Hoeffding's inequality, this event occurs with probability .

Application to decision problems

[edit]

The median trick can also be adapted to amplify the success probability for decision problems, where a yes-no answer is required instead of a number. In this case, the results of multiple independent runs of a probabilistic algorithm are combined together using a majority vote.

The majority vote here is equivalent to taking the median of all numbers, by assigning the numbers 0 and 1 to the outputs no and yes. If the majority of voters respond with yes, the median is 1, and vice versa. In the case of a tie, the result can be chosen arbitrarily between yes or no.

References

[edit]
  1. ^ Kogler & Traxler 2017, p. 378.
  2. ^ a b Kogler & Traxler 2017, p. 380.
  3. ^ Jerrum, Valiant & Vazirani 1986, p. 182, Lemma 6.1.
  4. ^ Wang & Han 2015, p. 11.
  5. ^ Wang & Han 2015, pp. 17–18, Median Trick in Boosting Confidence.

Sources

[edit]
  • Kogler, Alexander; Traxler, Patrick (2017). "Parallel and Robust Empirical Risk Minimization via the Median Trick". Mathematical Aspects of Computer and Information Sciences. Cham: Springer International Publishing. doi:10.1007/978-3-319-72453-9_31. ISBN 978-3-319-72452-2. ISSN 0302-9743.
  • Jerrum, Mark R.; Valiant, Leslie G.; Vazirani, Vijay V. (1986). "Random generation of combinatorial structures from a uniform distribution". Theoretical Computer Science. 43. Elsevier BV: 169–188. doi:10.1016/0304-3975(86)90174-x. ISSN 0304-3975.
  • Wang, Dan; Han, Zhu (2015). "Basics for Sublinear Algorithms". Sublinear Algorithms for Big Data Applications. Cham: Springer International Publishing. doi:10.1007/978-3-319-20448-2_2. ISBN 978-3-319-20447-5. ISSN 2191-5768.