Task 4: Remove Outliers Implement a function remove_outliers (table) that takes as input an n x m table of numbers. The
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Task 4: Remove Outliers Implement a function remove_outliers (table) that takes as input an n x m table of numbers. The
question down into parts. Think about how to find the maximum and minimum; then how to calculate the average; then how to update your table. Example: calling remove_outliers ([[0,4], [2, 4], [-1,3]] would return [[0,1.5], [2,1.5], [1.5,3]] be- cause the maximum value was 4, the minimum value was -1, and the midway point of -1 and 4 is 1.5. Thus all instances of 4 and -1 were replaced with 1.5.
Task 4: Remove Outliers Implement a function remove_outliers (table) that takes as input an n x m table of numbers. The function replaces every instance of the maximum and minimum value with the midway-point of the maximum and minimum, and returns the altered table. Hint: break the