ÁRVORE REPRESENTATIVA

͍ndice

1-Introducao

1 - Introducao

Foi utilizado o “hierarchical clustering”. Abaixo o dendrograma completo.

matrix <- read.csv("matrix.csv")
distMat <- dist(matrix)
hc <- hclust(distMat)
plot(hc)

plot of chunk unnamed-chunk-1

Corte em 2

op = par(mfrow = c(2, 1))
hcd = as.dendrogram(hc)
plot(cut(hcd, h = 2)$lower[[2]])

plot of chunk unnamed-chunk-2

Corte em 1

plot(cut(hcd, h = 1)$lower[[2]])

plot of chunk unnamed-chunk-3

Corte em 0.5

plot(cut(hcd, h = 0.5)$lower[[2]])

plot of chunk unnamed-chunk-4

Árvore 52

Árvore 58


Obs: não consegui fazer a árvore usando RWeka. Gerava o seguinte erro: Error in .jnew(“weka/core/Attribute”, attname[i], .jcast(levels, “java/util/List”)) : java.lang.NoSuchMethodError:

Não achei a solução no stackoverflow e nem em outros foruns.