gemseo.mlearning.regression.quality.mse_measure module#

The mean squared error to assess the quality of a regressor.

The mean squared error (MSE) is defined by

\[\operatorname{MSE}(\hat{y})=\frac{1}{n}\sum_{i=1}^n(\hat{y}_i-y_i)^2,\]

where \(\hat{y}\) are the predictions and \(y\) are the data points.

class MSEMeasure(algo, fit_transformers=True)[source]#

Bases: BaseRegressorQuality

The mean squared error to assess the quality of a regressor.

Parameters:
  • algo (BaseRegressor) -- A machine learning algorithm for regression.

  • fit_transformers (bool) --

    Whether to re-fit the transformers when using resampling techniques. If False, use the transformers of the algorithm fitted from the whole training dataset.

    By default it is set to True.