Others utils#
Here, we document other utility functions that might come in handy for Scores development.
|
Mean distance from \(\approx k\)-th nearest neighbors. |
|
Compute gradients for batched inputs/outputs. |
|
Compute DCM surprise. |
|
Return FGM attack direction. |
|
Get a \(1\)D aggregator function. |
|
KL div for (potentially batched) \(1\)D inputs. |
|
Count labels of neighbors for batched queries. |
|
Prepare test after having observed counts, with prior belief. |
|
Vector-normalizes all samples if |
|
Improved |