mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2025-10-23 17:49:19 +00:00
Merge service-dev changes with master (#24)
* added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
@@ -12,6 +12,7 @@ __version__ = "1.2.1.003"
|
||||
# changelog should be viewed using print(analysis.__changelog__)
|
||||
__changelog__ = """changelog:
|
||||
1.2.1.003:
|
||||
- changed output of basic_stats and histo_analysis to libraries
|
||||
- fixed __all__
|
||||
1.2.1.002:
|
||||
- renamed ArrayTest class to Array
|
||||
@@ -360,7 +361,7 @@ def basic_stats(data):
|
||||
_min = npmin(data_t)
|
||||
_max = npmax(data_t)
|
||||
|
||||
return _mean, _median, _stdev, _variance, _min, _max
|
||||
return {"mean": _mean, "median": _median, "standard-deviation": _stdev, "variance": _variance, "minimum": _min, "maximum": _max}
|
||||
|
||||
# returns z score with inputs of point, mean and standard deviation of spread
|
||||
@jit(forceobj=True)
|
||||
@@ -383,7 +384,7 @@ def z_normalize(array, *args):
|
||||
# expects 2d array of [x,y]
|
||||
def histo_analysis(hist_data):
|
||||
|
||||
if(len(hist_data[0]) > 2):
|
||||
if len(hist_data[0]) > 2:
|
||||
|
||||
hist_data = np.array(hist_data)
|
||||
derivative = np.array(len(hist_data) - 1, dtype = float)
|
||||
@@ -391,7 +392,7 @@ def histo_analysis(hist_data):
|
||||
derivative = t[1] / t[0]
|
||||
np.sort(derivative)
|
||||
|
||||
return basic_stats(derivative)[0], basic_stats(derivative)[3]
|
||||
return {"mean": basic_stats(derivative)["mean"], "deviation": basic_stats(derivative)["standard-deviation"]}
|
||||
|
||||
else:
|
||||
|
||||
|
Reference in New Issue
Block a user