def round_f1(y_true, y_predicted):
    """
    Calculates F1 (binary) measure.

    Args:
        y_true: list of true values
        y_predicted: list of predicted values

    Returns:
        F1 score

    Alias:
        f1
    """
    try:
        predictions = [np.round(x) for x in y_predicted]
    except TypeError:
        if set(y_true) | set(y_predicted) in ({"True"}, {"False"}, {"False", "True"}):
            y_true = [y == "True" for y in y_true]
            predictions = [y == "True" for y in y_predicted]
        else:
            raise RuntimeError(f"Unexpectible type for {y_true} and {predictions}")

    return f1_score(y_true, predictions)

    Calculates F1 (binary) measure.

    Args:
        y_true: list of true values
        y_predicted: list of predicted values

    Returns:
        F1 score

    Alias:
        f1
    
deeppavlov/metrics/fmeasure.py