Your SlideShare is downloading. ×
Hierarchical Clustering
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Hierarchical Clustering

51
views

Published on

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
51
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Kelly Chan | Dec 5 2013 Hierarchical Clustering X dist() hclust() as.matrix() plot() heatmap() data.frame(x,y) Y plot(x,y) Distances – dist() (1) Continuous -> Euclidean distance set.seed(124); par(mar=c(0,0,0,0)) x <- rnorm(20,mean=rep(1:3,each=4),sd=0.5) y <- rnorm(20,mean=rep(c(1,2,1),each=4),sd=0.5) plot(x,y,col="blue",pch=19,cex=2) text(x+0.05,y+0.05,labels=as.character(1:20)) √((x −x ) +( y − y ) ) 2 1 2 2 1 2 (2) Binary -> Manhattan distance ∣x 1 −x 2∣+∣ y1 − y2∣ (3) Continuous – Correlation Similarity dataFrame <- data.frame(x=x,y=y) distxy <- dist(dataFrame) hClustering <- hclust(distxy) plot(hClustering) dataFrame <- data.frame(x=x,y=y) set.seed(1344) dataMatrix <- as.matrix(dataFrame)[sample(1:20),] heatmap(dataMatrix)