Skip to main content

No project description provided

Project description

Landmark

landmark is a Python package that constructs landmarks $L_k = {x_1, x_2, \dots, x_k }$ from a point set $X \subset \mathbb{R}^d$ or metric space $(X, d_X)$.

Below is an example a data set $X$ (blue points), some sample landmarks $L$ (red), along with the coverage (yellow) and packing (orange) properties they obey.

Landmarks example

Installation

The package can be installed with pip:

python -m pip install scikit-landmark

Alternatively, both the source distribution and wheels are available on PyPI for distributing and offline use.

Usage

Given a point cloud $X \in \mathbb{R}^{n \times d}$ represented as a numpy matrix with $n$ points in $d$ dimensions, the indices of the landmarks can be found with the landmarks function:

from landmark import landmarks
X = np.random.uniform(size=(50,2))
ind = landmarks(X, k = 10) ## Finds the indices of 25 landmarks

The first $k$-indices of ind are equivalent to the $k$-th prefix of the greedy permutation. You can get their covering radii and their predecessors by specifying full_output=True:

ind, info = landmarks(X, k = 10, full_output = True)
print(ind)                  ## prefix indices
print(info['radii'])        ## insertion radii 
print(info['predecessors']) ## predecessor map 

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

scikit_landmark-0.1.1.tar.gz (64.3 MB view hashes)

Uploaded Source

Built Distributions

scikit_landmark-0.1.1-cp312-cp312-win_amd64.whl (40.8 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

scikit_landmark-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (47.3 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

scikit_landmark-0.1.1-cp312-cp312-macosx_11_0_arm64.whl (37.0 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

scikit_landmark-0.1.1-cp312-cp312-macosx_10_13_x86_64.whl (37.7 kB view hashes)

Uploaded CPython 3.12 macOS 10.13+ x86-64

scikit_landmark-0.1.1-cp311-cp311-win_amd64.whl (40.6 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

scikit_landmark-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (47.2 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

scikit_landmark-0.1.1-cp311-cp311-macosx_11_0_arm64.whl (36.6 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

scikit_landmark-0.1.1-cp311-cp311-macosx_10_9_x86_64.whl (37.5 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

scikit_landmark-0.1.1-cp310-cp310-win_amd64.whl (40.6 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

scikit_landmark-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (47.2 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

scikit_landmark-0.1.1-cp310-cp310-macosx_11_0_arm64.whl (36.6 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

scikit_landmark-0.1.1-cp310-cp310-macosx_10_9_x86_64.whl (37.5 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

scikit_landmark-0.1.1-cp39-cp39-win_amd64.whl (40.5 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

scikit_landmark-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (47.2 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

scikit_landmark-0.1.1-cp39-cp39-macosx_11_0_arm64.whl (36.5 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

scikit_landmark-0.1.1-cp39-cp39-macosx_10_9_x86_64.whl (37.5 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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