kiwi.metrics.functions
mean_absolute_error(y, y_hat)
mean_absolute_error
mean_squared_error(y, y_hat)
mean_squared_error
delta_average(y_true, y_rank) → float
delta_average
Calculate the DeltaAvg score.
precision(tp, fp, fn)
precision
recall(tp, fp, fn)
recall
fscore(tp, fp, fn)
fscore
confusion_matrix(hat_y, y, n_classes=None)
confusion_matrix
scores_for_class(class_index, cnfm)
scores_for_class
precision_recall_fscore_support(hat_y, y, labels=None)
precision_recall_fscore_support
f1_product(hat_y, y)
f1_product
f1_scores(hat_y, y) → Tuple[Any, np.ndarray]
f1_scores
Compute and return f1 for each class and the f1_product.
matthews_correlation_coefficient(hat_y, y)
matthews_correlation_coefficient
Compute Matthews Correlation Coefficient.
kiwi.metrics.functions.
This is a much faster version than the Perl one provided in the WMT QE task 1.
References: could not find any.
Author: Fabio Kepler (contributed to MARMOT).
y_true – array of reference score (not rank) of each segment.
y_rank – array of rank of each segment.
the absolute delta average score.
hat_y – list of np array of predicted binary labels.
y – list of np array of true binary labels.
the Matthews correlation coefficient of hat_y and y.
kiwi.metrics
kiwi.metrics.metrics