A package consisting of evaluation measures for gesture biometric quantification.
Project description
biomQuant
A package consisting of evaluation measures for gesture biometric quantification.
This package provide four measures:
- Rank deviation ($\hat{r}$)
- Relevance ($\mathcal{R}$)
- Trend match distance ($\Psi$)
- ICGD Score ($C_d$)
We combine these in advanced acceptance score
${A_r}^=\frac{\sum_{j=1}^{G}\Bigl( \frac{2^{\lambda\mathcal{R}_j}}{\exp(\kappa(r_{j}^{\Delta} - r_{j}^{\hat{e}} ))}\Bigr)}{\sqrt{\log_2(2+\nu\Psi)}}*{\exp(-\beta C_d)}$
Here, $G$ is the number of gestures. While $r_{j}^{\Delta}$ and $r_{j}^{\hat{e}}$ denote ranks of the $j^{th}$ gesture wrt the estimated biometric estimates and the ground truth respectively. $\lambda,\kappa,\nu,\text{and}\beta$ are the scaling factors.
We further normalize this into $nA_r^*(\Delta)$. Mathematically,
$nA_r^(\Delta)=\frac{A_r^{}(\Delta)}{A_r^{*}(\hat{e})}$
Where, $A_r^(\Delta)$ and $A_r^(\hat{e})$ represents $A_r^*$ values for the output DGBQA scores and ground truth, i.e.,
$A_r^*(\hat{e})=\sum_{j=1}^{G}2^{\lambda \Bigl[ \gamma\Bigl({\frac{G-{r_{j}^{\hat{e}}}+1}{G}\Bigr){\hat{e}\left[r_{j}^{\hat{e}}\right]}}+\Bigl(\frac{r_{j}^{\hat{e}}}{G}\Bigr)\Bigl(1-\hat{e}\left[r_{j}^{\hat{e}}\right]\Bigr) \Bigr]}$
Requirements
- numpy
- sckit-learn
- scipy
- tensorflow $\geq$ 2.8.0
How to use
- Advanced Acceptance Score
from biomQaunt.advancedAcceptance import comp_advancedAcceptance
nAr_star = comp_advancedAcceptance(biometricParams,
groundTruth,
embeddings,
labels,
G=numGestures)
- Rank deviation
from biomQaunt.rankDev import rankDev
r_prime = rankDev(1-groundTruth,
biometricParams,
G=numGestures)
- Relevance
import numpy as np
from biomQaunt.acceptanceScore import compAr
def preProcess(inputVec):
inputVec = (inputVec - np.mean(inputVec))/np.std(inputVec)
return inputVec/np.linalg.norm(inputVec)
relevance = compAr(preProcess(biometricParams),
preProcess(groundTruth),
normalizer=False,
relevance=True)
- ICGD score
import tensorflow as tf
from biomQaunt.icgd import compICGD
def normalisation_layer(x):
return(tf.math.l2_normalize(x, axis=1, epsilon=1e-12))
embeddings = tf.keras.layers.Lambda(normalisation_layer)(embeddings)
icgdScore = icgdScore(embeddings.numpy(),
labels)
- Trend match distance
from biomQaunt.trendMatch import compTrendMatchDist
psi = rankDev(biometricParams,
groundTruth,
G=numGestures)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file biomquant-0.0.2.tar.gz.
File metadata
- Download URL: biomquant-0.0.2.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
041cb8b4e1bb45d9db0bcf150bb63645741cc27eaa5b506aae3f196535e713f3
|
|
| MD5 |
7fdddd7833795909e423d52f83b60e45
|
|
| BLAKE2b-256 |
7bedaa97327204f72e59e14d157ec4422e3c9509f5db66830ab9d7a60372534a
|
File details
Details for the file biomquant-0.0.2-py3-none-any.whl.
File metadata
- Download URL: biomquant-0.0.2-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4ae5543e360c4c1c1e0b8136adde687b9de02b67430a2f85789314e1a9a1c00
|
|
| MD5 |
e7d90b5bd9ca42e62982748546802a12
|
|
| BLAKE2b-256 |
463abd0cd756e63c646b09c22fd474931b32c97ebc89b657b84d682be3e0f3a4
|