Q34. A student writes: kmeans = KMeans(n_clusters=3) df["cluster"] = kmeans.fit(X) What is the issue?Single choice
A
KMeans cannot be used with DataFrames
B
.fit() does not return cluster labels; use .fit_predict() or .labels_
C
The number of clusters must be 2
D
The DataFrame must be sorted first
E
The model must be saved before fitting
Log in for full answers
We've collected over 50,000 authentic original questions and detailed explanations from around the globe. Log in now and get instant access to the answers!
Similar Questions
The goal of clustering a set of data is to:
Which of the following statements about clustering in machine learning is true?
Your team experiments with increasing K in K-Means from 3 to 8. What is the expected effect?
In k-means clustering, what is the primary goal of the algorithm? (you can choose more than one)
More Practical Tools for Students Powered by AI Study Helper
Making Your Study Simpler
Join us and instantly unlock extensive past papers & exclusive solutions to get a head start on your studies!