Skip to contents

Measure to compare true observed response with predicted quantiles in regression tasks.

Details

\(R^1(\alpha)\) is defined as $$ 1 - \frac{\sum_{i=1}^n \rho_\alpha \left( t_i - r_i(\alpha) \right)}{\sum_{i=1}^n \rho_\alpha \left( t_i - q_{\alpha} \right)}, $$ where for a quantile \(\alpha\), \(\rho_\alpha\) is the pinball function, \(r_i(\alpha)\) are the predictions for the quantile and \(q_{\alpha}\) is the empirical \(\alpha\)-quantile of the test or training data.

\(R^1(\alpha)\) is analogous to \(R^2\) for regression tasks. It compares the pinball function of the predictions relative to a naive model predicting the empirical quantile.

This measure is undefined for constant \(t\).

Dictionary

This Measure can be instantiated via the dictionary mlr_measures or with the associated sugar function msr():

mlr_measures$get("regr.rqr")
msr("regr.rqr")

Meta Information

  • Task type: “regr”

  • Range: \((-\infty, 1]\)

  • Minimize: FALSE

  • Average: macro

  • Required Prediction: “quantiles”

  • Required Packages: mlr3

Parameters

IdTypeDefaultRange
alphanumeric-\([0, 1]\)

References

Koenker, Roger, Machado, F. JA (1999). “Goodness of Fit and Related Inference Processes for Quantile Regression.” Journal of the American Statistical Association, 94(448), 1296–1310. doi:10.1080/01621459.1999.10473882 .

See also

Other Measure: Measure, MeasureClassif, MeasureRegr, MeasureSimilarity, mlr_measures, mlr_measures_aic, mlr_measures_bic, mlr_measures_classif.costs, mlr_measures_debug_classif, mlr_measures_elapsed_time, mlr_measures_internal_valid_score, mlr_measures_oob_error, mlr_measures_regr.pinball, mlr_measures_regr.rsq, mlr_measures_selected_features

Super classes

mlr3::Measure -> mlr3::MeasureRegr -> MeasureRQR

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.

Usage

MeasureRegrRQR$new(alpha = 0.5, pred_set_mean = TRUE)

Arguments

alpha

numeric(1)
The quantile for which to compute the measure. Must be one of the quantiles that the Learner was trained on.

pred_set_mean

logical(1)
If TRUE, the mean of the true values is calculated on the prediction set. If FALSE, the mean of the true values is calculated on the training set.


Method clone()

The objects of this class are cloneable with this method.

Usage

MeasureRegrRQR$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.