My Python package related to scaling distances
Project description
scalableDistances
Python package related to scaling distances
import scalableDistances
from scalableDistances import distance
import pandas as pd
import random
from pprint import pprint
N = 2
main_arr2 = []
arr2 = [random.randint(1, 100) for _ in range(N)]
for i in range(N):
main_arr2.append(arr2)
print(f"main_arr2 = {main_arr2}")
progress_bar = True # Set to True to enable progress bar
print("Starting the parallel processing...")
for distance_metric in [
"euclidean", "squared_euclidean", "manhattan", "chebyshev",
"minkowski", "l0", "canberra", "bray_curtis",
"hamming", "hamming_count",
"jaccard",
"standardized_euclidean",
"huber",
"maximum_relative_difference"
]:
print(f"Calculating distances using {distance_metric} metric...")
results = distance.get_distance_metrics(main_arr2, distance_metric, progress_bar)
print(f"Results for {distance_metric}:")
pprint(results[:5]) # Print the first 5 results for verification
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scalabledistances-0.1.0.tar.gz.
File metadata
- Download URL: scalabledistances-0.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b29e5637c3492eec9c11d54b9cb0591322b6c4b5e21adca2a21eff7366b89f5
|
|
| MD5 |
a428b152b8e627ee1388cfc45c379b6f
|
|
| BLAKE2b-256 |
8c09dd811cc9c6097146d2448b8a84490998afd045ce9f7ce0b4d47e49817e41
|
File details
Details for the file scalabledistances-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scalabledistances-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d6e2c6a83812e084f986e40e7955bd4dbc76c0de56b2f37769ee14358260cba
|
|
| MD5 |
0a45658b6742adce1c17660728398937
|
|
| BLAKE2b-256 |
f8ccd2ec800200640645c877e27736b64ac24ce91368c597c7c6149ef811837a
|