biomQuants
An open source package for biometric quantification: quantifiers and evaluation measures
The package consists of several quantifiers:
- DGBQA
- Delta Distance
- MasterFace
- Generative Capacity
- Swipe Quality
We provide several measures:
- Rank deviation ($\hat{r}$)
- Relevance ($\mathcal{R}$)
- Trend match distance ($\Psi$)
- ICGD Score ($C_d$)
- Advanced acceptance score (${A_r}^*$)
- Standard evaluation measures: nDCG, ERR, U, RPP, GRE
Requirements
- numpy
- sckit-learn
- scipy
- tensorflow $\geq$ 2.8.0
How to use
Quantifiers
from biomQuants.qauntifers import getScores
scores = getScores(embPath='Path to embeddings',
quantifier=quantifier,
y_dev=labels,
y_dev_id=idLabels,
G_total=numCategories,
I_total=numIdentities)
Choice of quantifiers: ['dgbqa','deltaDistance','masterFace','genCapacity','swipeQuality']
y_dev: Category labels
y_dev_id: Identity labels
Evaluation measures
- Advanced Acceptance Score
from biomQuants.advancedAcceptance import comp_advancedAcceptance
nAr_star = comp_advancedAcceptance(scores,
groundTruth,
embeddings,
labels,
G=numCategories)
- Rank deviation
from biomQuants.rankDev import rankDev
r_prime = rankDev(1-groundTruth,
scores,
G=numCategories)
- Relevance
import numpy as np
from biomQuants.acceptanceScore import compAr
def preProcess(inputVec):
inputVec = (inputVec - np.mean(inputVec))/np.std(inputVec)
return inputVec/np.linalg.norm(inputVec)
relevance = compAr(preProcess(scores),
preProcess(groundTruth),
normalizer=False,
relevance=True)
- ICGD score
import tensorflow as tf
from biomQuants.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 biomQuants.trendMatch import compTrendMatchDist
psi = rankDev(scores,
groundTruth,
G=numCategories)
Metadata
Release files for biomQuants 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| biomquants-1.0.1.tar.gz | 13.8 kB | Without provenance | Details for biomquants-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| biomquants-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for biomquants-1.0.1-py3-none-any.whl |
Total release size: 29.3 kB
Release files / biomquants-1.0.1.tar.gz
| Download URL | biomquants-1.0.1.tar.gz |
|---|---|
| Size | 13.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9bfa86b5fc0e0de87d69d4cec79740ed10a9f50bfedf2fa821a07645b8f47166
|
|
BLAKE2b-256 checksum How to use checksums |
e1e042f1aae2404cb87677ada3411a730712055bb7c1d819f9ec245110570806
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.18
|
Release files / biomquants-1.0.1-py3-none-any.whl
| Download URL | biomquants-1.0.1-py3-none-any.whl |
|---|---|
| Size | 15.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23df7fdab2c242e50669d60779ac93781883141fabdb91575818a5416c325918
|
|
BLAKE2b-256 checksum How to use checksums |
653ace35d94a28512cd4c4028ff2bbaf775da0d42de336466936cd24e627ed79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.18
|
Security for biomQuants 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.