User Tools

Site Tools


mkatari-bioinformatics-august-2013-clustering

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
mkatari-bioinformatics-august-2013-clustering [2014/12/11 15:11] – [K-means] mkatarimkatari-bioinformatics-august-2013-clustering [2014/12/11 15:24] – [K-means] mkatari
Line 83: Line 83:
 colnames(scaledSigGenes)=colnames(sigGenes.normalized) colnames(scaledSigGenes)=colnames(sigGenes.normalized)
  
-#now to run k-means +#now to run k-means, in this case we are starting with 2 cluster. 
-SigGenes.kmeans.2 = kmeans(scaledSigGenes, 2)+#just like for heirarchical clustering, we have to first transpose the data so compare genes. 
 + 
 +SigGenes.kmeans.2 = kmeans(t(scaledSigGenes), 2
 + 
 +#a plot of the groups 
 +plot(SigGenes.kmeans.2$centers[1,], SigGenes.kmeans.2$centers[2,])
  
 # a measure of how well the clustering has performed # a measure of how well the clustering has performed
mkatari-bioinformatics-august-2013-clustering.txt · Last modified: 2015/06/17 13:26 by mkatari