FAQ: K-Means++ Clustering - Introduction to K-Means++

This community-built FAQ covers the “Introduction to K-Means++” exercise from the lesson “K-Means++ Clustering”.

Paths and Courses
This exercise can be found in the following Codecademy content:

FAQs on the exercise Introduction to K-Means++

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

Is it only me, or the code for step 1 of this exercise does not show what is described in the instructions? I expected two plots (to compare K-means and K-means ++ clustering) and a printout of the resulting inertia. Instead, the outputs of the code are a single plot and the run times.

Look at the point at x=0.2 and y=1 . On the top graph you should see a purple point, but on the bottom graph a yellow point.

Isn’t the labels in two results have the opposite meanings each other? It is inconsistent with the description above.

If I reverse the color specification on line 47, it is consistent with the description.

# colors = ['#6400e4', '#ffc740']
colors = ['#ffc740', '#6400e4']