.
├── app/
│ ├── __init__.py
│ ├── main.py
│ ├── routes.py
│ ├── models/
│ │ ├── __init__.py
│ │ └── deploy_model/
│ ├── decision_tree.pkl
│ └── fraud_detection_model.pkl
│ ├── templates/
│ └── utils/
│ ├── __init__.py
├── model.py
│ └── data_preprocessing.py
├── data/
│ ├── raw/
│ │ └── transactions.csv
│ ├── processed/
│ │ └── processed_transactions.csv
│ ├── results/
│ │ └── evaluation_results.csv
├── scripts/
│ ├── preprocess_data.py
│ ├── train_model.py
│ └── evaluate_model.py
├── tests/
├── .gitignore
├── README.md
├── requirements.txt
└── setup.py
-
Clone the repository:
git clone https://github.com/leopers/Money-Saver-Preditor.git cd Money-Saver-Preditor -
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Make sure your python environment variable is setup correctly
export PYTHONPATH=$(pwd)
-
Run the Flask application:
python app/main.py
- Access the web application at
http://localhost:5000 - You can either check for fraud on a specific and existent transaction or even add new transactions to our database.
About the Dataset This is a simulated credit card transaction dataset containing legitimate and fraud transactions from the duration 1st Jan 2019 - 31st Dec 2020. It covers credit cards of 1000 customers doing transactions with a pool of 800 merchants.
Source of Simulation This was generated using Sparkov Data Generation | Github tool created by Brandon Harris. This simulation was run for the duration - 1 Jan 2019 to 31 Dec 2020. The files were combined and converted into a standard format.
trans_date_trans_time: The date and time when the transaction occurred.cc_num: The credit card number used for the transaction.merchant: The name of the merchant where the transaction took place.category: The category of the merchant or transaction.amt: The amount of the transaction.first: The first name of the cardholder.last: The last name of the cardholder.gender: The gender of the cardholder.street: The street address of the cardholder.city: The city of the cardholder.state: The state of the cardholder.zip: The ZIP code of the cardholder.lat: The latitude coordinate of the cardholder's address.long: The longitude coordinate of the cardholder's address.city_pop: The population of the city where the cardholder resides.job: The occupation of the cardholder.dob: The date of birth of the cardholder.trans_num: A unique identifier for the transaction.unix_time: The transaction time in Unix time format.merch_lat: The latitude coordinate of the merchant's location.merch_long: The longitude coordinate of the merchant's location.is_fraud: A binary indicator of whether the transaction is fraudulent (1) or not (0).
This project is licensed under the MIT License.