Skip to main content

Leveraged Affinity Propagation implementation

Project description

Features

  • Implements Leveraged Affinity Propagation (LAP).

  • Maintains compatibility with scikit-learn, enabling seamless integration with existing scikit-learn workflows.

Installation

You can install skapex via pip:

pip install skapex

Usage

Here’s a basic example of how to use skapex LAP for clustering:

from skapex import LeveragedAffinityPropagation
from sklearn.datasets import make_blobs
from sklearn.metrics.pairwise import euclidean_distances

# Generate sample data
X, _ = make_blobs(n_samples=200, centers=3, random_state=0)

# Create and fit the skapex Leveraged Affinity Propagation
model = LeveragedAffinityPropagation(simf=lambda x,y : -euclidean_distances(x, y, squared=True), fraction=0.1, sweeps=5)
model.fit(X)

# Get cluster labels for the input data
labels = model.labels_

# Print the resulting cluster labels
print(labels)

References

B. J. Frey and D. Dueck, “Clustering by Passing Messages Between Data Points,” Science, vol. 315, no. 5814, pp. 972–976, Feb. 16, 2007, issn: 0036- 8075, 1095-9203. doi: 10.1126/science.1136800.

U. Bodenhofer, A. Kothmeier, and S. Hochreiter, “APCluster: An R package for affinity propagation clustering,” Bioinformatics, vol. 27, no. 17, pp. 2463– 2464, Sep. 1, 2011, issn: 1367-4803. doi: 10.1093/bioinformatics/btr406.

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

skapex-0.2.0.tar.gz (140.8 kB view details)

Uploaded Source

Built Distributions

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

skapex-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (512.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.24+ x86-64

skapex-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (501.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.24+ x86-64

skapex-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (506.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64manylinux: glibc 2.24+ x86-64

skapex-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (531.2 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64manylinux: glibc 2.24+ x86-64

skapex-0.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (502.6 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64manylinux: glibc 2.24+ x86-64

File details

Details for the file skapex-0.2.0.tar.gz.

File metadata

  • Download URL: skapex-0.2.0.tar.gz
  • Upload date:
  • Size: 140.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.2

File hashes

Hashes for skapex-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ff84f8426bd1191b029e96e8dd07e3dc46860d074d878e60e50fec6f0908400f
MD5 5525951d71b0975244a3bac5100f34a6
BLAKE2b-256 9bba1c3dd41c1f4c1bb9e40642bccef9fbe762b7319ffdfe161004f6ec50c350

See more details on using hashes here.

File details

Details for the file skapex-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for skapex-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 135a0677011df12d91e88a1da3817c70a2b9017dfc45c15f6f1edd300555313a
MD5 ffdfa6b4ae2f51868d425cec3cd31249
BLAKE2b-256 454449ddc934808cf075589376cadcbe2ba4157f93e4816a2619843324fde57d

See more details on using hashes here.

File details

Details for the file skapex-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for skapex-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 04d290b6203f128ead50a338d6a166b93c3dafe9d0f51683024f4f6541e3ada6
MD5 12f658420b8ae5f91d446b93a02d736d
BLAKE2b-256 349e2b3ffa239c91310b17238c345668017cb1dda14066b2ff5d13c991d6422c

See more details on using hashes here.

File details

Details for the file skapex-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for skapex-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 7ae1a27d63a50a9a4dd8a11945c521ca5b316e3f2f83d501d5601e6e43119fd9
MD5 46aed55f8a2d4bb795fbbebdfbaebb07
BLAKE2b-256 e5a5a2983b41b46ef29d0b3f5eb19433f560495732431e8d87729a5fc5c16699

See more details on using hashes here.

File details

Details for the file skapex-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for skapex-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 6ea63183deac3e14e586d8120b40ca53b0a2033a5f425ac88f6c291294cddcdc
MD5 e076d880bf06bebf7226de3826f96963
BLAKE2b-256 b7eff2767f2a7c7b23a71ed8d1bedb4bef3acc7ccbbb97edf70415a9f5088786

See more details on using hashes here.

File details

Details for the file skapex-0.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for skapex-0.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 05367f99dae19b5d6355633445698549f7088fd8068e804e484b685dc0bdedbf
MD5 2697e7325dbdb80009b9871f32dce02a
BLAKE2b-256 e042a9eac04f585df7fce62b40fd2a558ab77d7faab3cb1e0a533082986d13f3

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