Skip to content

Commit 25946e4

Browse files
tanujdhimancclauss
andauthored
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 <[email protected]>
1 parent c0dcc55 commit 25946e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

machine_learning/scoring_functions.py

+4
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,7 @@ def mbd(predict, actual):
135135
score = float(numerator) / denumerator * 100
136136

137137
return score
138+
139+
140+
def manual_accuracy(predict, actual):
141+
return np.mean(np.array(actual) == np.array(predict))

0 commit comments

Comments
 (0)