Function mad #

计算矩阵或值列表的中位数绝对偏差。中位数绝对偏差定义为与中位数之差的绝对值的 the median。

Syntax #

math.mad(a, b, c, ...)
math.mad(A)

Parameters #

Parameter Type Description
array Array | Matrix 单个矩阵或多个标量值。

Returns #

Type Description
* 中位数绝对偏差。

Throws #

Type | Description —- | ———–

Examples #

math.mad(10, 20, 30)             // returns 10
math.mad([1, 2, 3])              // returns 1
math.mad([[1, 2, 3], [4, 5, 6]]) // returns 1.5

另请参阅 #

median, mean, std, abs

Fork me on GitHub