From c59ab98ebb0da721dbc2aff2234ee75ea37fcffd Mon Sep 17 00:00:00 2001 From: biglyderv Date: Tue, 28 Jan 2025 20:10:24 -0500 Subject: [PATCH] a --- docs/stats.php | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/docs/stats.php b/docs/stats.php index d554e82..5e7106c 100755 --- a/docs/stats.php +++ b/docs/stats.php @@ -65,22 +65,38 @@ $msum_old = $msum; $msum = 1; + $chh = 0; + foreach ($result as $usera) { + $una = $usera['username']; + if (count($frs[$una]) == 0) continue; + foreach ($result as $userb) { + $unb = $userb['username']; + $prb = $prold[$unb]; + if ($prb < pow(0.1,1 - ($i / 50))) { + continue; + } + $chh += $ch; + } + } + foreach ($result as $usera) { $una = $usera['username']; $pr[$una] = 0.1; if (count($frs[$una]) == 0) continue; + foreach ($result as $userb) { $unb = $userb['username']; - $matrixe[$una][$unb] = 0; $prb = $prold[$unb]; - if ($prb / 100 < pow(0.1,1 - ($i / 10))) { + if ($prb < pow(0.1,1 - ($i / 50))) { continue; } - + $matrixe[$una][$unb] = 0; + foreach ($result as $userc) { $unc = $userc['username']; - $matrixe[$una][$unb] += $matrixf[$una][$unc] * $matrixf[$unc][$unb] / $msum_old * pow($ch,3); + $matrixe[$una][$unb] += $matrixf[$una][$unc] * $matrixf[$unc][$unb] / $msum_old * $chh; } + $msum += $matrixe[$una][$unb]; $pr[$una] += $prb * $matrixe[$una][$unb]; } @@ -89,7 +105,7 @@ $new_sum = array_sum($pr); foreach ($result as $usern) { $h = $pr[$usern['username']]; - $pr[$usern['username']] /= $new_sum / 100; + $pr[$usern['username']] /= $new_sum; } }