label_binarize#

cuml.preprocessing.label_binarize(y, classes, neg_label=0, pos_label=1, sparse_output=False) SparseCumlArray[source]#

A stateless helper function to dummy encode multi-class labels.

Parameters:
yarray-like of size [n_samples,] or [n_samples, n_classes]
classesthe set of unique classes in the input
neg_labelinteger the negative value for transformed output
pos_labelinteger the positive value for transformed output
sparse_outputbool whether to return sparse array