MostLikelyMean v1#
Summary#
Computes the most likely mean of the array by minimizing the taxicab distance of the elements from the rest.
See Also#
Properties#
Name |
Direction |
Type |
Default |
Description |
|---|---|---|---|---|
InputArray |
Input |
dbl list |
Mandatory |
An input array. |
Output |
Output |
number |
The output (mean). |
Description#
This algorithm finds a so-called most-likely mean of an array being the element that has the minimum of the summed square-rooted absolute distances with all the other elements in the array:
\[MostLikelyMean(a) = a[minindex_{j}\sum_{i} \sqrt{|a_{i} - a_{j}|}]\]
Usage#
Example - MostLikelyMean
import numpy
array = numpy.arange(100)
mlm = MostLikelyMean(array)
print(mlm)
Output:
49.0
Categories: AlgorithmIndex | Arithmetic
Source#
C++ header: MostLikelyMean.h
C++ source: MostLikelyMean.cpp