def fit(self, X, y=None):
"""Compute mixture of von Mises Fisher clustering.
Parameters
----------
X : array-like or sparse matrix, shape=(n_samples, n_features)
"""
if self.normalize:
X = normalize(X)
self._check_force_weights()
random_state = check_random_state(self.random_state)
X = self._check_fit_data(X)
(self.cluster_centers_, self.labels_, self.inertia_, self.weights_,
self.concentrations_, self.posterior_) = movMF(
X, self.n_clusters, posterior_type=self.posterior_type,
force_weights=self.force_weights, n_init=self.n_init,
n_jobs=self.n_jobs, max_iter=self.max_iter,
verbose=self.verbose, init=self.init,
random_state=random_state,
tol=self.tol, copy_x=self.copy_x
)
return self
von_mises_fisher_mixture.py 文件源码
python
阅读 28
收藏 0
点赞 0
评论 0
评论列表
文章目录