Created
November 7, 2016 16:10
-
-
Save Fordi/39a86f44f4301235192e694304602492 to your computer and use it in GitHub Desktop.
Integrate PolitiFact's truth score for sorting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function truthScore(True, mostlyTrue, halfTrue, mostlyFalse, False, pantsOnFire) { | |
var ttl = True + mostlyTrue + halfTrue + mostlyFalse + False + pantsOnFire; | |
return 100 * ( | |
1.00 * True + | |
0.75 * mostlyTrue + | |
0.5 * halfTrue + | |
0.25 * mostlyFalse + | |
0.00 * False + | |
-0.50 * pantsOnFire | |
) / ttl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment