Question: BUAN 6 2 0 Data Science Foundations Designed by: Dr . Roy Jafari Programing Assignmnet # 6 Fill in your name first: - Name: -

BUAN 620 Data Science Foundations
Designed by: Dr. Roy Jafari
Programing Assignmnet #6
Fill in your name first:
-Name:
-Redlands Email ID:
In [1]: import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
Chapter 13- Excercise 8
In this exercise, we would like to use the dataset Cereals.csv. This dataset contains rows of information about different cereal products. We would like to perform clustering analysis on this dataset, first using K-means and then using PCA. Perform the following steps.
In [2]: cereal_df = pd.read_csv('Cereals.csv')
cereal_df.head()
\table[[,name,mfr,type,calories,protein,fat,sodium,fiber,carbo,sugars,potass,vitamins,shelf,weight,cups,rating],[0,100%?Bran,N,C,70,4,1,130,10.0,5.0,6.0,280.0,25,3,1.0,0.33,68.402973],[1,100%?NaturalBran,Q,C,120,3,5,15,2.0,8.0,8.0,135.0,0,3,1.0,1.00,33.983679],[2,All-Bran,K,C,70,4,1,260,9.0,7.0,5.0,320.0,25,3,1.0,0.33,59.425505],[3,All-Bran_with_Extra_Fiber,K,C,50,4,0,140,14.0,8.0,0.0,330.0,25,3,1.0,0.50,93.704912],[4,Almond_Delight,R,C,110,2,2,200,1.0,14.0,8.0,NaN,25,3,1.0,0.75,34.384843]]
a. Impute a central tendency of the attribute for all the missing values.
In []:
b. What central tendency did you choose and why?
In []:
c. Why did we impute using the central tendency? why not other methods? Answer by commenting on how the data will b e used next (clustering).
 BUAN 620 Data Science Foundations Designed by: Dr. Roy Jafari Programing

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 Databases Questions!