search for: mdist

Displaying 4 results from an estimated 4 matches for "mdist".

Did you mean: dist
2003 Jun 09
1
estimate the number of clusters
...estimate the number of clusters in a microarray dataset. Initially, I used the iris data to test my piece of code as follows: library(cluster) data(iris) mydata<-iris[,1:4] maxk<-15 # at most 15 clusters myindex<-rep(0,maxk) # hold the si values for each k clusters mdist<-1-cor(t(mydata)) #dissimlarity mdist<-as.dist(mdist) for(k in 2:maxk) { hc<-diana(mdist,diss =TRUE, stand = FALSE) si<-silhouette.default(cutree(as.hclust(hc),k=k),mdist) myindex<-summary(si)$avg.width } myk<-rev(order(myindex))[1] #select the number of k clusters w...
2007 Oct 03
2
Speeding up simulation of mean nearest neighbor distances
...o simulate the mean 1st through nth nearest neighbor distances for a random spatial pattern using the functions nndist() and runifpoint() from spatsat. It works, but runs relatively slowly - would appreciate suggestions on how to speed up this function. Thanks. --Dale library(spatstat) sim.nth.mdist <- function(nth,nsim) { D <- matrix(ncol=nth, nrow=nsim) for (i in 1:nsim) { rpp <- runifpoint(22, win=owin(c(0,1),c(0,1)), giveup=1000) for (k in 1:nth) D[i,k] <- mean(nndist(rpp ,k=k)) } D } sim.nth.mdist(5,100)
2004 Aug 19
3
Do you know if you can map a large minimum spanning tree in R?
...tats/programming software such as SAS, however no longer have access to SAS so I've turned to R. I also have tried using MapInfo with the data exported from R, but have found that not so intuitive to learn on the fly. Back to R - I'm using W2K, and have managed to graph the tree using plot(mdist,graph="nsca") where mdist is the output matrix from my mst command, however this is not terribly map-like, so I'm looking for a better display that can be embedded in a document. Any assistance gratefully received! Fiona. > Fiona Wade > Project Manager > MARA > F&A &g...
2010 Feb 21
1
How to: Compare Two dendrograms (Hierarchical Clusterings) ?
Hello all, I wish to compare two dendrograms (representing Hierarchical Clusterings). My problems are several: 1) how do I manually create a dendrogram object ? That is, how can I reconstruct it as an "hclust" object that creates such a dendrogram, when all I have is the dendrogram image (but don't have the underlaying distance matrix that produced it) ? I see that there is a