MCPcopy Create free account
hub / github.com/MorvanZhou/tutorials / compute_accuracy

Function compute_accuracy

theanoTUT/theano13_save/full_code.py:16–19  ·  view source on GitHub ↗
(y_target, y_predict)

Source from the content-addressed store, hash-verified

14import pickle
15
16def compute_accuracy(y_target, y_predict):
17 correct_prediction = np.equal(y_predict, y_target)
18 accuracy = np.sum(correct_prediction)/len(correct_prediction)
19 return accuracy
20
21rng = np.random
22

Callers 1

full_code.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected