gemseo / mlearning / quality_measures

Show inherited members

mse_measure module

The mean squared error to measure the quality of a regression algorithm.

The mse_measure module implements the concept of mean squared error measures for machine learning algorithms.

This concept is implemented through the MSEMeasure class and overloads the MLErrorMeasure._compute_measure() method.

The mean squared error (MSE) is defined by

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

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

class gemseo.mlearning.quality_measures.mse_measure.MSEMeasure(algo, fit_transformers=True)[source]

Bases: MLErrorMeasure

The Mean Squared Error measure for machine learning.

Parameters:
  • algo (MLRegressionAlgo) – 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 learning dataset.

    By default it is set to True.

algo: MLSupervisedAlgo

The machine learning algorithm whose quality we want to measure.

Examples using MSEMeasure

Calibration of a polynomial regression

Calibration of a polynomial regression

Machine learning algorithm selection example

Machine learning algorithm selection example

Cross-validation

Cross-validation

Leave-one-out

Leave-one-out

MSE for regression models

MSE for regression models

RMSE for regression models

RMSE for regression models

Advanced mixture of experts

Advanced mixture of experts