krishnakartik1 / LSTM-footballMatchWinner

This repository contains the code for a conference paper "Predicting the football match winner using LSTM model of Recurrent Neural Networks" that we wrote
57 stars 25 forks source link

Incorrect approach in the new LSTM notebook #5

Closed Suwadith closed 2 years ago

Suwadith commented 2 years ago

When creating training and test datasets you have used the following code

x_train, y_train = dataTrain.iloc[:,:28].values,dataTrain.iloc[:,28:].values
x_train=np.reshape(x_train,(1860,28,1))
x_test, y_test = dataTest.iloc[:,:28].values,dataTest.iloc[:,28:].values
x_test=np.reshape(x_test,(800,28,1))

dataTrain.iloc[:,:28] this is completely wrong. You are still passing the original FTR column(Which is actually the current match result), which is the 0th column.

It should've been dataTrain.iloc[:,1:28] instead

The correct version would've been as described below

x_train, y_train = dataTrain.iloc[:,1:28].values,dataTrain.iloc[:,28:].values
x_train=np.reshape(x_train,(1860,27,1))
x_test, y_test = dataTest.iloc[:,1:28].values,dataTest.iloc[:,28:].values
x_test=np.reshape(x_test,(800,27,1))

When modified correctly it only gives 54% accuracy.

Hence the results produced are completely misleading.

krishnakartik1 commented 2 years ago

Thanks for pointing it out, apologies for the oversight! I shall fix it