Question: Using the csv file nbaallelo_log.csv and the KMeans() function, construct a clustering model with k = 2. Read in the file nbaallelo_log.csv as df. Create

Using the csv file nbaallelo_log.csv and the KMeans() function, construct a clustering model with k = 2. Read in the file nbaallelo_log.csv as df. Create a data frame, x, by subsetting the pts and elo_i features. Use the KMeans() function to construct a clustering model with k = 2, and pts and elo_i as the features of interest. Print the centroids of the clusters. If the the feature win_equiv is used instead of pts, the output should be: [[ 32.40866125 1394.4939383 ] [ 49.3401584 1577.91937652]] Open new tab Dock

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!