Python: How can we smooth a noisy signal using moving average?
For an evaluation of a random forest regression, I am trying to improve a result using a moving average filter after fitting a model using a RandomForestRegressor for a dataset found in this link import pandas as pd import math import matplotlib import matplotlib.pyplot as plt import numpy as np from sklearn.ensemble import RandomForestRegressor, GradientBoostingRegressor from sklearn.model_selection import GridSearchCV from sklearn.metrics import r2_score, mean_squared_error, make_scorer from sklearn.model_selection import train_test_split from math import sqrt from sklearn.cross_validation