Update scoring_functions.py (#2291)

* Update scoring_functions.py

We can find accuracy by manually if we are not going to use sklearn library.

* Update scoring_functions.py

* Update machine_learning/scoring_functions.py

Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
Tanuj Dhiman 2020-09-09 22:34:46 +05:30 committed by GitHub
parent c0dcc556b3
commit 25946e4570
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,3 +135,7 @@ def mbd(predict, actual):
score = float(numerator) / denumerator * 100
return score
def manual_accuracy(predict, actual):
return np.mean(np.array(actual) == np.array(predict))