From 86c7f33f239882828e906dfb61aaeb5f3b87b60a Mon Sep 17 00:00:00 2001 From: art Date: Wed, 2 Oct 2019 20:56:06 -0500 Subject: [PATCH 1/4] stuff --- data analysis/analysis/analysis.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data analysis/analysis/analysis.py b/data analysis/analysis/analysis.py index d018c524..eea0425e 100644 --- a/data analysis/analysis/analysis.py +++ b/data analysis/analysis/analysis.py @@ -295,6 +295,11 @@ def regression_engine(device, inputs, outputs, args, loss = torch.nn.MSELoss(), return regressions +#@jit TODO: determine jit type +def elo(starting_score): + + + @jit(forceobj=True) def r_squared(predictions, targets): # assumes equal size inputs From 04411327e850f05cbf9faa68e8d177a843935fcf Mon Sep 17 00:00:00 2001 From: art Date: Wed, 2 Oct 2019 20:57:09 -0500 Subject: [PATCH 2/4] quick tests --- data analysis/analysis/analysis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data analysis/analysis/analysis.py b/data analysis/analysis/analysis.py index eea0425e..cc8feedd 100644 --- a/data analysis/analysis/analysis.py +++ b/data analysis/analysis/analysis.py @@ -296,9 +296,9 @@ def regression_engine(device, inputs, outputs, args, loss = torch.nn.MSELoss(), return regressions #@jit TODO: determine jit type -def elo(starting_score): +def elo(starting_score, observed, N, K): - + pass @jit(forceobj=True) def r_squared(predictions, targets): # assumes equal size inputs From 7224c31e6dae23ab576be027a2199426b38e1cb3 Mon Sep 17 00:00:00 2001 From: art Date: Thu, 3 Oct 2019 10:42:05 -0500 Subject: [PATCH 3/4] analysis.py v 1.1.2.002 --- .../__pycache__/analysis.cpython-36.pyc | Bin 16024 -> 16290 bytes data analysis/analysis/analysis.py | 13 +++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/data analysis/analysis/__pycache__/analysis.cpython-36.pyc b/data analysis/analysis/__pycache__/analysis.cpython-36.pyc index 16f3a706285cc0b1501163b5e2e09c019f9ddb7c..c61d176c9f268d98f91832a330b5a468b6b82edd 100644 GIT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_)+a8Ju!Y1N9*d;qk=BrT-~=2#3{Q+4T|U2@UnddE@mq0tpFqFb5z0G_@v`i`_p1^ zUC*PZqmdLpK}jm55{sl_XQp{bJUF)T@x=xwETOBRcNZy~qIj4fiq=-M+9~KIywb4d z9V4-dph|cQVe#Qh+h+a+etj{NlLV zq2FTieZ1=a;J_3m$eHA)=<#_1nVwGNd8&Ydc5TUa?`yt;E6vMY|5$;v;H7MTuYlBPf>`dxKf~3Q zz{B^dB}^O1ca<2KL#=;g@ArRMUK5rr_+G0KSKH?9WBni<`=6|D2wD c=SVHV-~5knr`J(YS^*sB>e=bvtrq_M30>=u+yDRo diff --git a/data analysis/analysis/analysis.py b/data analysis/analysis/analysis.py index cc8feedd..d0ce438d 100644 --- a/data analysis/analysis/analysis.py +++ b/data analysis/analysis/analysis.py @@ -7,10 +7,13 @@ # current benchmark of optimization: 1.33 times faster # setup: -__version__ = "1.1.2.001" +__version__ = "1.1.2.002" # changelog should be viewed using print(analysis.__changelog__) __changelog__ = """changelog: +1.1.2.002L + - added elo() + - elo() has bugs to be fixed 1.1.2.001: - readded regrression import 1.1.2.000: @@ -295,10 +298,12 @@ def regression_engine(device, inputs, outputs, args, loss = torch.nn.MSELoss(), return regressions -#@jit TODO: determine jit type -def elo(starting_score, observed, N, K): +@jit(nopython=True) +def elo(starting_score, opposing_scores, observed, N, K): - pass + expected = 1/(1+10**((np.array(opposing_scores) - starting_score)/N)) + + return starting_score + K*(np.sum(expected) - np.sum(observed)) @jit(forceobj=True) def r_squared(predictions, targets): # assumes equal size inputs From 026bf3467cb6bc58d46ccbad006098d15f55bb24 Mon Sep 17 00:00:00 2001 From: art Date: Thu, 3 Oct 2019 10:48:56 -0500 Subject: [PATCH 4/4] analysis.py v 1.1.2.003 --- data analysis/analysis/analysis.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/data analysis/analysis/analysis.py b/data analysis/analysis/analysis.py index d0ce438d..f9f77603 100644 --- a/data analysis/analysis/analysis.py +++ b/data analysis/analysis/analysis.py @@ -7,11 +7,13 @@ # current benchmark of optimization: 1.33 times faster # setup: -__version__ = "1.1.2.002" +__version__ = "1.1.2.003" # changelog should be viewed using print(analysis.__changelog__) __changelog__ = """changelog: -1.1.2.002L +1.1.2.003: + - fixed elo() +1.1.2.002: - added elo() - elo() has bugs to be fixed 1.1.2.001: @@ -303,7 +305,7 @@ def elo(starting_score, opposing_scores, observed, N, K): expected = 1/(1+10**((np.array(opposing_scores) - starting_score)/N)) - return starting_score + K*(np.sum(expected) - np.sum(observed)) + return starting_score + K*(np.sum(observed) - np.sum(expected)) @jit(forceobj=True) def r_squared(predictions, targets): # assumes equal size inputs