欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

GMM

程序员文章站 2024-03-25 08:23:22
...
import numpy as np
from sklearn.mixture import GaussianMixture
file="/home/lijing/R/mature/A549/feature/ANF/neg.csv"
X = np.loadtxt(open(file, "r"), delimiter=",", skiprows=0)
gmm = GaussianMixture(n_components=5)
gmm.fit(X)
labels = gmm.predict(X)
np.savetxt(path + "/home/lijing/R/featureOri/label/matureA549label.txt", labels, delimiter=",")
print(labels)