Skip to main content

Root Mean Square

rms(input: any[] | Mat | Tensor) : Number

param input a JS array, matrix or tensor, or a series of numbers, to find the root mean square of

returns - Number - a number representing the root mean square

The root mean square is a tool used in a variety of statistical analyses, including but not limited to RMSE (root mean square deviation), variance and more. It is basically the square root of the mean, where each mean variable value is squared. The formula and an example is below:

The root mean square formula is as follows (rms):

$$r = \sqrt{\frac{x_1^2 + ... + x_n^2}{n}}$$