在下面的代码中,他们使用自编码器作为有监督的聚类或分类,因为他们有数据标签。但是,如果我没有数据标签,可以使用自编码器来聚类数据吗?
关于此问题的更多信息,请参见http://amunategui.github.io/anomaly-detection-h2o/。
谢谢。
m <- h2o.deeplearning(
2:564, training_frame = tfidf,
hidden = c(2), auto-encoder = T, activation = "Tanh"
)
f <- h2o.deepfeatures(m, tfidf, layer = 1)
d <- as.matrix(f[1:30,]) #Just first 30, to avoid over-cluttering
labels <- as.vector(tfidf[1:30, 1])
plot(d, pch = 17) #Triangle
text(d, labels, pos = 3) #pos=3 means above
(注:原始数据来源于Brandon Rose的优秀文章,介绍使用NLTK进行聚类分析。)
h2o.scoreHistory(m)
获取数据)。 - Darren Cook