Predicting future stats in Madden [closed]

I have a bunch of a Madden stats from players over the past 4 years and attributes (Speed, Throw Power, etc) to go along with them.

I’ve already run the correlation analysis and figured out which attributes are the best indicators of stats, but I would like to use scikit-learn to see if I can predict future stats.

I’d like some feedback on if I’m doing this the right way as some of the answers I’m getting don’t match up.

X = all_years[['AWARENESS','THROW ACC','THROW POWER']]
y = all_years[['TD']]

X_train, X_test, y_train, y_test=train_test_split(X,y,test_size=0.4,random_state=100)

X_train = X_train.values
X_test = X_test.values
y_train = y_train.values
y_test = y_test.values

model = LinearRegression()
model.fit(X_train,y_train)
FLACCO = pd.DataFrame([[96,94,93]])
LINDLEY = pd.DataFrame([[90,89,88]])


y_pred = model.predict(X_test)
scores = model.score(X_test, y_test)

f_predict = model.predict(FLACCO)
l_predict = model.predict(LINDLEY)
print(f_predict)
print(l_predict)

  • We would need more information on “how” the predictions don’t match up. So trails of answer: 1) What are your scores? Does the regressor predict well at all? 2) Linear Regressors are great, and work well in many scenarios. Can you make the hypothesis that a Linear Regressor would fit your data well in your scenario? If not, maybe try a different regressor. 3) If your dataset is big enough, look into cross-validation. Bottom line: Many things can go wrong while trying to fit the model. Give us the info so that we can help you figure it out. Also, look up the Data science stack exchange.

    – 




  • I’m new to ML so I’m not sure if these are the metrics you’re looking for. MSE: 75.18 (I understand a lower number is better) Test Accuracy: .287 (This was model score X_test, y_test) Training Accuracy: .212 (This was model score X_Train, y_train)

    – 

  • Since this is a regression, accuracy does not make sense/matter that much. MSE is what you want to look at. What is the scale of the thing you are trying to predict? A MSE of 75.18 is big if you want to predict something between 0 and 1, but very small if you want to predict something on the scale of 10^10. Edit your post to add the information, so others don’t have to read comments. I would recommend reading the scikit-learn documentation before posting, too. Your interaction with me tells me you haven’t read it or have read it diagonally (perhaps too much).

    – 




Leave a Comment