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%
Compact Optimized getDIEM optimizes latency of the existing function 'getDIEM' by 34.27%
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 !
Metadata
Release files for diemsim 0.0.8
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 |
|---|---|---|---|---|
| diemsim-0.0.8.tar.gz | 5.3 kB | Without provenance | Details for diemsim-0.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| diemsim-0.0.8-py3-none-any.whl | Python 3 | none | any | Details for diemsim-0.0.8-py3-none-any.whl |
Total release size: 11.1 kB
Release files / diemsim-0.0.8.tar.gz
| Download URL | diemsim-0.0.8.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d82764e93f9c335bd6a3f7826a3b36c2e09f5eebb55bc8953f8f75960587913f
|
|
BLAKE2b-256 checksum How to use checksums |
c23f35da062ded9eff2661e1751a4e6c87382b7b4f56324ff33c4fe6a42e486c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.11.3 Windows/10
|
Release files / diemsim-0.0.8-py3-none-any.whl
| Download URL | diemsim-0.0.8-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
79ea4e690efa410fa2bbd878d5b381925d5cc0c21ae288529584076692443520
|
|
BLAKE2b-256 checksum How to use checksums |
9584ab881c685156f8131ed9537f00a1a5e6c3d048cbe0ba9b8cc0546e2e1d86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.11.3 Windows/10
|
Security for diemsim 0.0.8
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.