Several annotators¶
Several models, several prompts of the same model, or a model plus a crowd label can all provide predictions. Pass them as columns:
result = fl.ppi_mean(y, preds_labeled_matrix, preds_unlabeled_matrix)
print(result.lam) # one weight per annotator
The weights solve a small linear system that uses the full covariance of the predictions, so annotators that make the same mistakes are not counted twice. Weights can be negative: an annotator can be used to cancel the shared error of others.
Diagnostics¶
report = fl.annotator_report(y, preds_labeled_matrix, names=["model_a", "model_b", "model_c"])
print(report.summary())
The report shows, for each annotator, the mean error (bias), the error standard deviation and the explained variance, plus:
- the mean error correlation between annotators;
- the effective number of independent annotators \(K / (1 + (K-1)\bar\rho)\);
- the explained variance of the simple average and of the optimal combination.
When errors are strongly correlated, adding annotators gives little: three models with error correlation 0.8 are worth about 1.15 independent ones.
Small samples¶
Each annotator adds one estimated weight. With few labels the estimated
weights fit the noise a little, and the interval can be slightly too
narrow: in the simulation of benchmarks/bench_coverage.py, nominal 90 %
intervals with three biased, correlated annotators and 200 labels covered
the truth in about 88 % of repetitions. With fewer than a few hundred
labels, prefer one or two annotators, or the best single annotator chosen
on a pilot.
Nearly identical annotators¶
If two annotators are almost the same, the weights can become unstable. Use a small ridge penalty:
fl.ppi_mean(y, preds_labeled_matrix, preds_unlabeled_matrix, ridge=0.1)