
Calculate Uncertainty Metrics for GenRA Predictions
Source:R/genra_uncertainty.R
genra_uncertainty.RdComputes uncertainty quantification for GenRA read-across predictions using permutation testing and (optionally) ROC-AUC analysis.
Value
A list with components:
- swa
The observed Similarity-Weighted Activity score.
- auc
Area Under the ROC Curve (requires pROC package), or NA if unavailable or insufficient data.
- p_value
Permutation-based p-value. Proportion of permuted SWA values as extreme as observed.
- threshold
Suggested classification threshold (default 0.5).
- n_active
Number of active analogues used.
- n_inactive
Number of inactive analogues used.
- n_permutations
Number of permutations performed.
Details
The p-value is calculated via permutation testing: activity labels are
shuffled n_permutations times while keeping similarity weights fixed.
The p-value is the proportion of permuted SWA values >= the observed SWA
(for positive predictions) or <= observed SWA (for negative predictions).
AUC calculation requires the pROC package and at least one active and one inactive analogue.