Skip to contents

Calculates the per-observation squared error as $$ \left( t_i - r_i \right)^2. $$

Measure to compare true observed response with predicted response in regression tasks.

Note that this is an unaggregated measure, returning the losses per observation.


se(truth, response, ...)



True (observed) values. Must have the same length as response.


Predicted response values. Must have the same length as truth.


Additional arguments. Currently ignored.


Performance value as numeric(length(truth)).

Meta Information

  • Type: "regr"

  • Range (per observation): \([0, \infty)\)

  • Minimize (per observation): TRUE

  • Required prediction: response

See also

Other Regression Measures: ae(), ape(), bias(), ktau(), mae(), mape(), maxae(), maxse(), medae(), medse(), mse(), msle(), pbias(), rae(), rmse(), rmsle(), rrse(), rse(), rsq(), sae(), sle(), smape(), srho(), sse()