|
mlpack 3.4.2
|
The R2 Score is a metric of performance for regression algorithms that represents the proportion of variance (here y) that has been explained by the independent variables in the model. More...
#include <r2_score.hpp>
Static Public Member Functions | |
| template<typename MLAlgorithm , typename DataType , typename ResponsesType > | |
| static double | Evaluate (MLAlgorithm &model, const DataType &data, const ResponsesType &responses) |
| Run prediction and calculate the R squared error. More... | |
Static Public Attributes | |
| static const bool | NeedsMinimization = false |
| Information for hyper-parameter tuning code. More... | |
The R2 Score is a metric of performance for regression algorithms that represents the proportion of variance (here y) that has been explained by the independent variables in the model.
It provides an indication of goodness of fit and therefore a measure of how well unseen samples are likely to be predicted by the model, through the proportion of explained variance. As R2 Score is dataset dependent it can have wide range of values. The best possible score is 




where 
Definition at line 46 of file r2_score.hpp.
|
static |
Run prediction and calculate the R squared error.
| model | A regression model. |
| data | Column-major data containing test items. |
| responses | Ground truth (correct) target values for the test items, should be either a row vector or a column-major matrix. |
|
static |
Information for hyper-parameter tuning code.
It indicates that we want to maximize the measurement.
Definition at line 67 of file r2_score.hpp.
1.9.5