dmlfw (Daniyal Machine Learning Framework)
|
Regression model evaluation metrics. More...
Go to the source code of this file.
Functions | |
double | dmlfw_get_r2_score (dmlfw_column_vec_double *target_values_vector, dmlfw_column_vec_double *predicted_values_vector) |
Computes the R2 (coefficient of determination) score for regression. | |
Regression model evaluation metrics.
This header provides functions to evaluate the accuracy of regression models using numerical metrics such as the R2 score (coefficient of determination).
Functions validate inputs, check vector sizes, allocate necessary temporaries, and set errors on failure. After calling, check dmlfw_error()
and use dmlfw_get_error_string()
and dmlfw_get_debug_string()
for diagnostics.
Input vectors are owned by the caller; temporary allocations are freed internally. Returned scores are scalars.
double dmlfw_get_r2_score | ( | dmlfw_column_vec_double * | target_values_vector, |
dmlfw_column_vec_double * | predicted_values_vector | ||
) |
Computes the R2 (coefficient of determination) score for regression.
The R2 score is calculated as:
target_values_vector | [in] Pointer to true target value vector (non-NULL). |
predicted_values_vector | [in] Pointer to predicted value vector (non-NULL). |
Usage: