Algorithm 2: Offline GPD Model Fitting. |
|
Require:
Trained encoder parameters and prototype set ;
Complete training dataset ;
Quantile q for determining the tail threshold (in this paper, q = 0.9).
|
|
Ensure:
|
1 |
Initialize an empty list for distance scores: . |
2 |
Global Intra-class Distance Aggregation |
3 |
For each sample in
do: |
4 |
Extract feature: ; |
5 |
Retrieve the corresponding class prototype: ; |
6 |
Compute the squared Euclidean distance: ; |
7 |
Append distance to the list: . |
8 |
End for |
9 |
GPD Parameter Estimation |
10 |
(a) Determine the Tail Threshold |
11 |
; |
12 |
(b) Extract Tail Data (Exceedances) |
13 |
; |
14 |
(c) Fit GPD Model using Maximum Likelihood Estimation |
15 |
.
|
16 |
Return
|