You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
```{r 10-plot-clusters-2, fig.height = 4, fig.width = 4.35, fig.align = "center", fig.cap = "The data colored by the cluster assignments returned by K-means."}
781
781
cluster_plot <- ggplot(clustered_data,
782
782
aes(x = flipper_length_mm,
783
783
y = bill_length_mm,
@@ -885,7 +885,7 @@ clustering_statistics
885
885
Now that we have `tot.withinss` and `k` as columns in a data frame, we can make a line plot
886
886
(Figure \@ref(fig:10-plot-choose-k)) and search for the "elbow" to find which value of K to use.
```{r 10-plot-choose-k, fig.height = 4, fig.width = 4.35, fig.align = "center", fig.cap = "A plot showing the total WSSD versus the number of clusters."}
889
889
elbow_plot <- ggplot(clustering_statistics, aes(x = k, y = tot.withinss)) +
890
890
geom_point() +
891
891
geom_line() +
@@ -919,7 +919,7 @@ but there is a trade-off that doing many clusterings
```{r 10-choose-k-nstart, fig.height = 4, fig.width = 4.35, message= F, warning = F, fig.cap = "A plot showing the total WSSD versus the number of clusters when K-means is run with 10 restarts."}
0 commit comments