From the course: R for Data Science: Lunch Break Lessons

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Understanding silhouette graphs

Understanding silhouette graphs

- [Instructor] Last week, I mentioned the silhouette graph and said I would come back to it to explain it in more detail, and so let's spend some time this week talking about this very useful graph in the clustering world. The functions in the cluster library provide the silhouette graph, and it measures the quality of the cluster that's created. So using a silhouette graph, you can adjust your parameters to come up with tighter clusters. Let's take a look at this. The first thing you'll need to do is bring in the cluster library, and you can see I've done that in line two. I'll hit run. And then, I've created a vector called simpleQuakes, which is a sampling of quakes. It's only 25 observations long, but for the sake of demonstration here, it makes things much easier. So I'm going to go ahead and run that and create simpleQuakes. Let's create a silhouette graph. S-I-L-H-O-U-E-T-T-E. And we're going to…

Contents