dataFrame.columns.stat — rootMeanSquareError()
Description
The rootMeanSquareError() method of the stat object computes the root mean square error (RMSE) between two selected columns.
Signature
dataFrame.columns(...columnNames).stat.rootMeanSquareError({ ddof: 0 })Arguments
...columnNames( string[] )- The name of the columns from which to compute the root mean square error.
options(object)- RMSE computation options.
Option
ddof(number)- Delta degrees of freedom used in the denominator. (Default:
0.)
Returns
rootMeanSquareError(number)- The computed root mean square error.
Notes
- The method requires exactly two selected columns.
- The first selected column is interpreted as the observed values.
- The second selected column is interpreted as the predicted values.
- RMSE is computed from the residuals between corresponding observations.
- Lower values indicate better agreement between the two columns.
- A value of
0indicates a perfect fit. - Larger errors have a greater influence on RMSE than on mean absolute error because errors are squared before averaging.
- The ddof parameter adjusts the denominator from
nton - ddof.
Example
// calculate the RMSE between the values of 2 columns of the dataFrame
var rootMeanSquareError = dataFrame.columns('group_1', 'group_2').stat.rootMeanSquareError();
// log the RMSE
notebook.log(rootMeanSquareError);