sqerror - mean squared error

rlscore.measure.sqerror(Y, P)

Mean squared error.

A performance measure for regression problems. Computes the sum of (Y[i]-P[i])**2 over all index pairs, normalized by the number of instances.

If 2-dimensional arrays are supplied as arguments, then error is separately computed for each column, after which the errors are averaged.

Parameters:
Y : {array-like}, shape = [n_samples] or [n_samples, n_tasks]

Correct utility values, can be any real numbers

P : {array-like}, shape = [n_samples] or [n_samples, n_tasks]

Predicted utility values, can be any real numbers.

Returns:
error : float