Formula for "Relative absolute error" and "Root relative squared error" used in machine learning (as computed by Weka)

Rasto picture Rasto · May 27, 2012 · Viewed 17.7k times · Source

In open source data mining software Weka (written in Java), when I run some data mining algorithm like Linear regression Weka returns model and some model evaluating metrics for test data.

It looks like this:

Correlation coefficient                  0.2978
Mean absolute error                     15.5995
Root mean squared error                 29.9002
Relative absolute error                 47.7508 %
Root relative squared error             72.2651 %

What is the formula for "Relative absolute error" and "Root relative squared error"? I cannot figure that out. I would like to use this metrics to evaluate my own algorithms in Matlab.

Answer

Christopher Chiche picture Christopher Chiche · May 27, 2012

From this presentation, in slide 22, and citing witten, here are the formulas:

Relative absolute error formula absolute

Root relative squared error formula relative

with

  • Actual target values: a1 a2 … an
  • Predicted target values: p1 p2 … pn