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.1.tar.gz (171.7 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.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (603.9 kB view details)

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

skapex-0.2.1-cp310-cp310-win_amd64.whl (262.4 kB view details)

Uploaded CPython 3.10Windows x86-64

skapex-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (589.8 kB view details)

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

skapex-0.2.1-cp39-cp39-win_amd64.whl (262.3 kB view details)

Uploaded CPython 3.9Windows x86-64

skapex-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (590.6 kB view details)

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

skapex-0.2.1-cp38-cp38-win_amd64.whl (262.9 kB view details)

Uploaded CPython 3.8Windows x86-64

skapex-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (606.7 kB view details)

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

skapex-0.2.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (575.4 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.1.tar.gz.

File metadata

  • Download URL: skapex-0.2.1.tar.gz
  • Upload date:
  • Size: 171.7 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.1.tar.gz
Algorithm Hash digest
SHA256 32c1cf54ddc055a68863bc3606df9197055a16f2fd66e30a5c2e12b98bbed06a
MD5 e4407b464e55cdec17d6a7afd0831bd7
BLAKE2b-256 10eae44973828334097e6e903e6ce5a486f8b4b2146845de25248c1c1d053911

See more details on using hashes here.

File details

Details for the file skapex-0.2.1-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.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 878bf27281b068d345f58f294c8c4bc930bd0ca4fba10d64f96592d9f22cde71
MD5 28950fe5eca41f825fbd3da7ef445412
BLAKE2b-256 d1f025c7cf880fd387a32f81e03fbd37cabb1f5b56bfed06f4d87ad8447ff93b

See more details on using hashes here.

File details

Details for the file skapex-0.2.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: skapex-0.2.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 262.4 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.0

File hashes

Hashes for skapex-0.2.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f415fa607ccdfdc50f625d4ae776dff5df80e3c59b75591c460b9d2f7084acac
MD5 0c6f09da7dd90f24e3937adab382bc67
BLAKE2b-256 df56255748502cb36f495ea4186fe26219665085a9410ee67f76fe0bf1c55195

See more details on using hashes here.

File details

Details for the file skapex-0.2.1-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.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 2b903b3577f5a0c30526f01cf7490afcf051e83675cf66b285745f07f9dfdc07
MD5 b4b205c0599fd350c4af72f0922006aa
BLAKE2b-256 30542ecfbad0f66293197127d1511a4c2240e5681410c1f6be9e29b097c0552e

See more details on using hashes here.

File details

Details for the file skapex-0.2.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: skapex-0.2.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 262.3 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.0

File hashes

Hashes for skapex-0.2.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 11b52473dbd1e5fba954d8bb725ad44aee36d2a8df7da6064d8e58780bce2def
MD5 abead0c0473639893199d08af89ec646
BLAKE2b-256 2fb9754169e83ec03dd8d332f077ed4c2db4a1ab7d0a8cd1f4c0f7eae2304408

See more details on using hashes here.

File details

Details for the file skapex-0.2.1-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.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 2b2d494bad69fcbf2477348c324ba027785b4d101900e200ed4f12fbf1b5358b
MD5 7e2478ebccf43a57c7a3f75986ed1011
BLAKE2b-256 873350d3b05fb0ce1e5531f1950f0e172103926b17af7bbf0ee4c48149713e85

See more details on using hashes here.

File details

Details for the file skapex-0.2.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: skapex-0.2.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 262.9 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.0

File hashes

Hashes for skapex-0.2.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 59b8c5a22b7fbc85d4964a75cc821a50ee4679ba75d6fb8931292702901f907d
MD5 26d4f232d15786610fabc4f0f675d8ae
BLAKE2b-256 a7e89fe75f399015baddfebe8115c75c16ed4ece1fe0181a9577e4e7c5f05fe8

See more details on using hashes here.

File details

Details for the file skapex-0.2.1-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.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 ed46b28c15737aaee9a38e2930776211ebdeb7dea92a2775266bb9d1e05c8a1c
MD5 f004e2e03d6618173e005a68e1c8d3f7
BLAKE2b-256 fd97f69e468acae49c2401e8324ee9fc310c973a52a17df0a5dc9c5502185925

See more details on using hashes here.

File details

Details for the file skapex-0.2.1-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.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 0bd6e0daa890acc2abcda41ebd0aa621bd758e252f1f9238a0913b869369dacd
MD5 f5cbc2f3e6f7a9e71af9aacbdb6d2a8f
BLAKE2b-256 50de0fc9d3e885d016d78ed0a171c5d0f357f4a1f61a379d951af3e216d44373

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