strata.metrics
Regression metrics (MSE, RMSE, MAE, R²), classification metrics (Accuracy, Precision, Recall, F1, Confusion Matrix, Log Loss, ROC AUC), and clustering metrics (Silhouette Score).
Functions
Section titled “Functions”| Function | Description |
|---|---|
mean_squared_error |
Compute Mean Squared Error (MSE) regression loss. |
root_mean_squared_error |
Compute Root Mean Squared Error (RMSE) regression loss. |
mean_absolute_error |
Compute Mean Absolute Error (MAE) regression loss. |
r2_score |
Compute (coefficient of determination) regression score function. |
unique_labels |
Sorted list of the distinct labels appearing in y_true or y_pred. |
accuracy_score |
Fraction (or count, if normalize is False) of correctly classified samples. |
confusion_matrix |
Confusion matrix C where C[i, j] counts samples of label i predicted as label j. |
precision_score |
Compute classification precision score. |
recall_score |
Compute classification recall (sensitivity) score. |
f1_score |
Compute classification F1 score (harmonic mean of precision and recall). |
log_loss |
Compute log loss (cross-entropy loss), the negative log-likelihood of true labels. |
roc_auc_score |
Compute Area Under the Receiver Operating Characteristic Curve (ROC AUC). |
silhouette_score |
Compute the mean Silhouette Coefficient of all samples. |