{"id":19584377,"url":"https://github.com/debhere/fraud-detection-in-credit-card","last_synced_at":"2026-05-15T00:11:32.636Z","repository":{"id":234610660,"uuid":"789237910","full_name":"debhere/Fraud-Detection-in-Credit-Card","owner":"debhere","description":"Detect fraudulent credit card transactions","archived":false,"fork":false,"pushed_at":"2024-04-29T16:49:49.000Z","size":1100,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-09T05:43:18.309Z","etag":null,"topics":["data-science","eda","flask","html","machine-learning"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/debhere.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-20T02:12:18.000Z","updated_at":"2024-05-03T11:33:51.000Z","dependencies_parsed_at":"2024-04-20T21:15:46.209Z","dependency_job_id":null,"html_url":"https://github.com/debhere/Fraud-Detection-in-Credit-Card","commit_stats":null,"previous_names":["debhere/fraud-detection-in-credit-card"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debhere%2FFraud-Detection-in-Credit-Card","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debhere%2FFraud-Detection-in-Credit-Card/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debhere%2FFraud-Detection-in-Credit-Card/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debhere%2FFraud-Detection-in-Credit-Card/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/debhere","download_url":"https://codeload.github.com/debhere/Fraud-Detection-in-Credit-Card/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240851456,"owners_count":19868048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","eda","flask","html","machine-learning"],"created_at":"2024-11-11T07:47:59.262Z","updated_at":"2026-05-15T00:11:32.596Z","avatar_url":"https://github.com/debhere.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n# Fraud Detection in Credit Cards\r\n\r\nThis project is a Machine Learning implementation to detect the fradulent instances in credit card transactions.\r\n\r\n\r\n## Authors\r\n\r\n- [@debhere](https://www.github.com/debhere)\r\n\r\n\r\n## Tech Stack\r\n\r\n**Client:** HTML5, CSS\r\n\r\n**Server:** Flask\r\n\r\n**Machine Learning:** Scikit-Learn, Imblearn\r\n\r\n**Data Analysis:** Numpy, Pandas, Matplotlib, Seaborn\r\n\r\n\r\n\r\n## Dataset\r\n\r\nThe source of the dataset is kaggle https://www.kaggle.com/datasets/mlg-ulb/creditcardfraud\r\n\r\nThe dataset contains transactions made by credit cards and has almost 285,000 transactions. The datset is highly imbalanced where only 492 are fraudulent.\r\n\r\nMoreover, apart from 'Time' and 'Amount', all other features are anonymized via PCA probably due to confidentiality issues.\r\n## Requirements\r\n\r\n- **Python 3.8+**\r\n- **flask**\r\n- **sckit-learn**\r\n- **Numpy**\r\n- **Pandas**\r\n- **Matplotlib**\r\n- **pyyaml**\r\n- **seaborn**\r\n- **imbalanced-learn**\r\n- **joblib**\r\n\r\n## Run Locally\r\n\r\nClone the project\r\n\r\n```bash\r\n  git clone https://github.com/debhere/Fraud-Detection-in-Credit-Card.git\r\n```\r\n\r\nGo to the project directory\r\n\r\n```bash\r\n  cd Fraud-Detection-in-Credit-Card\r\n```\r\n\r\nCreate virtual environment\r\n\r\n```bash\r\n  conda create -p venv python=3.8 -y\r\n```\r\n\r\nActivate virtual environment\r\n\r\n```bash\r\n  conda activate venv\\\r\n```\r\n\r\n\r\n\r\nInstall dependencies\r\n\r\n```bash\r\n  pip install -r requirements.txt\r\n```\r\n\r\nStart the server\r\n\r\n```bash\r\n  python app.py\r\n```\r\n\r\n## Description\r\n\r\nThere are 3 main sections (if you will) of this project:-\r\n\r\n- Model Implementation\r\n- Front-End\r\n- Back-end\r\n\r\nSince , the primary objective of the project to detect the fradulent credit card transactions, the front-end and back-end are quite light-weight in nature.\r\n\r\n### Model Implementation\r\n\r\n*src* contains the primary source code of the entire model implmentation mechanism. The primary components are \"data ingestion\", \"data transformation\", \"model building\", and \"model evaluation\"\r\n\r\n*pipeline* contains the data-pipeline and prediction-pipeline.\r\n\r\n*utils* directory comprises of common utility functions that is being referred throughout the project.\r\n\r\nThe starting point of the \"model implemention\" module is learn.py where each component is being invoked one by one ie., \r\n\r\ndata ingestion -\u003e data transformation -\u003e pipeline creation -\u003e model building -\u003e model evaluation.\r\n\r\nThe best estimator and data pipeline are saved as pickle files as artifacts.\r\n\r\n### Front-End\r\n\r\nFront-end is nothing but a playground of the model output. Although the majority of the features are anonymized but still thought to create a light-weight interface to demonstrate the usability.\r\n\r\nindex.html is the solitary html page here with basic css in place.\r\n\r\n### Back-End\r\n\r\nThe back-end server should be kept light-weight for obvious reasons. app.py is the starting point to run the flask server. Once the server is up and running, user will be able to input data onto the front-end html page. flask server captures and performs the data transformation and prediction by invoking the prediction pipeline module. Thereafter, the prediction is rendered on the same UI.\r\n\r\n## Support\r\n\r\nFor any query or discussion, email debmalya.mondal@outlook.com or send me a message on \r\n\r\n[![linkedin](https://img.shields.io/badge/linkedin-0A66C2?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://www.linkedin.com/in/debmalyamondal)\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebhere%2Ffraud-detection-in-credit-card","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdebhere%2Ffraud-detection-in-credit-card","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebhere%2Ffraud-detection-in-credit-card/lists"}