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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for bayesKMeans-0.3.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c60a54809810580717e15b852d56c02cc75755d4e6102bd580983c2e719b894 |
|
MD5 | 3c441795dbdbd9bee8b85ef2aedf5d14 |
|
BLAKE2b-256 | 8e9d7535cc483c76ce59b7171e32664c37149b3617e40b1ddf17bcb5adcd62a3 |