I'm trying to calculate the NDCG score for binary relevances:
from sklearn.metrics import ndcg_score
y_true = [0, 1, 0]
y_pred = [0, 1, 0]
ndcg_score(y_true, y_pred)
And getting:
ValueError: Only ('multilabel-indicator', 'continuous-multioutput',
'multiclass-multioutput') formats are supported. Got binary instead
Is there a way to make this work?