File:Ruspini.png
Jump to navigation
Jump to search
Size of this preview: 800 × 440 pixels. Other resolution: 1,000 × 550 pixels.
Original file (1,000 × 550 pixels, file size: 81 KB, MIME type: image/png)
Summary
library(cluster)
- ruspini is 75 x 2
data(ruspini) hc <- hclust(dist(ruspini), "ave"); plot(hc)
- si <- silhouette(groups, dist(ruspini))
- plot(si, main = paste("k = ", 4))
op <- par(mfrow= c(3,2), oma= c(0,0, 3, 0),
mgp= c(1.6,.8,0), mar= .1+c(4,2,2,2))
plot(hc) for(k in 2:6) {
groups<- cutree(hc, k=k) si <- silhouette(groups, dist(ruspini)) plot(si, main = paste("k = ", k))
} par(op)
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 10:21, 10 August 2022 | 1,000 × 550 (81 KB) | Brb (talk | contribs) | library(cluster) # ruspini is 75 x 2 data(ruspini) hc <- hclust(dist(ruspini), "ave"); plot(hc) # si <- silhouette(groups, dist(ruspini)) # plot(si, main = paste("k = ", 4)) op <- par(mfrow= c(3,2), oma= c(0,0, 3, 0), mgp= c(1.6,.8,0), mar= .1+c(4,2,2,2)) plot(hc) for(k in 2:6) { groups<- cutree(hc, k=k) si <- silhouette(groups, dist(ruspini)) plot(si, main = paste("k = ", k)) } par(op) |
You cannot overwrite this file.
File usage
The following page uses this file: