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)
上一篇: 图像量化(kmeans)
下一篇: 将RGB图像转换为灰度图像