Computing deviations
StatsBase.jl provides various functions to compute deviations between two datasets. This can be calculated using other functions, but to facilitate and for ease of use, StatsBase provides these efficiently implemented functions:
Mean absolute deviation: For two datasets,
a
andb
, it is calculated asmeanad(x,y)
which is a wrapper overmean(abs(x-y))
.Maximum absolute deviation: For two datasets,
a
andb
, it is calculated asmaxad(x,y)
, which is a wrapper overmaximum(abs(x-y))
.Mean squared deviation: For two datasets,
a
andb
, it is calculated asmsd(x,y)
, which is a wrapper overmean(abs2(x-y))
.Root mean squared deviation: For two datasets,
a
andb
, it is calculated asrmsd(a,b)
, which is a wrapper oversqrt(msd(a, b))
.