Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AssemblyAI-Community/Machine-Learning-From-Scratch
/ accuracy
Function
accuracy
05 Random Forests/train.py:15–17 ·
view source on GitHub ↗
(y_true, y_pred)
Source
from the content-addressed store, hash-verified
13
)
14
15
def
accuracy(y_true, y_pred):
16
accuracy = np.sum(y_true == y_pred) / len(y_true)
17
return
accuracy
18
19
clf = RandomForest(n_trees=20)
20
clf.fit(X_train, y_train)
Callers
1
train.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected