Views
No views yet
| Metric | Value |
|---|---|
| Testing Accuracy | 98.48% |
Testing Precision (spam) | 96.15% |
Testing Recall (spam) | 93.17% |
Testing F1 (spam) | 94.64% |
1new_emails = [
2 "Congratulations! You've won a free prize. Click the link to claim.", # Likely spam
3 "Hi, just confirming our meeting for tomorrow at 10 AM. Thanks." # Likely not spam
4]
5
6# Vectorize the new emails using the fitted vectorizer
7new_emails_vectorized = vectorizer.transform(new_emails)
8
9# Make predictions
10predictions = model.predict(new_emails_vectorized)
11
12for i, email in enumerate(new_emails):
13 print(f"\nEmail: '{email}'")
14 print(f"Prediction: {predictions[i]}")