From bef8c0756e227edddc16b3e6c1977eee3a62a377 Mon Sep 17 00:00:00 2001 From: biglyderv Date: Thu, 30 Jan 2025 10:14:23 -0500 Subject: [PATCH] n --- rank.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rank.js b/rank.js index 05d5b43..73d3d94 100644 --- a/rank.js +++ b/rank.js @@ -41,12 +41,14 @@ function rankCalc(result, iterations = 10) { pr = []; matrixe = []; let msum = 1; + let intv = Math.pow(1/1000,Math.pow(0.25, i / Math.sqrt(mm))); + console.log(`Completed ${i} iterations with ${intv} threshold`) for (let una in result) { pr[una] = 0; matrixe[una] = []; if (frs[una].length == 0) { - matrixe[una] = structuredClone(matrixf[una]); // probably not efficient + matrixe[una] = matrixf[una]; continue; } @@ -54,7 +56,7 @@ function rankCalc(result, iterations = 10) { let prb = prold[unb]; matrixe[una][unb] = 0.03; - if (prb < (i+1) / (mm + 1) || fnc[unb] == 0) { + if (prb < intv || fnc[unb] == 0) { continue; } @@ -81,8 +83,6 @@ function rankCalc(result, iterations = 10) { for (let unn in result) { pr[unn] /= new_sum; } - - console.log(`Iteration ${i} calculated`); } return pr;