def measure_accuracy(predictions, ground_truth):
    """Compare how many times a value in predictions maps to the same value in ground_truth.
    """
    correct_count = 0.0
    total_count   = 0.0
    for file_name in predictions:
        if predictions[file_name]==ground_truth[file_name]:
            correct_count += 1.0
        total_count += 1.0

    return correct_count/total_count if total_count else None