简体   繁体   English

使用sklearn KMeans和SciPy kmeans有什么好处?

[英]Are there advantages of using sklearn KMeans versus SciPy kmeans?

From the documentation of sklearn KMeans 来自sklearn KMeans的文档

class sklearn.cluster.KMeans(n_clusters=8, init='k-means++', n_init=10, max_iter=300, tol=0.0001, precompute_distances='auto', verbose=0, random_state=None, copy_x=True, n_jobs=1) class sklearn.cluster.KMeans(n_clusters = 8,init ='k-means ++',n_init = 10,max_iter = 300,tol = 0.0001,precompute_distances ='auto',verbose = 0,random_state = None,copy_x = True,n_jobs = 1)

and SciPy kmeans SciPy kmeans

scipy.cluster.vq.kmeans(obs, k_or_guess, iter=20, thresh=1e-05, check_finite=True) scipy.cluster.vq.kmeans(obs,k_or_guess,iter = 20,thresh = 1e-05,check_finite = True)

it is clear the number of parameters differ and perhaps more of them are available for sklearn. 很明显,参数的数量不同,也许更多的参数可供sklearn使用。

Have any of you tried one versus the other and would you have a preference for using one of them in a classification problem? 你们中的任何人都试过一个而不是另一个,你是否愿意在分类问题中使用其中一个?

Benchmark . 基准

And you will never touch the scipy one again. 你永远不会再触摸scipy了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM