bluecast.conformal_prediction.nonconformity_measures_regression

Module Contents

Functions

absolute_error(→ numpy.ndarray)

Calculate the absolute error per row.

normalized_error(→ numpy.ndarray)

Calculate the normalized error per row.

bluecast.conformal_prediction.nonconformity_measures_regression.absolute_error(y_true: pandas.Series | numpy.ndarray, y_hat: numpy.ndarray) numpy.ndarray

Calculate the absolute error per row.

It calculates the absolute error between the predictions and the actual results. :param y_true: True values :param y_hat: Predicted values :return: Absolute error per row

bluecast.conformal_prediction.nonconformity_measures_regression.normalized_error(y_true: pandas.Series | numpy.ndarray, y_hat: numpy.ndarray, scale: float) numpy.ndarray

Calculate the normalized error per row.

The normalized error nonconformity measure is the absolute error divided by an estimate of the prediction error’s scale, such as the mean absolute error (MAE) or the standard deviation of the residuals. This measure can be used with any regression model and helps account for heteroscedasticity in the data. :param y_true: True values :param y_hat: Predicted values :param scale: Scale to normalize the error :return: Absolute error per row