sklearn.utils.multiclass.unique_labels(*ys)
[source]
Extract an ordered array of unique labels
At the moment, we also don’t allow “multiclass-multioutput” input type.
Parameters: |
|
---|---|
Returns: |
|
>>> from sklearn.utils.multiclass import unique_labels >>> unique_labels([3, 5, 5, 5, 7, 7]) array([3, 5, 7]) >>> unique_labels([1, 2, 3, 4], [2, 2, 3, 4]) array([1, 2, 3, 4]) >>> unique_labels([1, 2, 10], [5, 11]) array([ 1, 2, 5, 10, 11])
© 2007–2018 The scikit-learn developers
Licensed under the 3-clause BSD License.
http://scikit-learn.org/stable/modules/generated/sklearn.utils.multiclass.unique_labels.html