TECHNO INTERNATIONAL NEW TOWN
Block-DG, Action Area 1, New Town, Kolkata -700156, West Bengal, India
Department of Computer Science and Business System
Project Evaluation I Report (PCC-CSBS781)
Credit Card Fraud Detection
Prepared by
Moumita Patra (Roll No:- 18731122009)
Sapnadarshi Singha (Roll No:-18731122014)
Sandipan Chakraborty (Roll No:-18731122015)
Archi Gupta (Roll No:-18731122025)
Under the Guidance of
Prof. Mrs .Madhuchhanda Basak
Batch:- 2022-2026 Semester :7 th (2025 –ODD) Year : July 2025 – December 2025
Stream:- Computer Science and Business System Year of Study: 4th
Affiliated to
MAULANA ABUL KALAM AZAD UNIVERSITY OF TECHNOLOGY, WESTBENGAL
(FORMERLY KNOWN AS WEST BENGAL UNIVERSITY OF TECHNOLOGY)
ACKNOWLEDGEMENT
We would like to express our sincere gratitude to Prof. _ _ _ _ _ _ _ _ _ _ _ of the Department of
Computer Science and Business System, whose role as project guide was invaluable for the
project. We are extremely thankful for the keen interest she took in advising us, for the books and
reference materials provided for the moral support extended to us.
Last but not the least we convey our gratitude to all the teachers for providing us the technical skill
that will always remain as our asset and to all non-teaching staff for the cordial support they
offered.
Place: Techno International New Town
Date: _ _ _ _ _ _ _ _ _ _
___________________________
Moumita Patra
(Roll No: - 18731122009)
___________________________
Sapnadarshi Singha
(Roll No: - 18731122014)
___________________________
Sandipan Chakraborty
(Roll No: - 18731122015)
___________________________
Archi Gupta
(Roll No: - 18731122025 )
Department of Computer Science and Business System,
Techno International New Town
Kolkata – 700 156
West Bengal, India.
Approval
This is to certify that the project report entitled “…Credit Card Fraud Detection...” prepared under
my supervision by Moumita Patra (18731122009), Sapnadarshi Singha (18731122014), Sandipan
Chakraborty (18731122015) & Archi Gupta (18731122025) , be accepted in partial fulfillment
for the degree of Bachelor of Technology in Computer Science and Business System which is
affiliated to Maulana Abul Kalam Azad University of Technology, West Bengal (Formerly known
as West Bengal University of Technology).
It is to be understood that by this approval, the undersigned does not necessarily endorse or approve
any statement made, opinion expressed or conclusion drawn thereof, but approves the report only
for the purpose for which it has been submitted.
…………………………………………
Prof. (Mrs. Madhuchhanda Basak)
………………………………………….
Signature of Program Coordinator/HOD
………………………………………….
Name of the Program Coordinator/HOD
Computer Science and Business System,
Techno International New Town
Abstract
Credit card fraud has become one of the most serious challenges faced by financial institutions
and online payment systems, resulting in billions of dollars in global losses every year. As
digital transactions continue to grow, traditional rule-based systems are no longer sufficient to
detect evolving fraudulent behaviors. This project aims to design and develop an intelligent
Credit Card Fraud Detection System that leverages Machine Learning (ML) techniques to
automatically identify potentially fraudulent transactions in real time.
The proposed system utilizes the Kaggle Credit Card Fraud Detection dataset, which consists
of anonymized transaction data where features are derived using Principal Component
Analysis (PCA) to preserve confidentiality. The dataset includes important variables such as
transaction time, amount, and a binary class label indicating whether a transaction is fraudulent
or legitimate. Due to the extremely imbalanced nature of the dataset (where fraudulent
transactions represent less than 0.2% of total records), the SMOTE (Synthetic Minority Over-
sampling Technique) is employed to generate synthetic samples of the minority fraud class,
ensuring the model learns meaningful patterns from both classes.
Multiple supervised classification algorithms—such as Logistic Regression, Random Forest,
and XGBoost—are trained and compared to determine the most effective model for fraud
detection. The models are evaluated using key performance metrics, including Precision,
Recall, F1-score, and Precision-Recall AUC, with special emphasis on maximizing recall to
minimize the number of undetected fraudulent transactions. A stratified train-test split is used
to maintain class distribution, and extensive cross-validation ensures robust generalization.
The final optimized model is integrated into a real-time fraud detection pipeline capable of
instantly flagging suspicious transactions for further investigation. The deployment framework
can be implemented using Flask or FastAPI, allowing the system to process live transaction
streams and return fraud risk predictions with minimal latency.
Overall, this project demonstrates how data-driven predictive modeling can enhance financial
security, reduce manual verification efforts, and significantly minimize financial losses due to
fraud. The system serves as a scalable, efficient, and intelligent foundation for modern fraud
prevention strategies used in banking and e-commerce platforms.
CONTENTS
Page No.
1. INTRODUCTION ………………………………..……………………… 07
2. PROBLEM DEFINITION………………………………………………. 08
3. ARCHITECTURE (Like MVC) ………………………………………... 09
4. DATA FLOW DIAGRAM ……………………………………................ 10-11
4.1 Context Level Diagram……………………………………………..... 10
4.2 First Level DFD……………………………………………………..... 10
4.3 Second Level DFD …………………………………………………… 11
4.3.1 Second Level DFD showing Activity1……………………........ 11
4.3.2 Second Level DFD showing Activity2……………………….... 11
5. ENTITY RELATIONSHIP DIAGRAM ……………………..…........... 12
6. USE CASE DIAGRAM………………………………………………….. 13
7. ACTIVITY DIAGRAM…………………………………………………. 14
8. SEQUENCE DIAGRAM……………………………………………...… 15
9. FUTURE SCOPE OF PROJECT……………………………………..... 16-17
10. CONCLUSION…………………………………………………………... 18-19
11. BIBLIOGRAPHY……………………………………………………….. 20
LIST OF FIGURES
Figure Caption Page No.
1) SYSTEM ARCHITECTURE OF PROJECT................. 09
2) DATA FLOW DIAGRAM ...............………………….... 10-11
a. Context Level Diagram……………………......... 10
b. First Level DFD…………………………………. 10
c. Second Level DFD ............................................. ... 11
i. Second Level DFD showing Activity1……… 11
ii. Second Level DFD showing Activity2……… 11
3) ENTITY RELATIONSHIP DIAGRAM ................….... 12
4) USE CASE DIAGRAM…….........……………………... 13
5) ACTIVITY DIAGRAM………………………………... 14
6) SEQUENCE DIAGRAM…………………………...….. 15
1. INTRODUCTION
The rapid growth of digital payment systems and online financial services has significantly
transformed global transaction practices. Among various digital payment methods, credit cards
are widely used due to their convenience, speed, and accessibility. However, this widespread
adoption has also resulted in a substantial rise in credit card fraud, creating serious financial
and security concerns for customers and financial institutions alike. Credit card fraud refers to
the unauthorized use of a credit card or its information to conduct transactions without the
cardholder’s consent. With the continuous expansion of e-commerce platforms and online
banking services, effective detection of fraudulent activities has become a critical requirement
in modern financial systems.
Credit card fraud detection involves identifying fraudulent transactions from a massive volume
of legitimate ones. This task is inherently challenging because fraudulent transactions
constitute only a very small fraction of the total data, resulting in a highly imbalanced dataset.
Moreover, fraud patterns evolve continuously as fraudsters adopt new techniques to bypass
existing security mechanisms. Traditional fraud detection systems mainly rely on rule-based
approaches, where predefined rules or thresholds are used to flag suspicious transactions.
Although these systems can detect known fraud patterns, they often fail to adapt to new or
complex fraud behaviors, leading to high false positives or undetected fraud cases.
Machine learning has emerged as an effective solution to overcome the limitations of
traditional systems. By learning from historical transaction data, machine learning models can
identify complex and non-linear patterns that distinguish fraudulent behavior from legitimate
activity. Supervised learning techniques are particularly suitable for fraud detection, where
labeled transaction data is used to train models to classify future transactions as fraudulent or
non-fraudulent. However, applying machine learning to fraud detection introduces challenges
such as handling class imbalance, selecting relevant features, and evaluating model
performance using metrics beyond simple accuracy.
In this project, a supervised machine learning approach using the Random Forest classifier is
proposed for credit card fraud detection. Random Forest is an ensemble learning algorithm that
constructs multiple decision trees and combines their predictions to improve classification
performance and reduce overfitting. It is well-suited for fraud detection due to its ability to
handle high-dimensional data, capture complex relationships between features, and remain
robust in the presence of noisy or irrelevant attributes. The dataset used consists of real-world
credit card transactions, where fraudulent cases represent a very small proportion of the total
transactions.
The experimental results demonstrate the Random Forest classifier performs effectively in
distinguishing fraudulent transactions from legitimate ones. High precision indicates that most
transactions identified as fraud, thereby minimizing false alarms. The F1-score further confirm
that the model achieves balanced and reliable performance. Recall indicates potential scope
for the dataset of credit card fraud detection improvement in capturing fraudulent transactions.
2. PROBLEM DEFINITION
Detecting fraudulent transactions is challenging due to the highly imbalanced nature of
transaction data and the continuously evolving fraud patterns. Traditional rule-based detection
systems lack adaptability and fail to identify complex or previously unseen fraud behaviors
effectively.
This project focuses on solving the problem of accurately classifying credit card transactions
as fraudulent or legitimate using a supervised machine learning approach. A Random Forest
classifier is used as the baseline model to learn transaction patterns and detect fraud while
minimizing false positives and false negatives. The primary goal is to build a reliable and
efficient fraud detection system that can handle imbalanced data and provide strong baseline
performance. Furthermore, the project aims to extend this work by comparing the efficiency
and performance of the baseline model with advanced preprocessing techniques, SMOTE-
based imbalance handling, and boosting algorithms such as XGBoost in future
implementations.
3. ARCHITECTURE
Fig.1(showing the system architecture of project)
Components:
1. 1 Data Sources
• Credit card transactions (amount, merchant ID, location, time)
• Collected data from Kaggle – Credit Card Fraud Detection (Credit Card Fraud
Detection)
2. 3 Data Processing & Feature Engineering
• Cleans and normalizes transaction data
• Generates features
3. 4 Machine Learning Model
• Algorithms: Random Forest, XGBoost, Logistic Regression, Xgboost
• Outputs fraud probability score
4. 5 Decision Engine
• Combines rule-based logic with ML predictions
5. Classifies transactions as:
a. Legitimate
b. Fraudulent
4. DATA FLOW DIAGRAMS (DFD)
4.1 Context Level Diagram
Fig 2: Context Level Diagram
4.2 First Level DFD
Fig3: First Level Diagram
4.3Second Level DFD
Fig 4: Second Level DFD: Activity
Fig 5: Second Level DFD: Activity 2
5. ENTITY RELATIONSHIP DIAGRAMS
Fig 6: ER Diagram
Entities Description
• Stores customer details (Customer_ID, Name, Contact).
• Card: Linked to customer (Card_ID, Card_Type, Expiry).
• Transaction: Records card transactions (Txn_ID, Amount, Time, Location).
• Merchant: Stores merchant information (Merchant_ID, Category).
• Fraud_Result: Stores fraud prediction (Score, Status).
• ML_Model: Stores model details (Model_ID, Version, Accuracy).
Relationships
• One Customer can have multiple Cards
• One Card can generate many Transactions
• One Merchant can receive many Transactions
• Each Transaction has one Fraud_Result
• Fraud_Result is generated using one ML_Model
6. USE CASE DIAGRAM
Fig 7: Use Case Diagram
Description
• Cardholder initiates a transaction.
• Merchant processes the payment request.
• System runs ML-based fraud detection.
• Transaction is approved or blocked.
Use Case
• Cardholder ────> Make Transaction
• Merchant ────> Process Payment
• Model System ────> Validate Transaction
• Model System ────> Detect Fraud (ML)
7. ACTIVITY DIAGRAM
Fig 8: Activity Diagram
Short Description
• Transaction is initiated by the cardholder.
• Bank system processes transaction details.
• ML model evaluates fraud risk.
• Transaction is approved or blocked.
• Analyst reviews flagged transactions.
8. SEQUENCE DIAGRAM
Fig 9: Sequence Diagram
Sequence Flow:
• Cardholder -> Merchant: Make Payment
• Merchant -> Bank System: Send Transaction Details
• Bank System -> ML Model: Request Fraud Check
• ML Model -> Bank System: Return Fraud Score
• Model System -> Decision Engine: Evaluate Score
• Decision Engine -> Bank System: Approve / Block
• Model System -> Merchant: Transaction Response
9. FUTURE SCOPE OF THE PROJECT
a) Project Status and Justification:
The current analysis, utilizing the Random Forest Classifier, successfully meets the primary
objective of building a highly effective model for credit card fraud detection, as demonstrated by
the strong performance metrics (Accuracy: 99.96%, Recall: 77.59%).
Project Status Rationale
Model Development
Proof-of-Concept using Random Forest.
(Phase 1)
Production Readiness Incomplete (Requires deployment, integration of
(Phase 2) advanced models, and real-time monitoring).
b) Pros and Cons of the Current Approach (Random Forest)
The choice of the Random Forest algorithm for the initial phase was justified by its high
stability and robustness to highly imbalanced data.
Aspect Pros (Strengths) Cons (Limitations)
Slower training time and often
High Recall (minimizing
marginally lower performance
Performance critical missed fraud cases
ceiling compared to boosting
(False Negatives).
algorithms.
Less effective at capturing
Feature Importance scores
complex, non-linear dependencies
are easy to calculate and
Interpretability in sequential data compared to
explain to stakeholders.
advanced models.
Requires manual pre-processing
Imbalance Handles the extreme class
techniques (like SMOTE) to fully
Handling imbalance
eliminate False Negatives.
c) Areas for Improvement in the Coming Semester (Future Work):
The following areas are prioritized for the next phase of development, focusing on transitioning
the project into a robust, high-performance production system.
Area Technology/Algorithm Rationale/Justification
Planned Upgrade: The
project will be implement in
XGBoost. This algorithm is
known for superior
performance, speed, and
Enhanced efficiency in handling large,
Accuracy & XGBoost (Extreme
Gradient Boosting) structured datasets typical of
Speed
financial transactions,
providing a tangible increase
in both Precision and overall
Recall compared to Random
Forest.
To meet compliance
standards, SHAP will be used
to provide definitive, per-
Explainability SHAP (SHapley transaction evidence,
Additive exPlanations) answering why a specific
transaction was flagged as
fraud.
10. CONCLUSION
Project Evaluation, Market Value, and Learning Outcomes:
1. Project Performance and Technical Summary
Based on the confusion matrix and metrics achieved using the Random Forest Classifier, the
project demonstrates exceptional technical performance, especially considering the challenge
of the highly imbalanced dataset.
Performance
Result Interpretation
Metric
Indicates the model is highly reliable in overall
Accuracy 99.96%
classification.
Most Critical Metric: This signifies that the
Recall model successfully caught over 77.59% of all
77.59%
(Sensitivity) actual fraudulent transactions, making it highly
effective at preventing financial loss.
The model proves stable and robust despite the
Robustness High massive disparity between genuine (284,315)
and fraudulent (492) transactions.
2. Market Value and Competitive Advantage
A robust fraud detection system offers significant and immediate market value to financial
institutions, providing a competitive edge over legacy systems.
A. Market Demand & Value
• Reduced Financial Loss: The high Recall rate translates directly into billions of dollars
saved annually by preventing fraudulent transactions from completing.
Real-Time Capabilities: The architecture is designed to integrate into a real-time stream
(as planned with Kafka), allowing transactions to be scored and approved/declined in
milliseconds, which is the industry standard for modern payment processors.
B. Advantage Over Existing Solutions:
Logistic Isolation Forest
Random Forest
Feature Regression (Anomaly
(Current Model)
(Baseline) Detector)
Medium/Fast. Fast Very Fast. Simplest
Fast. Extremely
Speed scoring speed and fastest for both
fast and memory-
(Training/Scoring) makes it suitable training and
efficient.
for real-time. scoring.
Excellent.
Fair/Poor.
Excellent. Highly Specifically
Performance
robust; handles designed to
Performance on degrades severely
class imbalance identify outliers
Imbalanced Data without extensive
well due to (fraud) without
data balancing
ensemble nature. needing a balanced
(SMOTE).
dataset.
Excellent at
capturing complex, Limited to linear Effective for
Complexity
non-linear relationships. anomaly detection.
relationships.
3. Key Learning Outcomes (What I Have Learned)
Working on this project provided hands-on experience and critical insights into the full
lifecycle of a machine learning product:
1. Imbalanced Data Handling is Key: Hands-on experience with strategies to handle extreme
class imbalance (0.17% fraud rate) to ensure the model doesn't simply bias toward the
majority class.
2. Model Selection and Iteration: I gained practical experience in selecting Random Forest
for its reliability, developed a strategic plan to transition to XGBoost for production-level
stability and a performance boost. This demonstrates an understanding of the need to
continuously iterate and upgrade models for real-world scenarios.
3. Feature Importance: I learned how to analyze feature importance outputs to understand why
the model makes a decision, which is vital for providing explainability to risk analysts.
11. BIBLIOGRAPHY
13.1 Optimizing credit card fraud detection with random forests and SMOTE by P.
Sundaravadivel, R. Augustian Isaac, D. Elangovan, D. KrishnaRaj, V. V. Lokesh
Rahul & R.
Raja ScientificReports volume 15,Article number: 17851 (2025) Citethisarticle8667 Acce
sses7 CitationsMetris
13.2 Machine Learning for Fraud Detection | PDF | Machine Learning | Books
13.3 Sethi, N., Gera, A.: A revived survey of various credit card fraud detection techniques,
2014
13.4 (PDF) Credit Card Fraud Detection
13.5 Pdf- Credit Card Fraud Detection Using Machine Learning - Submitted by Sachit Kaundal
(201246) Aman Jain (201165) Under the guidance & supervision of Dr. Amol
Vasudeva(Credit Card Fraud Detection Using Machine [Link])
13.6 Credit Card Fraud Detection Using Machine Learning by Ruttala Sailusha; V.
Gnaneswar; R. Ramesh; G. Ramakoteswara Rao (Credit Card Fraud Detection
Using Machine Learning | IEEE Conference Publication | IEEE Xplore)
---------------------------------------------X--------------------------------------------------------