def f1score(precision_value, recall_value, eps=1e-5):
    """Calculating F1-score from precision and recall to reduce computation redundancy.

    Args:
        precision_value: precision (0-1)
        recall_value: recall (0-1)
        eps: epsilon to use

    Returns:
        F1 score (0-1)
    """
    numerator = 2 * (precision_value * recall_value)
    denominator = precision_value + recall_value + eps
    return numerator / denominator
Calculating F1-score from precision and recall to reduce computation redundancy.

    Args:
        precision_value: precision (0-1)
        recall_value: recall (0-1)
        eps: epsilon to use

    Returns:
        F1 score (0-1)
    
catalyst/metrics/functional/_classification.py