Rmse: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
imported>Chuck
No edit summary
Line 1: Line 1:
===Purpose===
===Purpose===


Calculate Root Mean Square Difference(Error).
Calculate Root Mean Square Difference (Error).


===Synopsis===
===Synopsis===


:err = rmse(y1,''y2'')
:err = rmse(y1,y2)


===Description===
===Description===
Line 12: Line 11:
RMSE is used to calculate the root mean square difference between two vectors or matrices. If the vector or matrix is from a model estimation and measurements then the output is the Root Mean Square Error (RMSE).
RMSE is used to calculate the root mean square difference between two vectors or matrices. If the vector or matrix is from a model estimation and measurements then the output is the Root Mean Square Error (RMSE).


Output depends on the input:
The output '''err''' depends on the input, and there are 3 possible cases, outlined below:
 
A) y1 is a matrix or vector
 
err = rmse(y1);
 
The output err is the root mean square of the elements of y1.
 
B) y1 is a matrix or vector, y2 the same size as y1
 
err = rmse(y1,y2);


The output err is the root mean square of the difference between y1 and y2.
====Inputs and Outputs====


C) y1 is a matrix or vector, y2 a column vector.
* '''Case A):''' '''y1''' is a matrix or vector
: err = rmse(y1);
: The output '''err''' is the root mean square of the elements of y1.


err = rmse(y1,y2);
* '''Case B):''' '''y1''' is a matrix or vector, '''y2''' is the same size as '''y1'''
: err = rmse(y1,y2);
: The output '''err''' is the root mean square of the difference between y1 and y2.


The output err is the root mean square of the difference between each column of y1 and y2.
* '''Case C):''' '''y1''' is a matrix or vector, '''y2''' is a column vector
: err = rmse(y1,y2);
: The output err is the root mean square of the difference between each column of y1 and y2.


For example, y2 is a reference and the RMSE is calculated between each column of y1 and the vector y2.
: Example: For example, '''y2''' is a reference and the rmse is calculated between each column of '''y1''' and the vector '''y2'''.


===See Also===
===See Also===


[[crossval]]
[[crossval]]

Revision as of 09:57, 9 October 2008

Purpose

Calculate Root Mean Square Difference (Error).

Synopsis

err = rmse(y1,y2)

Description

RMSE is used to calculate the root mean square difference between two vectors or matrices. If the vector or matrix is from a model estimation and measurements then the output is the Root Mean Square Error (RMSE).

The output err depends on the input, and there are 3 possible cases, outlined below:

Inputs and Outputs

  • Case A): y1 is a matrix or vector
err = rmse(y1);
The output err is the root mean square of the elements of y1.
  • Case B): y1 is a matrix or vector, y2 is the same size as y1
err = rmse(y1,y2);
The output err is the root mean square of the difference between y1 and y2.
  • Case C): y1 is a matrix or vector, y2 is a column vector
err = rmse(y1,y2);
The output err is the root mean square of the difference between each column of y1 and y2.
Example: For example, y2 is a reference and the rmse is calculated between each column of y1 and the vector y2.

See Also

crossval