Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AssemblyAI-Community/Machine-Learning-From-Scratch
/ accuracy
Function
accuracy
09 SVM/svm.py:56–58 ·
view source on GitHub ↗
(y_true, y_pred)
Source
from the content-addressed store, hash-verified
54
predictions = clf.predict(X_test)
55
56
def
accuracy(y_true, y_pred):
57
accuracy = np.sum(y_true == y_pred) / len(y_true)
58
return
accuracy
59
60
print(
"SVM classification accuracy"
, accuracy(y_test, predictions))
61
Callers
1
svm.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected