정말 혼란 스럽습니다. R
에 'Mclust' model object
에 대한 플롯 (분류 또는 불확실성)의 축 레이블을 변경하고 싶습니다. 왜 두 개 변수로만 된 단순한 객체가 아닌 여러 객체에서 작동하는지 이해할 수 없습니다. 여기에 예를 R : plot에서 축 레이블 변경. gcplot2를 사용한 mclust 모델의 불확실성 및/또는 불투명도
require(mclust)
mod1 = Mclust(iris[,1:2])
plot(mod1, what = "uncertainty", dimens = c(1,2), xlab = "test")
# changed x-axis-label
mod2 = Mclust(iris[,1:4])
plot(mod2, what = "uncertainty", dimens = c(1,2), xlab = "test")
# no changed x-axis-label
또 다른 방법은 coordProj
로했다 :
coordProj(data= iris[, -5], dimens = c(1,2), parameters = mod2$parameters,
z = mod2$z, what = "uncertainty", xlab = "test")
# Error in plot.default(data[, 1], data[, 2], pch = 19, main = "", xlab = xlab, :
# formal argument "xlab" matched by multiple actual arguments
은 그래서 어쩌면
ggplot2
함께 작동합니다 (그리고 내가 제일 좋아하는 옵션이 될 것이다), 생각했다. 이제 축 레이블을 변경할 수는 있지만 타원을 그리는 방법을 모르겠습니다. 누군가가 솔루션
plot.Mclust
의 축 레이블을 변경 알고있을 또는
ggplot
에 타원을 추가 할 경우
require(ggplot2)
ggplot(data = iris) +
geom_point(aes(x = Sepal.Length, y = Sepal.Width, size = mod2$uncertainty)) +
scale_x_continuous(name = "test")
그것은 좋은 것입니다. 감사합니다.
내가 ELKI에 의해 수행 시각화 좋아 : https://en.m.wikipedia.org/wiki/File:EM_Clustering_of_Old_Faithful_data.gif 도와 –