Compute conformal anomaly p-value for new samples
Source:R/singlesample-outlier-detection.R
os_conformal_anomaly.RdScores one or more new samples against the calibrated conformal anomaly
model from fit_conformal_anomaly. The conformal p-value is
the fraction of calibration scores at least as extreme as the test score:
$$p = \frac{1 + \#\{s_{\mathrm{cal}} \geq s_{\mathrm{test}}\}}{1 + n_{\mathrm{cal}}}.$$
Arguments
- x
Numeric vector or matrix (samples \(\times\) features).
- fit
A
conformal_anomaly_fitobject fromfit_conformal_anomaly.- alpha
Significance level for the binary anomaly call. Default 0.05.