Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scalabledistances-0.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

scalabledistances-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

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

Hashes for scalabledistances-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3b29e5637c3492eec9c11d54b9cb0591322b6c4b5e21adca2a21eff7366b89f5
MD5 a428b152b8e627ee1388cfc45c379b6f
BLAKE2b-256 8c09dd811cc9c6097146d2448b8a84490998afd045ce9f7ce0b4d47e49817e41

See more details on using hashes here.

File details

Details for the file scalabledistances-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for scalabledistances-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d6e2c6a83812e084f986e40e7955bd4dbc76c0de56b2f37769ee14358260cba
MD5 0a45658b6742adce1c17660728398937
BLAKE2b-256 f8ccd2ec800200640645c877e27736b64ac24ce91368c597c7c6149ef811837a

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