Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/lazyprogrammer/machine_learning_examples
/ score
Method
score
supervised_class/perceptron.py:66–68 ·
view source on GitHub ↗
(self, X, Y)
Source
from the content-addressed store, hash-verified
64
return
np.sign(X.dot(self.w) + self.b)
65
66
def
score(self, X, Y):
67
P = self.predict(X)
68
return
np.mean(P == Y)
69
70
71
if
__name__ ==
'__main__'
:
Callers
1
perceptron.py
File · 0.45
Calls
1
predict
Method · 0.95
Tested by
no test coverage detected