使用Omicverse
#188
Replies: 1 comment
-
不太清楚是不是我的环境问题。 这里提供一种代替方案 from sklearn.mixture import GaussianMixture 假设 'adata.X' 是您希望进行聚类的特征矩阵,或者可以使用其他 'adata.obsm' 中的矩阵data = adata.obsm['scaled|original|X_pca'] # 如果使用 PCA 结果 定义 GMM 模型gmm = GaussianMixture(n_components=21,#与聚类簇数量一致 进行聚类adata.obs['GMM_labels'] = gmm.fit_predict(data) 查看聚类结果print(adata.obs['GMM_labels']) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
关于ov.utils.cluster 函数调用sklearn的问题
TypeError: mclust_py() got an unexpected keyword argument 'covariance_type'
Beta Was this translation helpful? Give feedback.
All reactions