I have soccer data with a time series index. 30 seconds interval. So, 194 rows for 90+ minutes per game. I have 1500 games. The dataframe has the following information.
Home/Away:
• Goal Total.
• Shots Total.
• Dangerous Attack Total and.
• XG(Expected goal per game) given at the start of the match which needs to be adjusted per section.
I am required to build a time series model to predict time t+1 (say Goal score).
Given that for each variable the graph shows the highest spike in the later stage of the time, Is there any machine learning algorithms that can learn with such a small dataset?
Sample Data
g = pd.DataFrame({'TimeSlot':[0, 30000, 60000, 90000, 120000, 150000, 180000, 210000, 240000, 270000, 300000],
'xG_A':[1.5]*11, 'xG_B':[1.2]*11, 'A_DAT':[0,1,2,3,4,4,5,5,6,6,7],
'B_DAT':[0,0,1,1,2,2,2,3,3,3,4],
'A_ST':[0,0,1,1,2,2,2,3,3,3,3], 'B_ST':[0,0,0,1,1,1,1,2,2,2,2],
'A_GT':[0,0,0,0,0,0,1,1,1,1,2], 'B_GT':[0,0,0,1,1,1,1,1,1,1,1]})
g.set_index('TimeSlot', inplace=True)
The assumption is only one Goal/Shot can be scored/taken per Timeslot. So the same data per period will look like...
f= pd.DataFrame({'TimeSlot':[0, 30000, 60000, 90000, 120000, 150000, 180000, 210000, 240000, 270000, 300000],
'xG_A':[1.5]*11, 'xG_B':[1.2]*11, 'A_DATP':[0,1,1,1,1,0,1,0,1,0,1],
'B_DAP':[0,0,1,0,1,0,0,1,0,0,1],
'A_STP':[0,0,1,0,1,0,0,1,0,0,0], 'B_STP':[0,0,0,1,0,0,0,1,0,0,0],
'A_GTP':[0,0,0,0,0,0,1,0,0,0,1], 'B_GTP':[0,0,0,1,0,0,0,0,0,0,0]})
f.set_index('TimeSlot', inplace=True)
***ARIMA(2,1,0) with train, test = X[0:size], X[size:len(X)]
gives MSE:0.323 for g and MSE: 0.291 for f.***
Questions
Which dataframe should I use?
I would really appreciate if someone starts off with a few python codes...