(pred_ids, label_ids)
return accuracy
Args:
        pred_ids: prediction id list shape of (data_num, ), type of int
        label_ids: true label id list, same shape and type as pred_ids

    Returns:
        accuracy: accuracy of the prediction, type float
Args:
        pred_ids: prediction id list shape of (data_num, ), type of int
        label_ids: true label id list, same shape and type as pred_ids
Args : pred_ids : prediction id list shape of ( data_num ) type of int label_ids : true label id list same shape and type as pred_ids
def calculate_accuracy_single(pred_ids, label_ids):
    """
    Args:
        pred_ids: prediction id list shape of (data_num, ), type of int
        label_ids: true label id list, same shape and type as pred_ids

    Returns:
        accuracy: accuracy of the prediction, type float
    """
    if np.ndim(pred_ids) != 1 or np.ndim(label_ids) != 1:
        raise TypeError('require rank 1, 1. get {}, {}'.format(np.rank(pred_ids), np.rank(label_ids)))
    if len(pred_ids) != len(label_ids):
        raise TypeError('first argument and second argument have different length')

    accuracy = np.mean(np.equal(pred_ids, label_ids))
    return accuracy
def calculate_accuracy_single ( pred_ids , label_ids ) : if np . ndim ( pred_ids ) != 1 or np . ndim ( label_ids ) != 1 : raise TypeError ( 'require rank 1, 1. get {}, {}' . format ( np . rank ( pred_ids ) , np . rank ( label_ids ) ) ) if len ( pred_ids ) != len ( label_ids ) : raise TypeError ( 'first argument and second argument have different length' ) accuracy = np . mean ( np . equal ( pred_ids , label_ids ) ) return accuracy