yitingliii
commited on
Update svm.py
Browse files
svm.py
CHANGED
@@ -12,5 +12,5 @@ svm_model = SVC(kernel='linear', random_state=42)
|
|
12 |
svm_model.fit(X_train_tfidf, y_train)
|
13 |
y_pred = svm_model.predict(X_test_tfidf)
|
14 |
accuracy = accuracy_score(y_test, y_pred)
|
15 |
-
print(f"
|
16 |
print(classification_report(y_test, y_pred))
|
|
|
12 |
svm_model.fit(X_train_tfidf, y_train)
|
13 |
y_pred = svm_model.predict(X_test_tfidf)
|
14 |
accuracy = accuracy_score(y_test, y_pred)
|
15 |
+
print(f"Accuracy: {accuracy:.4f}")
|
16 |
print(classification_report(y_test, y_pred))
|