Skip to main content
Documentation Status

Assumption Free KMeans Monte Carlo

This package contains sklearn compatible python implementations of various K-Means seeding algorithms.

The package was inspired by the AFKMC^2 algorithm detailed in

Fast and Provably Good Seedings for k-Means
Olivier Bachem, Mario Lucic, S. Hamed Hassani and Andreas Krause
In Neural Information Processing Systems (NIPS), 2016.

The algorithm uses Monte Carlo Markov Chain to quickly find good seedings for KMeans and offers a runtime improvement over the common K-Means++ algorithm.

Usage

Using this package to get seedings for KMeans in sklearn is as simple as:

import afkmc2
X = np.array([[1, 2], [1, 4], [1, 0],
             [4, 2], [4, 4], [4, 0]])
seeds = afkmc2.afkmc2(X, 2)

from sklearn.custer import KMeans
model = KMeans(n_clusters=2, init=seeds).fit(X)
print model.cluster_centers_

Installation

Quickly install afkmc2 by running (coming soon):

pip install afkmc2

Contribute

Support

You can reach out to me through https://adriangoe.me/.

License

The project is licensed under the MIT License.

Metadata

Release files for afkmc2 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for afkmc2 0.1
File Size Uploaded Provenance
afkmc2-0.1.tar.gz 4.1 kB Without provenance Details

Release files / afkmc2-0.1.tar.gz

Download URL afkmc2-0.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4a6a48948c64f2bc580cd780087162ff3ae675ae3f3beb98b001b94628ff9b8a
BLAKE2b-256 checksum
How to use checksums
4f9f4abca0daf62c08bac4cd751d6bf4dd6e1ee8f2962df9f7f89b0cfb21d86d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for afkmc2 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page