Page 1 of 1

1 import seaborn as sns 2 import numpy as np 3 sns.set(style='whitegrid', palette="deep", font_scale=1.1, rc={ "figure.f

Posted: Sat May 14, 2022 6:44 pm
by answerhappygod
1 Import Seaborn As Sns 2 Import Numpy As Np 3 Sns Set Style Whitegrid Palette Deep Font Scale 1 1 Rc Figure F 1
1 Import Seaborn As Sns 2 Import Numpy As Np 3 Sns Set Style Whitegrid Palette Deep Font Scale 1 1 Rc Figure F 1 (47.31 KiB) Viewed 34 times
Using Python please.
Use ANY customer.csv dataset.(I cant provide link due to answers
policy) and (I only need the solution so dataset does not
matter.
1 import seaborn as sns 2 import numpy as np 3 sns.set(style='whitegrid', palette="deep", font_scale=1.1, rc={ "figure.figsize": [15, 10]}) 4 import matplotlib.pyplot as plt 5 import pandas as pd U 1 **************** 2 # Programmer Name: 3 # class: CIS4321, Spring 2022 4 # Programming Assignment 5 # Date: 6 # 7 # 8# Description: 9 ********************************************** Background In this assignment use customer_data.csv, you will conduct data mining analysis on customer data which have basic data like age, gender, annual income in k$ and spending score. The goal of this assignment is to identify customer cluster 'segments' using K-Means Clustering in order to gain insight which customers segments should the company target for marketing. 1. Import customers.csv into customers_df U 1 # solution

7. Join the X_pca and cust_km_output into one data frame x_pca_df and name the predicted column as 'cluster' 1 # solution 8. Run the pair plot on X_pca_df, color the data points by their clusters and interpret the plot. U 1 # solution 9. Join the X pca_df with the original data frame customers_df and plot a scatter plot of Income vs Spending and color the data points by their clusters. Discuss the plot results. U 1# solution - 10. Create a summary table (sample below) and fill the value with the median value for each group. Hint: Use groupby function. Age Income Spending cluster Gender Female Male