Class HarmonicMeanAggregator


  • public class HarmonicMeanAggregator
    extends StatisticalCharacterizationAggregator
    StatisticalCharacterizationAggregator corresponding to the HarmonicMean model class which computes the harmonic mean of a sequence of measurements (discrete case) or a function with respect to an interval (continuous case):
    In the discrete case this is simply the reciprocal of the arithmetic mean of the reciprocals of the measurements.
    Note that it is not defined if any of the measurements is exactly 0. In such a case this implementation returns 0.

    In the continuous case, this aggregator approximates the integral HM=(b-a) ⁄ ∫dx/f(x) where a and b are upper and lower interval bound and the integration is carried out from a to b, and the (positive) function f is interpolated from a given (finite) set of samples (i.e., measurements).
    See Also:
    https: //math.stackexchange.com/questions/9007/harmonic-mean-and-logarithmic-mean