Fix Power Rankings
by
isenru
@
2/20/2016 9:08 pm
For some reason, the power rankings in our league (MFN-31) seem really off. For example, my team Minnesota (3-4) is ranked 29, even though there are 3 0-7 teams and 3 1-6 teams. The metrics could be balanced better, because there should be no way an 0-7 team is ranked higher than a 3-4 team, and yet all 3 0-7 teams are higher.
|
|
Re: Fix Power Rankings
by
punisher
@
2/21/2016 9:34 pm
isenru wrote: For some reason, the power rankings in our league (MFN-31) seem really off. For example, my team Minnesota (3-4) is ranked 29, even though there are 3 0-7 teams and 3 1-6 teams. The metrics could be balanced better, because there should be no way an 0-7 team is ranked higher than a 3-4 team, and yet all 3 0-7 teams are higher. this thread should explain the power rankings = http://mfn20.myfootballnow.com/community/3/1320?page=1 if that thread is right then really there isn't a problems with the power rankings. |
|
Re: Fix Power Rankings
by
Mr.Krazy
@
2/22/2016 10:19 am
Power rankings are definitely off a little bit but I don't see it as a major priority to fix just yet.
In CUST-10, my 3-5 team is ranked 10th in power rankings so it is for sure off |
|
|
|
|
Re: Fix Power Rankings. ( a really good code)
by
blackflys
@
2/25/2016 11:10 pm
I don't know much about making this all fit together but hopefully someone does. This is supposobly a really good code that took a lot of studying and brainy type of patience. Anyways if you need more info let me know...
<?php $dataYear = "data" . $_GET['year'] . ".php"; include $dataYear; if (count($season) < 1 || count($ranks) < 1) { echo "No Data"; exit; } function getError(array $ranking, array $week) { $error = 0; foreach ($week as $game) { $loser = $game[2]; $winner = $game[0]; $loseRank = $ranking[$loser]; $winRank = $ranking[$winner]; $margin = $game[3] - $game[4]; # echo("#$winRank $winner $game[3] $game[1] #$loseRank $loser $game[4] <br/>"); if ($margin > 0 && $winRank < $loseRank) continue; $error += ($winRank - $loseRank) + ($margin / 7); if ($game[1] == '@') $error += 1; } # echo ("error = $error<br/>"); return $error; } function doMaxError($thiserror, $rank, $week, $maxerror) { if ($maxerror[4][0] > $thiserror) return $maxerror; if ($maxerror[3][0] > $thiserror) { $maxerror[4][0] = $thiserror; $maxerror[4][1] = $rank; $maxerror[4][2] = $week; return $maxerror; } if ($maxerror[2][0] > $thiserror) { $maxerror[4][0] = $maxerror[3][0]; $maxerror[4][1] = $maxerror[3][1]; $maxerror[4][2] = $maxerror[3][2]; $maxerror[3][0] = $thiserror; $maxerror[3][1] = $rank; $maxerror[3][2] = $week; return $maxerror; } if ($maxerror[1][0] > $thiserror) { $maxerror[4][0] = $maxerror[3][0]; $maxerror[4][1] = $maxerror[3][1]; $maxerror[4][2] = $maxerror[3][2]; $maxerror[3][0] = $maxerror[2][0]; $maxerror[3][1] = $maxerror[2][1]; $maxerror[3][2] = $maxerror[2][2]; $maxerror[2][0] = $thiserror; $maxerror[2][1] = $rank; $maxerror[2][2] = $week; return $maxerror; } if ($maxerror[0][0] > $thiserror) { $maxerror[4][0] = $maxerror[3][0]; $maxerror[4][1] = $maxerror[3][1]; $maxerror[4][2] = $maxerror[3][2]; $maxerror[3][0] = $maxerror[2][0]; $maxerror[3][1] = $maxerror[2][1]; $maxerror[3][2] = $maxerror[2][2]; $maxerror[2][0] = $maxerror[1][0]; $maxerror[2][1] = $maxerror[1][1]; $maxerror[2][2] = $maxerror[1][2]; $maxerror[1][0] = $thiserror; $maxerror[1][1] = $rank; $maxerror[1][2] = $week; return $maxerror; } $maxerror[4][0] = $maxerror[3][0]; $maxerror[4][1] = $maxerror[3][1]; $maxerror[4][2] = $maxerror[3][2]; $maxerror[3][0] = $maxerror[2][0]; $maxerror[3][1] = $maxerror[2][1]; $maxerror[3][2] = $maxerror[2][2]; $maxerror[2][0] = $maxerror[1][0]; $maxerror[2][1] = $maxerror[1][1]; $maxerror[2][2] = $maxerror[1][2]; $maxerror[1][0] = $maxerror[0][0]; $maxerror[1][1] = $maxerror[0][1]; $maxerror[1][2] = $maxerror[0][2]; $maxerror[0][0] = $thiserror; $maxerror[0][1] = $rank; $maxerror[0][2] = $week; return $maxerror; } $maxerror = array(array("0","",""),array("0","",""),array("0","",""),array("0","",""),array("0","","")); foreach ($ranks as $rank) { $error = 0; for ($week =4; $week < 19; $week++) { $thiserror = 0; $mult = 40; $totalmult = 50; for($j = $week; $j < 19 && $j < $week + 8; $j++) { $thiserror += $mult * getError($rank[$week], $season[$j]); $mult = $mult / 1.5; } $thiserror = $thiserror / $totalmult; $error += $thiserror; $maxerror = doMaxError($thiserror,$rank[0],$week, $maxerror); } $error = $error / 15; $results[$rank[0]] = $error; } asort($results); echo "Rank | error per week<br/>"; foreach ($results as $key => $val) { echo "$key | $val<br/>"; } echo "<br/><br/><br/> Max error =<br/>"; foreach ($maxerror as $maxer) {print "$maxer[0], $maxer[1], week $maxer[2]<br/>";} ?> |
|
Re: Fix Power Rankings
by
Morbid
@
2/27/2016 3:05 pm
You lost me at <?php
|
|
Re: Fix Power Rankings
by
TAFIV
@
2/27/2016 3:24 pm
it's programming code, doesn't help any since JD can't legally use it without permission of whoever wrote it though since there may be copyright issues if he did (no way to know if the code is part of a copyrighted program without contacting the programmer)
|
|