implement biases

This commit is contained in:
biglyderv 2025-01-31 17:42:18 -05:00
parent 9a8111224b
commit 242e119222
2 changed files with 6 additions and 3 deletions

View file

@ -1,6 +1,6 @@
// derived from https://git.dervland.net/biglyderv/new-bigly-chat/src/branch/master/docs/stats.php
function rankCalc(result, iterations = 10) {
function rankCalc(result, iterations = 10, main = []) {
let matrixe = {}
let fng = {};
let fnc = {};
@ -51,6 +51,9 @@ function rankCalc(result, iterations = 10) {
for (let una in result) {
th++;
pr[una] = 0.1 / rl;
if (main.indexOf(una) != -1) {
pr[una] = 0.5;
}
matrixe[una] = [];
if (frs[una].length == 0) {
pr[una] = prold[una];