Share via


RegressionMetrics.MeanSquaredError Property

Definition

Gets the squared loss of the model.

public double MeanSquaredError { get; }
member this.MeanSquaredError : double
Public ReadOnly Property MeanSquaredError As Double

Property Value

Remarks

The squared loss is defined as $L2 = \frac{1}{m} \sum_{i = 1}^m (y_i - \hat{y}_i)^2$, where $m$ is the number of instances in the test set, \hat{y}_i are the predicted labels for each instance, and y_i are the correct labels of each instance.

L2 loss is a non-negative, decreasing metric. Smaller values indicate a better model with respect to this metric.

Applies to