fix
This commit is contained in:
parent
d3e31661c5
commit
503db43c4e
2 changed files with 5 additions and 6 deletions
7
rank.js
7
rank.js
|
@ -13,7 +13,7 @@ function rankCalc(result, iterations = 10) {
|
|||
matrixe[unn][unn] = 1;
|
||||
frs[unn] = result[unn].followers;
|
||||
fng[unn] = result[unn].following;
|
||||
fnc[unn] = Object.keys(frs[unn]).length;
|
||||
fnc[unn] = Object.keys(fng[unn]).length;
|
||||
pr[unn] = 1;
|
||||
}
|
||||
|
||||
|
@ -51,11 +51,10 @@ function rankCalc(result, iterations = 10) {
|
|||
|
||||
for (let unb in result) {
|
||||
let prb = prold[unb];
|
||||
if (prb < 1 / 1e9 || fnc[unb] == 0) {
|
||||
matrixe[una][unb] = matrixf[una][unb];
|
||||
matrixe[una][unb] = 0.03;
|
||||
if (prb < 1 / 1e12 || fnc[unb] == 0) {
|
||||
continue;
|
||||
}
|
||||
matrixe[una][unb] = 0.03;
|
||||
|
||||
for (let unc in result) {
|
||||
matrixe[una][unb] += matrixf[una][unc] * matrixf[unc][unb];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue