Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AssemblyAI-Community/Machine-Learning-From-Scratch
/ accuracy
Function
accuracy
04 Decision Trees/train.py:17–18 ·
view source on GitHub ↗
(y_test, y_pred)
Source
from the content-addressed store, hash-verified
15
predictions = clf.predict(X_test)
16
17
def
accuracy(y_test, y_pred):
18
return
np.sum(y_test == y_pred) / len(y_test)
19
20
acc = accuracy(y_test, predictions)
21
print(acc)
Callers
1
train.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected