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

\[\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 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: MLAlgo

The machine learning algorithm usually trained.

Examples using MSEMeasure

Calibration of a polynomial regression

Calibration of a polynomial regression

Machine learning algorithm selection example

Machine learning algorithm selection example

MSE example - test-train split

MSE example - test-train split

Quality measure for surrogate model comparison

Quality measure for surrogate model comparison

Advanced mixture of experts

Advanced mixture of experts