mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-12-26 17:49:09 +00:00
9a3181a92b
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
7 lines
221 B
Python
7 lines
221 B
Python
import numpy as np
|
|
|
|
def calculate(starting_score, opposing_score, observed, N, K):
|
|
|
|
expected = 1/(1+10**((np.array(opposing_score) - starting_score)/N))
|
|
|
|
return starting_score + K*(np.sum(observed) - np.sum(expected)) |