From f6805e46b0da1ae4fd0e3eb4911fbfcccd03edfc Mon Sep 17 00:00:00 2001 From: Josh Creek Date: Sat, 21 Sep 2019 23:04:36 +0100 Subject: [PATCH] Trying a different weighting function and displaying more results. --- scripts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts.js b/scripts.js index c81aea6..31297b5 100644 --- a/scripts.js +++ b/scripts.js @@ -80,7 +80,7 @@ async function consolidateDataSet() { // Calculate weighting var numStreamersToFavour = 10; - var weighting = Math.exp(0 - game.numStreams); + var weighting = ( (numStreamersToFavour * game.numStreams) / ( (game.numStreams - numStreamersToFavour)^2 + 10) ); // Calculate score var ratio = game.numViewers / game.numStreams; @@ -102,7 +102,7 @@ function displayData() { return b.score - a.score; }) - finalData = orderedStreamDataSet.slice(0,21); // Set to first 21 for testing purposes + finalData = orderedStreamDataSet.slice(0,54); // Set to first 21 for testing purposes finalData.forEach(game => { const card = document.createElement('div');