Monitoring Results
glide.mean_monitoring_results.base
MeanMonitoringResult
dataclass
Result of a drift-monitoring procedure over a batched dataset.
Holds the embedded confidence_sequence and exposes its per-look arrays as
properties. Every array is indexed by batch in chronological order and is
expressed in the original metric units. For batch t:
running_means[t]is the mean of the per-batch estimates up tot;confidence_bounds[t]is the anytime-valid bound on that running mean, on the side where drift is harmful (a lower bound when the metric is a risk, an upper bound when it is a performance);alarms[t]isTrueonceconfidence_bounds[t]has crossedalarm_threshold, signalling a drift.
alarm_threshold is the user-supplied business threshold the confidence
bound is tested against: the worst metric value the user is willing to
tolerate, in metric units.
Because the threshold is a known constant, the only false-alarm budget is
the embedded sequence's, reported as confidence_level: under no drift,
the probability of ever raising a false alarm is at most
1 - confidence_level.
Source code in glide/mean_monitoring_results/base.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | |
summary
summary()
Return a formatted summary of the monitoring result.
Source code in glide/mean_monitoring_results/base.py
102 103 104 | |
glide.mean_monitoring_results.classical
ClassicalMeanMonitoringResult
dataclass
Bases: MeanMonitoringResult
Monitoring result for the classical (proxy-free) monitor.
Adds the per-batch labeled sample count to the shared base. batch_n[t]
is the number of labeled samples in batch t and has the same length as
batch_mean_estimates.
Source code in glide/mean_monitoring_results/classical.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | |
glide.mean_monitoring_results.prediction_powered
PredictionPoweredMeanMonitoringResult
dataclass
Bases: MeanMonitoringResult
Monitoring result for the prediction-powered monitor.
Adds the per-batch labeled and total sample counts to the shared base.
batch_n_true[t] is the number of labeled samples in batch t and
batch_n_proxy[t] the total number of samples (labeled plus unlabeled);
both have the same length as batch_mean_estimates.
Source code in glide/mean_monitoring_results/prediction_powered.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | |