summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-05-22 11:42:05 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-05-22 11:42:05 +0200
commit6501717fd58e7b731c1922c1669f18ce0c3da10a (patch)
tree9bf97256502e322686cfbb9089d8b9a4ecb5e12b
parent578d4994a7f3df2fa83c91d5b7b9714a3bb3f5fb (diff)
downloadprocessor-6501717fd58e7b731c1922c1669f18ce0c3da10a.tar.gz
processor-6501717fd58e7b731c1922c1669f18ce0c3da10a.zip
update impact scorerelease/2.4.0
-rw-r--r--worker.js18
1 files changed, 15 insertions, 3 deletions
diff --git a/worker.js b/worker.js
index 033718b..40e67b4 100644
--- a/worker.js
+++ b/worker.js
@@ -765,12 +765,24 @@ function flatten(obj) {
"gold", "farm"].map((attr) =>
p_s[attr] = participant[attr]);
+ let role = classify_role(p_s);
+
// score calculations
- let impact_score = -0.28779906 + (p_s.kills * 0.22290324) + (p_s.deaths * -0.50438917) + (p_s.assists * 0.34841597);
- p_s.impact_score = (impact_score + 10) / (10 + 10);
+ let impact_score = 50;
+ switch (role) {
+ case "carry":
+ impact_score = -0.47249153 + 0.50145197 * p_s.assists - 0.7136091 * p_s.deaths + 0.18712844 * p_s.kills + 0.00531455 * p_s.farm; break;
+ case "jungler":
+ impact_score = -0.54510754 + 0.19982097 * p_s.assists - 0.35694721 * p_s.deaths + 0.09942473 * p_s.kills + 0.01256313 * p_s.farm; break;
+
+ case "captain":
+ impact_score = -0.46473539 + 0.09968104 * p_s.assists - 0.38401479 * p_s.deaths + 0.14753133 * p_s.kills + 0.03431293 * p_s.farm; break;
+ }
+ p_s.impact_score = (impact_score - (-4.5038622921659375) ) / (4.431094119937388 - (-4.5038622921659375) );
+
// classifications
- p.role_id = role_db_map[classify_role(p_s)];
+ p.role_id = role_db_map[role];
// traits calculations
if (roster.hero_kills == 0) p_s.kill_participation = 0;