Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 vectorStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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