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 and b, it is calculated as meanad(x,y) which is a wrapper over mean(abs(x-y)).
  • Maximum absolute deviation: For two datasets, a and b, it is calculated as maxad(x,y), which is a wrapper over maximum(abs(x-y)).
  • Mean squared deviation: For two datasets, a and b, it is calculated as msd(x,y), which is a wrapper over mean(abs2(x-y)).
  • Root mean squared deviation: For two datasets, a and b, it is calculated as rmsd(a,b), which is a wrapper over sqrt(msd(a, b)).

Get Julia for Data Science now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.