@@ -1224,6 +1224,13 @@ def coverage_error(y_true, y_score, *, sample_weight=None):
1224
1224
return np .average (coverage , weights = sample_weight )
1225
1225
1226
1226
1227
+ @validate_params (
1228
+ {
1229
+ "y_true" : ["array-like" , "sparse matrix" ],
1230
+ "y_score" : ["array-like" ],
1231
+ "sample_weight" : ["array-like" , None ],
1232
+ }
1233
+ )
1227
1234
def label_ranking_loss (y_true , y_score , * , sample_weight = None ):
1228
1235
"""Compute Ranking loss measure.
1229
1236
@@ -1242,10 +1249,10 @@ def label_ranking_loss(y_true, y_score, *, sample_weight=None):
1242
1249
1243
1250
Parameters
1244
1251
----------
1245
- y_true : {ndarray , sparse matrix} of shape (n_samples, n_labels)
1252
+ y_true : {array-like , sparse matrix} of shape (n_samples, n_labels)
1246
1253
True binary labels in binary indicator format.
1247
1254
1248
- y_score : ndarray of shape (n_samples, n_labels)
1255
+ y_score : array-like of shape (n_samples, n_labels)
1249
1256
Target scores, can either be probability estimates of the positive
1250
1257
class, confidence values, or non-thresholded measure of decisions
1251
1258
(as returned by "decision_function" on some classifiers).
0 commit comments