(y)
return 'unknown'
Determine the type of data indicated by the target.
Determine the type of data indicated by the target.
Determine the type of data indicated by the target .
def type_of_target(y):
    """Determine the type of data indicated by the target.
    """
    y = np.asarray(y)
    if(len(np.unique(y)) <= 2):
        if(y.ndim >= 2 and len(y[0]) > 1):
            return 'multilabel'
        else:
            return 'binary'
    elif(len(np.unique(y)) > 2) or (y.ndim >= 2 and len(y[0]) > 1):
        return 'multiclass'
    return 'unknown'
def type_of_target ( y ) : y = np . asarray ( y ) if ( len ( np . unique ( y ) ) <= 2 ) : if ( y . ndim >= 2 and len ( y [ 0 ] ) > 1 ) : return 'multilabel' else : return 'binary' elif ( len ( np . unique ( y ) ) > 2 ) or ( y . ndim >= 2 and len ( y [ 0 ] ) > 1 ) : return 'multiclass' return 'unknown'