I want to batch inputs from 2000-2020 using 3 year windows while creating a linear regression algorithm in python to see what those three years meant for the fourth years data.
input data example: [2000, 2001, 2002], [2001, 2002, 2003], [2002, 2003, 2004]
output data: [2003], [2004] [2005]
I want my classifier to parse through the entire data set from 2000-2020 as such and fit the linear regression to its findings as a whole.
I don't have an "I've done this so far" example code as I thought about a for loop for the years but if I'm understanding correctly, my reg.fit(x,y) command would reset the fit each time through the loop and ultimately my fit would just end up being an input of [2017, 2018, 2019] with [2020] being the output overwriting all the previous fits.