In Python
12. The variable AQI_data is a tuple whose first element is a list of x coordinates and whose second element is a list of y coordinates. The y coordinates are the Air Quality Index values (CO concentration per hour) per day in an Italian city. The x coordinates are days, and, in order, they take the values 1-50. Create plots under the specified scenarios below using an x_new_list of 100 equally spaced points between 1 and 50. For all scenarios, plot the original data points in AQI_data as black squares with markers of size 5.
Scenarios:
Without median filtering: Linear interpolation (green circles with dashed line). A kernel smoother with h = 0.1, 1, and 10. Overlay all three kernel smoothers on the same plot: Use a solid blue line for h = 0.1, solid green line for h = 1, and solid magenta line for h = 10. A knn smoother with k = 1, 5, and 15. Overlay all three knn smoothers on the same plot: Use a solid blue line for k = 1, solid green line for k = 5, and solid magenta line for k = 15.
With median filtering (W = 5): Linear interpolation (green circles with dashed line). A kernel smoother with h = 0.1, 1, and 10. Overlay all three kernel smoothers on the same plot: Use a solid blue line for h = 0.1, solid green line for h = 1, and solid magenta line for h = 10. A knn smoother with k = 1, 5, and 15. Overlay all three knn smoothers on the same plot: Use a solid blue line for k = 1, solid green line for k = 5, and solid magenta line for k = 15.