Estimation¶
ppi_mean¶
result = fl.ppi_mean(y, preds_labeled, preds_unlabeled, alpha=0.05)
| Argument | Meaning |
|---|---|
y |
Gold-standard outcomes of the labelled cases |
preds_labeled |
Predictions for the labelled cases, one column per annotator |
preds_unlabeled |
Predictions for the unlabelled cases |
lam |
"optimal" (default), a number, or one weight per annotator. 1 is the original PPI estimator, 0 the classical mean |
clip |
With one annotator, keep the optimal weight in [0, 1] as in PPI++ |
alternative |
"two-sided", "larger" (lower bound) or "smaller" (upper bound) |
clusters_labeled, clusters_unlabeled |
Cluster labels for cluster-robust variances |
ridge |
Relative ridge penalty when annotators are nearly collinear |
The result object¶
MeanEstimate holds the estimate, the standard error, the interval, the
power tuning weights and diagnostics:
classical_std_error: the standard error of the labelled-only mean on the same data;variance_ratio: the variance of PPI relative to the classical mean;effective_labels: how many labels the classical mean would need for the same precision;pvalue(null): normal p-value for a reference value.
Classical comparison¶
fl.classical_mean(y, alpha=0.05)
Why the interval is valid with a bad model¶
The estimator corrects the mean prediction with the mean error on the labelled cases. The correction is unbiased whatever the predictions are, so a biased model shifts nothing; it only changes the variance. Power tuning chooses how much to trust the predictions and falls back to the classical estimate when they are useless.