Trying a different weighting function and displaying more results.

This commit is contained in:
Josh Creek
2019-09-21 23:04:36 +01:00
parent 22b8377418
commit f6805e46b0
+2 -2
View File
@@ -80,7 +80,7 @@ async function consolidateDataSet() {
// Calculate weighting // Calculate weighting
var numStreamersToFavour = 10; var numStreamersToFavour = 10;
var weighting = Math.exp(0 - game.numStreams); var weighting = ( (numStreamersToFavour * game.numStreams) / ( (game.numStreams - numStreamersToFavour)^2 + 10) );
// Calculate score // Calculate score
var ratio = game.numViewers / game.numStreams; var ratio = game.numViewers / game.numStreams;
@@ -102,7 +102,7 @@ function displayData() {
return b.score - a.score; 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 => { finalData.forEach(game => {
const card = document.createElement('div'); const card = document.createElement('div');