Selecting K with the elbow method