Add mad accumulator for stats1 DSL function (#1561)

* Add `mad` accumulator for `stats1` DSL function

* regression files

* make dev output
This commit is contained in:
John Kerl 2024-05-11 15:55:27 -04:00 committed by GitHub
parent 5ac48516f7
commit 16ab199194
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 117 additions and 68 deletions

View file

@ -555,6 +555,7 @@ Options:
antimode Find least-frequently-occurring values for fields; first-found wins tie
sum Compute sums of specified fields
mean Compute averages (sample means) of specified fields
mad Compute mean absolute deviation
var Compute sample variance of specified fields
stddev Compute sample standard deviation of specified fields
meaneb Estimate error bars for averages (assuming no sample autocorrelation)
@ -1075,6 +1076,7 @@ Options:
antimode Find least-frequently-occurring values for fields; first-found wins tie
sum Compute sums of specified fields
mean Compute averages (sample means) of specified fields
mad Compute mean absolute deviation
var Compute sample variance of specified fields
stddev Compute sample standard deviation of specified fields
meaneb Estimate error bars for averages (assuming no sample autocorrelation)

View file

@ -1 +1 @@
mlr --oxtab stats1 -a mean,sum,count,min,max,antimode,mode -f i,x,y test/input/abixy
mlr --oxtab stats1 -a mean,sum,count,min,max,antimode,mode,mad -f i,x,y test/input/abixy

View file

@ -5,6 +5,7 @@ i_min 1
i_max 10
i_antimode 1
i_mode 1
i_mad 2.50000000
x_mean 0.45362938
x_sum 4.53629384
x_count 10
@ -12,6 +13,7 @@ x_min 0.03144188
x_max 0.75867996
x_antimode 0.34679014
x_mode 0.34679014
x_mad 0.17005656
y_mean 0.59445424
y_sum 5.94454242
y_count 10
@ -19,3 +21,4 @@ y_min 0.13418874
y_max 0.97618139
y_antimode 0.72680286
y_mode 0.72680286
y_mad 0.25930133