diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-26 15:28:00 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-26 15:28:00 +0200 |
| commit | 32aaabc36b2257856e6db0e2265830641ae3a325 (patch) | |
| tree | dd6bb42082399c4295287ffbae21452c4c3e73fa | |
| parent | 41fea0502fbfd720d4f3ae5fb8cd413966e0d52a (diff) | |
| download | processor-32aaabc36b2257856e6db0e2265830641ae3a325.tar.gz processor-32aaabc36b2257856e6db0e2265830641ae3a325.zip | |
attempt to fix scoring
| -rw-r--r-- | worker.js | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -533,8 +533,11 @@ function flatten(obj) { is_carry_score = -1.88524473 + (0.05593593 * participant.non_jungle_minion_kills) + (-0.0881661 * participant.jungle_kills), // about 90% accurate, trained on Hero.is_carry is_jungle_score = -0.78327066 + (-0.03324596 * participant.non_jungle_minion_kills) + (0.10514832 * participant.jungle_kills), // about 88% accurate scores = [is_captain_score, is_carry_score, is_jungle_score]; - - return ["captain", "carry", "jungler"][scores.indexOf(Math.max(...scores))]; + if (is_captain_score > is_carry_score && is_captain_score > is_jungle_score) + return "captain"; + if (is_carry_score > is_jungle_score) + return "carry"; + return "jungler"; } })(); |
