askvity

How Do You Calculate Normalized Mean Square Error?

Published in Signal Processing Metrics 4 mins read

Normalized Mean Square Error (NMSE) is calculated by dividing the Mean Square Error (MSE) by the power of the input signal. Specifically, based on the provided reference, NMSE is defined by the formula NMSE=ET. E / XT. X, where X is the column vector of the input signal and E is the column vector of the error signal.

Understanding the Formula

The reference provides a specific definition of NMSE as the ratio of the squared error signal magnitude to the squared input signal magnitude. Let's break down the components:

  • X: This represents the column vector of the original or input signal. If your signal is a sequence of values, X is a vector containing these values.
  • E: This represents the column vector of the error signal. The error signal is typically the difference between the original/input signal (X) and a processed or estimated version of that signal (let's call it Y). So, E = X - Y.
  • XT: This is the transpose of the column vector X, making it a row vector.
  • ET: This is the transpose of the column vector E, making it a row vector.
  • XT. X: This is the dot product of the row vector XT and the column vector X. For a vector X = [x₁, x₂, ..., x${n}$]T, XT. X = x₁² + x₂² + ... + x${n}$². This sum of squares represents the energy of the signal X over the duration considered. Dividing by the number of elements would give the average power, but in this context, XT. X is often referred to as the signal power or energy for normalization purposes.
  • ET. E: Similarly, this is the dot product of ET and E. For a vector E = [e₁, e₂, ..., e${n}$]T, ET. E = e₁² + e₂² + ... + e${n}$². This represents the total squared error.

The Ratio

The formula NMSE=ET. E / XT. X calculates the total squared error relative to the total squared signal magnitude. This normalizes the error measure, providing a scale-independent metric of performance.

As stated in the reference, this particular form is known as MSE normalized by signal power. While the general definition of MSE often involves dividing the sum of squared errors by the number of data points, this normalization method specifically uses the signal's "power" (sum of squares) as the divisor.

Practical Calculation Steps

To calculate NMSE using this method for a signal X and an estimated signal Y:

  1. Calculate the Error Signal (E): Subtract the estimated signal Y from the input signal X point by point.
    • E = X - Y
  2. Calculate the Squared Magnitude of the Error Signal (ET. E): Sum the squares of all elements in the error vector E.
    • ET. E = Σ (e$_{i}$
  3. Calculate the Squared Magnitude of the Input Signal (XT. X): Sum the squares of all elements in the input vector X.
    • XT. X = Σ (x$_{i}$
  4. Divide the Squared Error Magnitude by the Squared Input Magnitude:
    • NMSE = (ET. E) / (XT. X)

This calculation provides a single value representing the normalized mean square error. A lower NMSE value indicates better performance, meaning the error signal E is small relative to the input signal X.

Related Articles