def compute_accuracy(true_positive, true_negative, false_positive, false_negative):
    """ Function to compute Accuracy"""
    if true_positive + true_negative == 0:
        return 0
    return float(true_positive + true_negative) / \
           float(true_positive + true_negative + false_positive + false_negative)