stuff
This commit is contained in:
parent
cb0750786a
commit
d514058b1d
1 changed files with 7 additions and 3 deletions
10
rank.js
10
rank.js
|
@ -46,13 +46,17 @@ function rankCalc(result, iterations = 10) {
|
|||
console.log(`Completed ${i} iterations with ${intv} threshold and ${discarded * 100}% discard rate`)
|
||||
discarded = 0;
|
||||
|
||||
let th = -1;
|
||||
|
||||
for (let una in result) {
|
||||
th++;
|
||||
let thk = Object.keys(result).length;
|
||||
pr[una] = 0;
|
||||
matrixe[una] = [];
|
||||
if (frs[una].length == 0) {
|
||||
if (frs[una].length == 0 || (msum_old - msum) / (thk - th) < Math.pow(intv,2)) {
|
||||
pr[una] = prold[una];
|
||||
matrixe[una] = matrixf[una];
|
||||
discarded += 1 / Object.keys(result).length
|
||||
discarded += 1 / thk
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -62,7 +66,7 @@ function rankCalc(result, iterations = 10) {
|
|||
|
||||
if (prb < intv || fnc[unb] == 0) {
|
||||
pr[una] = prold[una];
|
||||
discarded += Math.pow(Object.keys(result).length,-2) / 2;
|
||||
discarded += Math.pow(thk,-2) * 0.9;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue