Skip to main content

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:

  1. Rank deviation ($\hat{r}$)
  2. Relevance ($\mathcal{R}$)
  3. Trend match distance ($\Psi$)
  4. 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

  1. numpy
  2. sckit-learn
  3. scipy
  4. tensorflow $\geq$ 2.8.0

How to use

  1. Advanced Acceptance Score
from biomQaunt.advancedAcceptance import comp_advancedAcceptance
nAr_star = comp_advancedAcceptance(biometricParams,
                                   groundTruth,
                                   embeddings,
                                   labels,
                                   G=numGestures)
  1. Rank deviation
from biomQaunt.rankDev import rankDev
r_prime = rankDev(1-groundTruth,
                  biometricParams,
                  G=numGestures)
  1. 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)
  1. 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)
  1. Trend match distance
from biomQaunt.trendMatch import compTrendMatchDist
psi = rankDev(biometricParams,
              groundTruth,
              G=numGestures)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

biomquant-0.0.2.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

biomquant-0.0.2-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

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

Hashes for biomquant-0.0.2.tar.gz
Algorithm Hash digest
SHA256 041cb8b4e1bb45d9db0bcf150bb63645741cc27eaa5b506aae3f196535e713f3
MD5 7fdddd7833795909e423d52f83b60e45
BLAKE2b-256 7bedaa97327204f72e59e14d157ec4422e3c9509f5db66830ab9d7a60372534a

See more details on using hashes here.

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

Hashes for biomquant-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a4ae5543e360c4c1c1e0b8136adde687b9de02b67430a2f85789314e1a9a1c00
MD5 e7d90b5bd9ca42e62982748546802a12
BLAKE2b-256 463abd0cd756e63c646b09c22fd474931b32c97ebc89b657b84d682be3e0f3a4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page