MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / score

Method score

supervised_class/knn.py:62–64  ·  view source on GitHub ↗
(self, X, Y)

Source from the content-addressed store, hash-verified

60 return y
61
62 def score(self, X, Y):
63 P = self.predict(X)
64 return np.mean(P == Y)
65
66
67if __name__ == '__main__':

Callers 5

knn_donut.pyFile · 0.45
knn_xor.pyFile · 0.45
app_trainer.pyFile · 0.45
knn.pyFile · 0.45
knn_fail.pyFile · 0.45

Calls 1

predictMethod · 0.95

Tested by

no test coverage detected