Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part 1. Clustering using shoeSales.csv You will be using the data set shoeSales.csv. This data set contains transactions from 250 customers, Each shows the type
Part 1. Clustering using shoeSales.csv You will be using the data set shoeSales.csv. This data set contains transactions from 250 customers, Each shows the type of shoes purchased (Athletic, Casual, Dress, Sandal, Work) and the amount spent. The goal is to find clusters of customers who have similar buying behaviors. (1) Read the data from shoeSales.csv and assign it to shoe data frame. (2) Run kmean=1. What is the total within cluster sum of squares? (3) Run kmeans 4(km4) to determine 4 clusters. Assign the result to km4 object. Use the following R code before running kmeans() function to get the same answer in each run. set. seed (125) (4) What is the total within cluster sum of squares with 4 clusters? (5) What percent of the total within sum of squares is explained by using 4 clusters? (6) How many customers are there in each cluster? (7) Display stores in the order of cluster numbers. To answer this question: - The vector km4\$C7uster displays the cluster number for each customer. Display this vector. - Add this vector km4\$C7 uster as a new column to shoe data frame. (Shoe is the data frame that you read shoeSales data into in Question 1). shoe\$c7uster
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started