Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 488
Rasto Avatar asked May 27 '12 19:05

Rasto


2 Answers

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
like image 82
Christopher Chiche Avatar answered Sep 18 '22 15:09

Christopher Chiche


The formula for Root Relative Squared Error is actually the formula for the Relative Squared Error. You need to take the square root of this formula to get what Weka outputs.

like image 37
sfurrow88 Avatar answered Sep 20 '22 15:09

sfurrow88