Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mecha-aima/fake-bills-detection
This Python project implements a simple classification model comparison using scikit-learn to classify banknotes as either "Authentic" or "Counterfeit" based on four features
https://github.com/mecha-aima/fake-bills-detection
classification-model machine-learning model-selection scikit-learn
Last synced: 26 days ago
JSON representation
This Python project implements a simple classification model comparison using scikit-learn to classify banknotes as either "Authentic" or "Counterfeit" based on four features
- Host: GitHub
- URL: https://github.com/mecha-aima/fake-bills-detection
- Owner: Mecha-Aima
- Created: 2024-09-04T19:31:49.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-04T19:48:04.000Z (2 months ago)
- Last Synced: 2024-10-13T03:22:18.753Z (26 days ago)
- Topics: classification-model, machine-learning, model-selection, scikit-learn
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Banknote Classification Model Comparison
## Overview
This project implements a simple classification model comparison using scikit-learn to classify banknotes as either "Authentic" or "Counterfeit" based on four features: variance, skewness, curtosis, and entropy. The code reads data from a CSV file, preprocesses the data, trains four different models (Perceptron, SVM, Gaussian Naive Bayes, and K-Nearest Neighbors), makes predictions on a test set, and prints out the accuracy of each model.## Data
The code expects a CSV file with the following structure:| Feature | Description |
|-----------|-------------------------------------|
| variance | Variance of the banknote image |
| skewness | Skewness of the banknote image |
| curtosis | Curtosis of the banknote image |
| entropy | Entropy of the banknote image |
| class | Class label (0 for Authentic, 1 for Counterfeit) |## Code
The code is written in Python and uses the scikit-learn library for machine learning tasks. It consists of the following steps:1. **Data loading**: The code loads the banknote data from a CSV file.
2. **Data preprocessing**: The code splits the data into training and testing sets.
3. **Model training**: The code trains four different classification models (Perceptron, SVM, Gaussian Naive Bayes, and K-Nearest Neighbors).
4. **Model evaluation**: The code makes predictions on the test set using each trained model and calculates the accuracy of each model.
5. **Results**: The code prints out the accuracy of each model as a percentage.## Usage
To run the code, simply execute the Python script. The code will load the data, train the models, and print out the accuracy of each model.## Acknowledgments
I completed this exercise as part of CS50's Intro to AI Course. The course provided a comprehensive introduction to artificial intelligence and machine learning, and this project was a great opportunity to apply the concepts learned in the course to a real-world problem.