From Wikipedia, the free encyclopedia
Mathematic formula for deriving a mean
In mathematics, the Lehmer mean of a tuple x {\displaystyle x} of positive real numbers, named after Derrick Henry Lehmer,[1] is defined as:
The weighted Lehmer mean with respect to a tuple w {\displaystyle w} of positive weights is defined as:
The Lehmer mean is an alternative to power means for interpolating between minimum and maximum via arithmetic mean and harmonic mean.
The derivative of p ↦ L p ( x ) {\displaystyle p\mapsto L_{p}(\mathbf {x} )} is non-negative
thus this function is monotonic and the inequality
holds.
The derivative of the weighted Lehmer mean is:
Like a power mean, a Lehmer mean serves a non-linear moving average which is shifted towards small signal values for small p {\displaystyle p} and emphasizes big signal values for big p {\displaystyle p} . Given an efficient implementation of a moving arithmetic mean called smooth
you can implement a moving Lehmer mean according to the following Haskell code.
lehmerSmooth :: Floating a => ([a] -> [a]) -> a -> [a] -> [a] lehmerSmooth smooth p xs = zipWith (/) (smooth (map (**p) xs)) (smooth (map (**(p-1)) xs))
Gonzalez and Woods call this a "contraharmonic mean filter" described for varying values of p (however, as above, the contraharmonic mean can refer to the specific case p = 2 {\displaystyle p=2} ). Their convention is to substitute p with the order of the filter Q:
Q=0 is the arithmetic mean. Positive Q can reduce pepper noise and negative Q can reduce salt noise.[2]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4