mean_squared_error

pai4sk.sml_metrics.mean_squared_error(data, pred)

Distributed mean squared error regression loss. It supports both local and distributed(MPI) implementation.

This metric is often used in multi-class classification to compute the mean squared error of the predicted target values when compared with the true labels. It currently supports binary classification only. The metric is implemented in a distributed manner for MPI execution.

Parameters
  • data (Supports the following input data-types :) –

    1. Dense matrix (ndarray) of correct labels.

    2. SnapML data partition. This includes the correct labels.

  • pred (Predicted target values.) – array-like, shape = (n_samples,)

Returns

mean_squared_error_value – Returns the mean squared error of the predicted target values (pred) when compared with the true values (data).

Return type

float