See this thread.
This post was updated.
"A big computer, a complex algorithm and a long time does not equal science." -- Robert Gentleman
Visualizzazione post con etichetta distance. Mostra tutti i post
Visualizzazione post con etichetta distance. Mostra tutti i post
lunedì 23 aprile 2007
martedì 17 aprile 2007
From Similarity To Distance matrix
# This function returns an object of class "dist"
sim2dist <- function(mx)
as.dist(sqrt(outer(diag(mx), diag(mx), "+") - 2*mx))
# from similarity to distance matrix
d.mx = as.matrix(d.mx)
d.mx = sim2dist(d.mx)
# The distance matrix can be used to visualize
# hierarchical clustering results as dendrograms
hc = hclust(d.mx)
plot(hc)
See Multivariate Analysis (Probability and Mathematical Statistics)
Iscriviti a:
Post (Atom)