MSE
Returns a table that displays the mean squared error of the prediction and response columns in a machine learning model.
Syntax
MSE ( targets, predictions ) OVER()
Arguments
targets |
The model response variable, of type FLOAT. |
predictions |
A FLOAT input column that contains predicted values for the response variable. |
Examples
Execute the MSE function on input table faithful_testing
. The response variables appear in the column obs
, while the prediction variables appear in the column prediction
.
=> SELECT MSE(obs, prediction) OVER() FROM (SELECT eruptions AS obs, PREDICT_LINEAR_REG (waiting USING PARAMETERS model_name='myLinearRegModel') AS prediction FROM faithful_testing) AS prediction_output; mse | Comments -------------------+----------------------------------------------- 0.252925741352641 | Of 110 rows, 110 were used and 0 were ignored (1 row)