Answer the following questions based on the city that is assigned to you by your professor. (If it is not assigned to you, contact your professor)
Do not analyze the whole data-set
Filter the data-set and work on your own city
Question 1
Divide the data set to Train and Test Data Sets
Question 2a
Use the train data and create a Naïve Bayes Classifier for predicting whether the customer will buy electronics based on the combination of two variables family income and family size.
Question 2b
Use the test data and your model and make predictions regarding whether the customer will buy electronics based on the combination of two variables family income and family size.
Question 3a
Use the train data and K-Nearest Neighbor Classifier for predicting whether the customer will buy electronics based on the combination of two variables Educational Years and family size.
Question 3b
Use the test data and your model and make predictions regarding whether the customer will buy electronics based on the combination of two variables Educational Years and family size.
Question 4a
Compose the confusion matrix of Naive Bayes Classifier
Compose the confusion matrix of K-Nearest Neighbor
decide which model has better accuracy.
Question 4b
Compose the ROC , gain and lift charts of the Naive Bayes model
Compose the ROC , gain and lift charts of the K-Nearest Neighbor model
which model is better? Argue why?
Question 5
Use k-means clustering, what would be an optimum model that would cluster the buyers based on family income and family size? develop a K-Means model for clustering and Visualize your clusters
Question 6
Using Hierarchical Clustering what is optimum number of clusters of customers do you detect based on EdYears and FamilySize? develop a Hierarchical clustering model and Visualize your clusters
lID 1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
Fname Lname gender 1 Kendra Bennett F 2 Emily LeporowskF 3 Kayla Deneir F 4 Alexandra SchoepfliF 5 Derek Barnes M 6 Neill Caruso-KjM 7 Brittany Schwab F 8 Talan Fromm M 9 Hannah Downs F 10 Paige Nowland F 11 John Chrisman M 12 Tyler Henry F 13 Stephanie Broaddus F 14 Carissa Pacarar F 15 Joseph Hudspeth M 16 Samantha Coleman F 17 Chloe Amidon F 18 Garrett NowkhandaM 19 Alexandra Ward F 20 Samantha Staley F 21 Maleah Kettler F 22 Cody Russell M 23 Heath Beaudry M 24 Summer Sloan F 25 Joshua Demoney M 26 Zoe Walby F 27 Christine PersingerF 28 Shayne King M 29 Landon Grett M 30 Rachel HollingswF 31 Emma Carlson F 32 Robert Van Horn M 33 Christina Colvin F 34 Luke Hogan M 35 Brandon Mustillo M 36 Audrey Harding F 37 Brecken Cobb F 38 Ashley Streech F 39 Elizabeth Hunmel F 40 Alycia Kihn F 41 John Saleeby M 42 Abigail Feeback F 43 Elizabeth LombrittoF 44 Andrew Bouck M 45 Patty Smalley F 46 Rowan Dodson M 47 Tyson Krueger M
City FamilyIncEdYears FamilySiz boughtelectronics Victoria 26331 10 3 NO Toronto 21504 10 4 NO Toronto 31998 10 3 NO Calgary 33273 12 4 YES Calgary 23789 13 4 NO Toronto 19164 10 4 NO Montreal 21377 15 3 NO Calgary 21097 11 2 NO Winnipeg 30711 11 ONE Calgary 30078 13 2 NO Montreal 24063 13 1 NO Toronto 24099 11 3 NO Victoria 33938 10 3 NO Toronto 30331 11 3 NO Winnipeg 33531 17 3 YES Victoria 34849 10 3 NO Winnipeg 19940 10 2 NO Victoria 28168 10 5 YES Ottawa 33781 10 3 NO Ottawa 40643 16 1 NO Vancouver 34133 11 2 NO Vancouver 30157 15 2 NO Ottawa 37938 15 4 YES Vancouver 46509 10 3 YES Calgary 40509 12 4 NO Edmonton 48960 15 5 YES Calgary 22913 11 2 NO Winnipeg 15407 10 3 NO Edmonton 67403 13 3 YES Vancouver 24902 12 4 YES Victoria 29858 10 3 NO Toronto 15030 10 4 NO Edmonton 31000 12 2 NO Montreal 34564 10 4 NO Victoria 24807 11 3 NO Ednonton 40343 10 4 YES Vancouver 30669 10 ON 9 Montreal 33617 10 3 NO Toronto 19915 11 3 NO Vancouver 24147 10 ONE Calgary 16788 10 3 NO Toronto 19201 11 3 NO Calgary 23542 10 4 NO Ottawa 55666 10 3 YES Calgary 16110 11 4 NO Vancouver 33854 10 3 NO Winnipeg 13053 11 2 NO