Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
67
if
__name__ ==
'__main__'
:
Callers
5
knn_donut.py
File · 0.45
knn_xor.py
File · 0.45
app_trainer.py
File · 0.45
knn.py
File · 0.45
knn_fail.py
File · 0.45
Calls
1
predict
Method · 0.95
Tested by
no test coverage detected