Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

summary

Abstract : This project involves utilizing a cancer patient dataset to apply machine learning algorithms in predicting cancer. Machine learning offers powerful tools for identifying patterns within complex medical data, allowing for early and accurate cancer diagnoses. Key algorithms, such as Decision Trees, Support Vector Machines, K-Nearest Neighbors, and Neural Networks, are implemented to evaluate their effectiveness in distinguishing between cancerous and non-cancerous cases. By training these models on relevant features like tumor size, cell structure, and other biomarkers, the study aims to improve the accuracy and reliability of cancer prediction. The results from different models are compared to identify the most effective approach, helping medical professionals make more informed decisions and offering potential insights into automated cancer screening systems.

Pipeline of email classification problem

pipeline

Note : If the code doesn't run, note down the paths to the files because I'm changing them.

Project construction

1. Read the file

2. Data Preprocessing

3. Data visualization

3.1. Word Clouds for Ham and Spam Messages

Image 1

3.2. Count occurrences of ham and spam

Image 2

3.3. The chart shows the number of words in the message

Image 3

4. Train-Test Split

5. Convert text to numbers

6. Building a Naive Bayes Model

7. Model Evaluation

7.1. Confusion Matrix

Image 4

8. Predictions on new data

With label 1.0 being spam and label 0.0 being ham
Email: "You've been selected for a special offer. Click here to claim your prize!" -> Prediction: 1.0
Email: "Congratulations! You've won a free ticket." -> Prediction: 0.0
Email: "Hi, can we schedule a meeting tomorrow?" > Prediction: 0.0

Hope this article can help you.

If you have any questions please contact me for help!

Thanks everyone!

About

We developed a Naive Bayes model to classify messages as spam or ham. Using TF-IDF for feature extraction, it achieved 98% accuracy, proving effective for email filtering and categorization.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages