f1_score
Module: strata.metrics • Kind: function
Source: strata/metrics/classification.mojo
def f1_score[ true_dtype: DType = DType.float64, pred_dtype: DType = DType.float64,]( y_true: List[Scalar[true_dtype]], y_pred: List[Scalar[pred_dtype]], average: String = "binary", pos_label: Float64 = 1.0, zero_division: Float64 = 0.0,) -> Float64from strata.metrics import f1_scoreCompute classification F1 score (harmonic mean of precision and recall).
Returns: Float64 — Float64: F1 score between 0.0 and 1.0.