Question: The datatset is: https://archive.ics.uci.edu/ml/datasets/Iris 4 (15 points) Data Manipulation In this question, we still use the Iris dataset from Homework 1 Question 6. In fact,

 The datatset is: https://archive.ics.uci.edu/ml/datasets/Iris 4 (15 points) Data Manipulation In this

The datatset is: https://archive.ics.uci.edu/ml/datasets/Iris

4 (15 points) Data Manipulation In this question, we still use the Iris dataset from Homework 1 Question 6. In fact, you can see the shape of array X is (150, 4) by running X. shape, which means it contains 150 data points where each has 4 features. Here, we will perform some basic data manipulation and calculate some statistics: 1. Divide array X evenly to five subsets of data points: Group 1: 1st to 30th data point, Group 2: 31st to 60th data point, Group 3: 61st to 90th data point, Group 4: 91st to 120th data point, Group 5: 121st to 150th data point. Then calculate the mean of feature vectors in each group. Your results should be five 4x1 vectors (i.e. shape of NumPy array should be (4,1)). 2. Remove 2nd and 3rd features from array X, resulting a 150 x 2 matrix. Then calculate the mean of all feature vectors. Your result should be a 2 x 1 vector. 3. Remove last 10 data points from array X, resulting a 140 x 4 matrix. Then calculate the mean of feature vectors. Your result should be a 4x 1 vector

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!