Skip to main content

Interspace gives us different type distances between two vectors.

Project description

Interspace

Gives us different distance between two vectors which are given in as an input.

Installation

pip install interspace

Different Distance Functions

minkowski(vector_1, vector_2, p=1)

euclidean(vector_1, vector_2)

manhattan(vector_1, vector_2)

cosine_similarity(vector_1, vector_2)

haversine(coord1, coord2, R = 6372800)

hamming(int, int); hamming(str, str) # where, length of both the strings should be same

mahalanobis(vector_1, vector_2, inverse_of_the_covariance_matrix)

Usage

import interspace

# Calculate Euclidean Distace
interspace.euclidean([1,2,3],[4,5,6])
##Output: 5.196152422706632

# Compute the great-circle distance between two points on a sphere 
# given their longitudes and latitudes.
interspace.haversine((42.5170365,  15.2778599),(51.5073219,  -0.1276474))
##Output: 1532329.6237517272

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

interspace-0.0.10.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

interspace-0.0.10-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file interspace-0.0.10.tar.gz.

File metadata

  • Download URL: interspace-0.0.10.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for interspace-0.0.10.tar.gz
Algorithm Hash digest
SHA256 26a984ffd02d641a3f975afdeb928c1cf7b8730c8517d0ee7ee5039030d7dd96
MD5 f12a39f0a81fb790c24ce2f0c1711789
BLAKE2b-256 67ede1aa8023a24291bf40f582ba4faebd13c6d77edf175b39db3577ea7bb648

See more details on using hashes here.

File details

Details for the file interspace-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: interspace-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for interspace-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 fdab61af00a757819ef8c12f4a5d8560470e41d38695de415c6769b235522354
MD5 0647c64c726b8381c245604b32d71003
BLAKE2b-256 99fe115f337b2e3b4e1516aea8fc239a5aade360bac21bcb2ddc87321ea1a3ad

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page