Was this helpful?
Predefined UDFs for ML Model Performance Metrics
Predefined UDFs are available for measuring performance of machine learning models.
Measuring Regression Model Performance
ACTIAN_MEAN_ABSOLUTE_ERROR
ACTIAN_MEAN_ABSOLUTE_ERROR(y_true, y_pred)
Calculates regression mean absolute error.
ACTIAN_MEAN_SQUARED_ERROR
ACTIAN_MEAN_SQUARED_ERROR(y_true, y_pred)
Calculates regression mean squared error.
ACTIAN_R2_SCORE
ACTIAN_R2_SCORE(y_true, y_pred)
Calculates regression R² (coefficient of determination) score.
Measuring Classification Model Performance
ACTIAN_F1_SCORE
ACTIAN_F1_SCORE(y_true, y_pred, target_class)
Calculates the F1 score, also known as a balanced F-score or F-measure, for the target class.
ACTIAN_LOG_LOSS
ACTIAN_LOG_LOSS(y_true, y_prob, target_class)
Calculates log loss with probability input for the target class. Returns NULL if y_prob is invalid (not in range [0, 1]).
ACTIAN_PRECISION_SCORE
ACTIAN_PRECISION_SCORE(y_true, y_pred, target_class)
Calculates precision for the target class. Precision is the ratio ‘tp / (tp + fp)’, where ‘tp’ is the number of true positives and ‘fp’ is the number of false positives.
ACTIAN_RECALL_SCORE
ACTIAN_RECALL_SCORE(y_true, y_pred, target_class)
Calculates recall (sensitivity) for the target class. Recall is the ratio ‘tp / (tp + fn)’ where ‘tp’ is the number of true positives and ‘fn’ is the number of false negatives.
Last modified date: 09/11/2026