Skip to main content

biomQuants

version github github

An open source package for biometric quantification: quantifiers and evaluation measures

The package consists of several quantifiers:

  1. DGBQA
  2. Delta Distance
  3. MasterFace
  4. Generative Capacity
  5. Swipe Quality

We provide several measures:

  1. Rank deviation ($\hat{r}$)
  2. Relevance ($\mathcal{R}$)
  3. Trend match distance ($\Psi$)
  4. ICGD Score ($C_d$)
  5. Advanced acceptance score (${A_r}^*$)
  6. Standard evaluation measures: nDCG, ERR, U, RPP, GRE

Requirements

  1. numpy
  2. sckit-learn
  3. scipy
  4. 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

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

Metadata

Release files for biomQuants 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for biomQuants 1.0.0
File Size Uploaded Provenance Actions
biomquants-1.0.0.tar.gz 13.8 kB Without provenance Details for biomquants-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for biomQuants 1.0.0
File Interpreter ABI Platform Actions
biomquants-1.0.0-py3-none-any.whl Python 3 none any Details for biomquants-1.0.0-py3-none-any.whl

Total release size: 29.3 kB

Release files / biomquants-1.0.0.tar.gz

Download URL biomquants-1.0.0.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
be2c5ffc3867cc76434642191b78b10b02d16f0628d4fd8d8098a1c089e8135c
BLAKE2b-256 checksum
How to use checksums
453ea4dd41fd9cf11c314fb30d57bf74d07cf1af0e220adc6c01b0ef2991da4a
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.0-py3-none-any.whl

Download URL biomquants-1.0.0-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ca5c78f1aef764058f395739d6363bf57e2c840669d4bdc71b1ab02fe13951c
BLAKE2b-256 checksum
How to use checksums
6a436d263321db670ef00b8043df3960e77a3fa2f3b6683291d3e049df076db5
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.0

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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page