Closed chakravarthik27 closed 2 months ago
Always getting zero score due to y_true and y_pred are concatenate Example:
y_true
y_pred
y_pred = pd.Series['O', 'ORG', 'O'] y_pred = pd.Series['lLOC', 'ORG', 'O']
Incorrect Extraction of classes:
classes = set(y_true + y_pred) classes ['OLOC', 'ORGORG', 'OO']
Fixes in langtest/utils/util_metrics.py
langtest/utils/util_metrics.py
if isinstance(y_true, list) and isinstance(y_pred, list): unique_labels = set(y_true + y_pred) elif isinstance(y_true, pd.Series) and isinstance(y_pred, pd.Series): unique_labels = set(y_true.tolist() + y_pred.tolist())
Always getting zero score due to
y_true
andy_pred
are concatenate Example:Incorrect Extraction of classes:
Fixes in
langtest/utils/util_metrics.py