Created
January 7, 2021 21:35
-
-
Save Guidosalimbeni/fab41a9b6c76e2f66b804eb1a0e9028d to your computer and use it in GitHub Desktop.
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
def getAccuracy(testSet, predictions): | |
correct = 0 | |
for x in range(len(testSet)): | |
if testSet[x][-1] == predictions[x]: | |
correct += 1 | |
return (correct/float(len(testSet))) * 100.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment