def _get_accuracy(all_actual, all_expected):
    """Return the accuracy score for actual and expected classes.

    Args:
        all_actual: numpy.array<int>; An array of class indices.
        all_expected: numpy.array<int>; An array of class indices.

    Returns:
        float; Percent of matching classes.
    """
    # We want to count the number of matching classes,
    # and normalize by the number of classes
    return ((all_actual == all_expected).sum() / float(all_actual.size))