Question: The only allowed liabriries are pandas and NumPy Question 1: Data Preprocessing (40 points) You are asked to implement three different data preprocessing approaches: -

The only allowed liabriries are pandas and NumPy Question 1: Data PreprocessingThe only allowed liabriries are pandas and NumPy

Question 1: Data Preprocessing (40 points) You are asked to implement three different data preprocessing approaches: - Min-Max Scaling: Scaling each column of the data to be between lower and higher. - Standard Scaling: Scale each column of the data so that it has zero mean and unit variance - Max Filling: Replace any missing data with the maximum of the non-missing data Assume that the given data is a 2D NumPy array of shape (n,m). You do not need to do any error handling. It is strongly recommended to test your methods to check whether they work as expected. \# 15 points def fill_with_max(data, inPlace = False): "This function replaces the missing data (given as np.nan) with the maximum of the rest of the data. Example: data = [[np.nan, np.nan, 3,5],[2,4,6,8]] Then output =[[2,4,3,5],[2,4,6,8]] Input: data: A 2 numpy array of shape ( n,m) Output: The filled version of the data, still a 2D numpy array of shape (n,m) WARNINGs: - This is per column so do not mix the maximum of one column with the other "l" \# YOUR CODE HERE

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!