Skip to main content

A Python Library Implementing Dimension Insensitive Euclidean Metric (DIEM)

Project description

plot

PyPI PyPI Downloads Built with NumPy DOI License

diemsim

diemsim is an optimized Python library to compute "Dimension Insensitive Euclidean Metric (DIEM)", surpassing Cosine similarity for multidimensional comparisons.

Latency Benchmarking

Our proposed approaches,
Compact Vectorization optimizes latency of the existing function 'DIEM_Stat' by around 46.50%
plot Compact Optimized getDIEM optimizes latency of the existing function 'getDIEM' by 34.27% plot

Getting Started

Install the package via pip:

pip install diemsim

Usage

from diemsim import DIEM

N= 12
maxV= 1
minV= 0
n_iter= int(1e5)

S1= np.random.rand(N) * (maxV - minV) + minV
S2= np.random.rand(N) * (maxV - minV) + minV

# Initialize DIEM
diem= DIEM( N= N, maxV= maxV, minV= minV, n_iter= n_iter ) 

# Compute DIEM value
value= diem.sim( S1, S2)

print( "Output Value: ", value )

Find Quick Start notebook here

Key Contributors

Boddu Sri Pavan , Chandrasheker Thummanagoti

Please refer CONTRIBUTING.md for contributions to diemsim

To cite our Python library

BibTeX

@software{diemsim,
title = {diemsim: A Python Library Implementing Dimension Insensitive Euclidean Metric (DIEM)},
author = {Boddu Sri Pavan, Chandrasheker Thummanagoti},
year = {2025},
publisher = {Zenodo},
version = {v1.0.0},
doi = {10.5281/zenodo.15351274},
url = {https://doi.org/10.5281/zenodo.15351274}
}

APA

BodduSriPavan111. (2025). BodduSriPavan-111/diemsim: Initial Release (v0.0.1). Zenodo. https://doi.org/10.5281/zenodo.15351275

Acknowledgements

BibTeX

@misc{tessari2025surpassingcosinesimilaritymultidimensional,
title={Surpassing Cosine Similarity for Multidimensional Comparisons: Dimension Insensitive Euclidean Metric},
author={Federico Tessari and Kunpeng Yao and Neville Hogan},
year={2025},
eprint={2407.08623},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2407.08623},
}

Thank You !

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

diemsim-0.0.5.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

diemsim-0.0.5-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file diemsim-0.0.5.tar.gz.

File metadata

  • Download URL: diemsim-0.0.5.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.11.3 Windows/10

File hashes

Hashes for diemsim-0.0.5.tar.gz
Algorithm Hash digest
SHA256 5e19135ac97d4dee71c5481fb9a8fb8ef7ee5a9fe045bb47c1e15e27f4f64c64
MD5 fa4876bdd440a9d4e69a5f0135a00a6c
BLAKE2b-256 9e9ba89c6ff8af69b8a6a1ca88a047b541910d2575d3e92756775f35352161a7

See more details on using hashes here.

File details

Details for the file diemsim-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: diemsim-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.11.3 Windows/10

File hashes

Hashes for diemsim-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4645d7fda4a60c8a6fea0dbf53a9bbc06a26d6d7371a192c6cf6c854ea1945fc
MD5 7c6b7888fa9853f35b85d3b75ac584f0
BLAKE2b-256 4bfc59df1fe783391ce1595ca8c9a882d38a9fdf54b2d9ca02ebad7342569a52

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