Rmse: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Chuck
No edit summary
imported>Chuck
No edit summary
 
Line 17: Line 17:
* '''Case A):''' '''y1''' is a matrix or vector
* '''Case A):''' '''y1''' is a matrix or vector
: err = rmse(y1);
: err = rmse(y1);
: The output '''err''' is the root mean square of the elements of 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'''
* '''Case B):''' '''y1''' is a matrix or vector, '''y2''' is the same size as '''y1'''
: err = rmse(y1,y2);
: 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 '''y1''' and '''y2'''.


* '''Case C):''' '''y1''' is a matrix or vector, '''y2''' is a column vector
* '''Case C):''' '''y1''' is a matrix or vector, '''y2''' is a column vector
: err = rmse(y1,y2);
: err = rmse(y1,y2);
: The output err is the root mean square of the difference between each column of y1 and 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'''.
: Example: For example, '''y2''' is a reference and the rmse is calculated between each column of '''y1''' and the vector '''y2'''.

Latest revision as of 10:07, 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 vectors or matrices contain matching model-estimated and known quantities, 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:

Input and Output Cases

  • 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