Skip to content

In this project, I compare several commonly used machine learning models, namely K-Nearest Neighbors (KNN), Kernel SVM, Logistic Regression, Naive Bayes, SVM, Decision Tree, and Random Forest. I evaluate and compare the performance and accuracy of these models using a breast cancer dataset, and get the confusion matrix and accuracy score.

License

Notifications You must be signed in to change notification settings

nadhif-royal/ModelComparisonML

Repository files navigation

Machine Learning Model Comparison

This project presents a comparative analysis of several widely used machine learning models for classification tasks. The goal is to evaluate the performance of each model using a breast cancer dataset and determine which one yields the highest accuracy and predictive reliability.

📊 Models Compared

The following models were implemented and evaluated:

  • K-Nearest Neighbors (KNN)
  • Kernel Support Vector Machine (Kernel SVM)
  • Logistic Regression
  • Naive Bayes
  • Support Vector Machine (SVM)
  • Decision Tree
  • Random Forest

Each model was assessed using confusion matrix and accuracy score metrics to evaluate its performance.

📈 Results

Model Accuracy Score
Decision Tree 95.90%
Kernel SVM 95.32%
K-Nearest Neighbors 94.73%
Logistic Regression 94.73%
Naive Bayes 94.15%
Support Vector Machine 94.15%
Random Forest 93.56%
  • 🥇 Best Model: Decision Tree
  • 🥈 Runner-Up: Kernel SVM

🧪 Dataset

The dataset used for this project is a publicly available Breast Cancer Dataset, commonly used for classification problems.

📁 Project Structure

  • Data.csv – Dataset file
  • *.ipynb – Jupyter notebooks for each individual model
  • Presentation - Machine Learning Model Comparison.pdf – Summary presentation of the project
  • README.md – This file
  • LICENSE – MIT License

💻 How to Run

  1. Clone this repository
    git clone https://github.com/nadhif-royal/ModelComparisonML.git
  2. Open the Jupyter notebooks in your preferred IDE or environment.
  3. Run each notebook to view model training, evaluation, and comparison.

📌 Conclusion

The Decision Tree model showed the highest accuracy, making it the best performer in this project. Meanwhile, Random Forest had the lowest accuracy. The Kernel SVM came close to matching the performance of the Decision Tree, making it a solid alternative.

📬 Connect with Me


About

In this project, I compare several commonly used machine learning models, namely K-Nearest Neighbors (KNN), Kernel SVM, Logistic Regression, Naive Bayes, SVM, Decision Tree, and Random Forest. I evaluate and compare the performance and accuracy of these models using a breast cancer dataset, and get the confusion matrix and accuracy score.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published