Skip to main content

Finding optimal k in k-means using bayesian optimization

Project description

Example of work:

from bayeskmeans.bayes_kmeans import BayesKMeans from bayeskmeans.bayes_visualize import BayesKMeansVisualize from sklearn.datasets import make_blobs

data = make_blobs(n_samples=1000, n_features=2, centers=21, cluster_std=5, center_box=(-300, 300)) data = data[0]

bayesKMeans = BayesKMeans(data)

bayesKMeans.find_k()

print(bayesKMeans.found_k)

visual = BayesKMeansVisualize(bayesKMeans) visual.show_bayesian_plot()

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

bayesKMeans-0.3.6.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

bayesKMeans-0.3.6-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

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