Metrics#

helixnet.metrics.accuracy(y_pred, y_true)#

Calculates the accuracy of the models

helixnet.metrics.f1_score(y_pred, y_true)#

Calculates the F1-score.

helixnet.metrics.precision(y_pred, y_true)#

Calculates precision for binary classification.

helixnet.metrics.r_squared(y_pred, y_true)#

A standard statistical measure that represents the proportion of the variance in the dependent variable that is predictable from the independent variables. An R² of 1 indicates that the model explains all the variability of the response data around its mean.

helixnet.metrics.recall(y_pred, y_true)#

Calculates recall for binary classification.

helixnet.metrics.rmse(y_pred, y_true)#

It’s just the square root of MSE. Its advantage is that the units are the same as the target

helixnet.metrics.top_k_accuracy(y_pred_logits, y_true, k=5)#

Calculates top-k accuracy.

Args:

y_pred_logits (np.ndarray): The raw logit outputs from the model. y_true (np.ndarray): The true integer labels. k (int): The number of top predictions to consider.