def geometric_mean_score_1(y_true, y_pred):
    """
    Calculates the geometric mean score.

    The geometric mean (G-mean) tries to maximize the accuracy on each of the classes while keeping these accuracies balanced. For N-class problems it is a N root of the product of class-wise recall. For binary classification G-mean is denoted as the squared root of the product of the recall and specificity.