-
-
Save henriquepgomide/612597a32b2106428ca3b53da3412355 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r | |
# Criar matriz com escalonamento multidimensional | |
mds <- | |
data %>% | |
dist() %>% | |
cmdscale() %>% | |
as_tibble(.name_repair = "unique") | |
colnames(mds) <- c("Dim.1", "Dim.2") | |
# Preparar dados para algoritmo de propagação por afinidade. | |
datacluster <- dist(data) | |
datacluster <- as.matrix(datacluster) | |
apmodel <- apcluster(negDistMat(r = 2), datacluster) | |
mds$cluster <- as.factor(apcluster::labels(apmodel, type = "enum")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment