Machine Learning, Data Science, Healthcare, Biology.
inertias.append(model.inertia_) plt.plot(ks, inertias, '-o', color='black') plt.xlabel('number of clusters, k') plt.ylabel('inertia') plt.xticks(ks) plt.show() Figure 3. Scree plot showing a slow decrease of inertia after k = 4. Fig. 3 shows that after 4 clusters(at the elbow), the change in the