def accuracy(y_true, y_pred):
    """
    Backup accuracy function
    """
    p_count = 0
    n_count = 0
    for i in range(0, len(y_pred)):
        if y_pred[i] >= 0.5:
            if y_true[i] >= 0.5:
                p_count += 1
            else:
                n_count += 1
        elif y_pred[i] < 0.5:
            if y_true[i] < 0.5:
                p_count += 1
            else:
                n_count += 1
    if p_count + n_count == 0:
        return 0
    else:
        return p_count / (p_count + n_count)
