Technical Deep Dive, Forecasting, Data Science, Model Validation, Evaluation Metric.
return history[(len(history) - horizon): ] # Naïve Forecast with Drift def naive_forecast_with_drift(history, horizon): t = [1,len(history)] f = interpolate.interp1d(t, [history[0],history[-1]], fill_value = "extrapolate") return [f(i) for i in range(len(history)+1, len(history)+1+horizon )] #