RelativeRootMeanSquareError - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


SignalProcessing

  

RootMeanSquareError

  

calculate the root mean square error between two signals

  

RelativeRootMeanSquareError

  

calculate the relative root mean square error between two signals

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

RootMeanSquareError( X, Y )

RelativeRootMeanSquareError( X, Y )

Parameters

X, Y

-

rtables or lists of real or complex data.

Description

• 

The RootMeanSquareError command takes two rtables or lists of data with compatible dimensions, and returns the Root Mean Square Error (RMSE), which is the Root Mean Square (RMS) of the difference of X and Y. When X and Y are Vectors with n elements:

RootMeanSquareErrorX,Y=i=1nXiYi2n

• 

The RelativeRootMeanSquareError command takes two rtables or lists of data with compatible dimensions, and returns the Relative Root Mean Square Error (RRMSE), which is the Root Mean Square (RMS) of the difference of X and Y, divided by the RMS of Y. When X and Y are Vectors with n elements:

RelativeRootMeanSquareErrorX,Y=i=1nXiYi2ni=1nYi2n

• 

The advantage of using RRMSE over RMSE to quantify error is that the error is relative to the comparison container, which prevents relatively small errors from appearing large, and relatively large errors from appearing small.

• 

The inputs are converted to Arrays of float[8] or complex[8] datatype, and an error will be thrown if this is not possible. For this reason, it is most efficient for the inputs to already be rtables having the appropriate datatypes.

• 

The RelativeRootMeanSquareError and RootMeanSquareError commands are not thread safe.

Examples

withSignalProcessing:

Example 1

XVectorrow1,2,3

X123

(1)

YVectorcolumn4,5,6

Y456

(2)

RootMeanSquareErrorX,Y

3.00000000000000044

(3)

Example 2

X1.1,1.9,3.1

X1.11.93.1

(4)

Y1,2,3

Y1,2,3

(5)

RelativeRootMeanSquareErrorX,Y

0.0462910049886276140

(6)

Example 3

• 

In this example, the RMSE suggests two Vectors are very close (in the absolute sense), but the RRMSE shows that to not be the case (in the relative sense):

P0.00003,0.00004

P0.000030.00004

(7)

Q0.00001,0.00002

Q0.000010.00002

(8)

RootMeanSquareErrorP,Q

0.0000199999999999999982

(9)

RelativeRootMeanSquareErrorP,Q

1.26491106406735154

(10)

Example 4

• 

Here, the RMSE suggests two Vectors are not very close (in the absolute sense), but the RRMSE shows the Vectors are in fact pretty close (in the relative sense):

U503,604

U503604

(11)

V500,600

V500600

(12)

RootMeanSquareErrorU,V

3.53553390593273731

(13)

RelativeRootMeanSquareErrorU,V

0.00640184399664479788

(14)

Example 5

• 

Complex data is also supported:

AVector1,2I,datatype=complex8

A1.+0.I2.I

(15)

BVector3,4+I,datatype=complex8

B3.+0.I4.+I

(16)

RootMeanSquareErrorA,B

2.44948974278317788

(17)

PVector5,6,datatype=float8

P5.6.

(18)

QVector103I,7,datatype=complex8

Q10.3.I7.+0.I

(19)

RelativeRootMeanSquareErrorP,Q

0.470658036520967271

(20)

Compatibility

• 

The SignalProcessing[RootMeanSquareError] and SignalProcessing[RelativeRootMeanSquareError] commands were introduced in Maple 2021.

• 

For more information on Maple 2021 changes, see Updates in Maple 2021.

• 

The SignalProcessing[RootMeanSquareError] and SignalProcessing[RelativeRootMeanSquareError] commands were updated in Maple 2022.

See Also

SignalProcessing

SignalProcessing[Norm]

SignalProcessing[RootMeanSquare]