Browse Source

more correlation

master
PerryXDeng 5 years ago
parent
commit
2a5a423571
4 changed files with 11 additions and 6 deletions
  1. +1
    -1
      data_preparation/cleaned/expSmoothWorkAndFatigueData.csv
  2. +2
    -1
      findings/r2correlation.txt
  3. +7
    -3
      hypotheses_modeling/team_regressions.py
  4. +1
    -1
      hypotheses_modeling/time_series_days_ranked.csv

+ 1
- 1
data_preparation/cleaned/expSmoothWorkAndFatigueData.csv View File

@ -1,4 +1,4 @@
"","day","totalWork","averageWorkLoad","smoothedWork","smoothedFatigueData"
"","TimeSinceAugFirst","totalWork","averageWorkLoad","smoothedWork","smoothedFatigueData"
"1",0,4855,255.526315789474,4855,0.734457489003587 "1",0,4855,255.526315789474,4855,0.734457489003587
"2",1,1380,138,5921.8864123285,1.17226558337237 "2",1,1380,138,5921.8864123285,1.17226558337237
"3",2,6030,231.923076923077,11569.9661032971,1.37713723445689 "3",2,6030,231.923076923077,11569.9661032971,1.37713723445689

+ 2
- 1
findings/r2correlation.txt View File

@ -1,4 +1,5 @@
Document Linear Relationship Document Linear Relationship
7 day moving average team workload - normalized team fatigue: 0.0006 7 day moving average team workload - normalized team fatigue: 0.0006
21 day moving average team workload - normalized team fatigue: 0.0024 21 day moving average team workload - normalized team fatigue: 0.0024
normalized team fatigue - game day performance: 0.0696
normalized team fatigue - paper smoothed workload fatigue: 0.0324

+ 7
- 3
hypotheses_modeling/team_regressions.py View File

@ -17,7 +17,11 @@ def k_days_into_future_regression(X, y, k, n0):
out = [] out = []
for day in y[col][n0 - 1:]: for day in y[col][n0 - 1:]:
prev = day - k prev = day - k
xprev = X[X[col] == prev].drop(columns=[col]).to_numpy()[0, :]
xprev = X[X[col] == prev].drop(columns=[col]).to_numpy()
if xprev.shape[0] != 1:
continue
else:
xprev = xprev[0, :]
yt = y[y[col] == day].drop(columns=[col]).to_numpy()[0, :] yt = y[y[col] == day].drop(columns=[col]).to_numpy()[0, :]
inp.append(xprev) inp.append(xprev)
out.append(yt) out.append(yt)
@ -31,8 +35,8 @@ def k_days_into_future_regression(X, y, k, n0):
def main(): def main():
fatigueSums = pd.read_csv("fatigue_total_sum.csv") fatigueSums = pd.read_csv("fatigue_total_sum.csv")
workMovingAverage21 = pd.read_csv("21DaySlidingWorkAverage.csv", index_col=0)
print(k_days_into_future_regression(workMovingAverage21, fatigueSums, 0, 21))
performance = pd.read_csv("../data_preparation/cleaned/expSmoothWorkAndFatigueData.csv", index_col=0).drop(columns=["totalWork", "averageWorkLoad", "smoothedFatigueData"])
print(k_days_into_future_regression(fatigueSums, performance, 0, 1))
if __name__ == "__main__": if __name__ == "__main__":

+ 1
- 1
hypotheses_modeling/time_series_days_ranked.csv View File

@ -1,4 +1,4 @@
,Date,DailyElo
,TimeSinceAugFirst,DailyElo
0,121,0.0 0,121,0.0
1,122,-3.714599999999998 1,122,-3.714599999999998
2,178,0.04346000000000028 2,178,0.04346000000000028

Loading…
Cancel
Save