Mini Project (Fdudl) Upd
Mini Project (Fdudl) Upd
F/ TL / 024
Rev.00 Date 20.03.2020
BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING - AI
by
YASWANTH.M (211211101370)
U.MANOJ KUMAR (211211101334)
DEPARTMENT OF
MAY 2024
DEPARTMENT OF
COMPUTER SCIENCE AND ENGINEERING-AI
BONAFIDE CERTIFICATE
declare that the Project Report entitled “FRAUD DETECTION USING DEEP
is submitted in partial fulfillment of the requirements for the award of the degree in
1.
2.
DATE:
We would like to thank our beloved Chancellor Thiru. Dr.A.C. Shanmugam, B.A.,
B.L., President Er. A.C.S. Arunkumar, B.Tech., and Secretary Thiru A.Ravikumar
for all the encouragement and support extended to us during the tenure of this project
We express our heartfelt thanks to our Head of the Department, Prof. Dr. S.
Geetha, who has been actively involved and very influential from the start till the
Our sincere thanks to our Internal Guides Mrs. C. SUBA LAKSHMI & Dr. M. UMA
MAHESWAR and Project guide C. SUBA LAKSHMI for their continuous guidance
and encouragement throughout this work, which has made the project a success.
We would also like to thank all the teaching and non teaching staff of Computer
Science and Engineering department, for their constant support and the
1 ABSTRACT 1
2 2.1 INTRODUCTION 2
3 LITERATURE REVIEW 5
4 ANALYSIS 6
5 FLOW CHART 8
6 REQUIREMENT ANALYSIS 9
7 IMPLEMENTATION 10
7.1 CODING
8 RESULT 14
9 9.1 CONCLUSION 16
10 REFERNCES 20
CHAPTER 1
ABSTRACT
1
CHAPTER 2
2.1 INTRODUCTION
2
2.2 PROJECT OVERVIEW
3
Furthermore, the project aims to conduct thorough evaluation and testing of
the developed system on a holdout dataset. This evaluation phase is crucial
for assessing the system's accuracy, effectiveness, and robustness in real-
world scenarios. By rigorously evaluating the system's performance, we can
identify areas for improvement and fine-tune its algorithms to enhance its
overall efficacy in detecting fraud.
4
CHAPTER 3
LITERATURE REVIEW
5
CHAPTER 4
ANALYSIS
6
4.2 PROPOSED SYSTEM
Our proposed fraud detection system is a big step forward from what's
currently used. Instead of relying on simple rules or old-fashioned methods,
we're using super-smart deep learning technology. This means our system
can learn from lots of transaction data and spot even the sneakiest fraud
patterns in real-time.
To make sure it's really good at catching fraud, we'll train our system on a
bunch of different transactions—some legit, some fraudulent. This helps it
learn what normal transactions look like and what fraud looks like, so it can
tell the difference accurately.
We'll test our system thoroughly to make sure it's super accurate and better
than what's out there already. Once it's ready, it'll be seamlessly integrated
into banks' systems, helping them catch fraud quickly and protect people's
money better than ever before.
7
CHAPTER 5
FLOW CHART
The proposed workflow for the fraud detection system begins with the
collection of transaction data from various sources, including credit card
transactions and banking activities. Once collected, the data undergoes
preprocessing to clean and organize it, ensuring accuracy and consistency.
Subsequently, feature engineering is conducted to select and transform
relevant features that will serve as inputs for the fraud detection model.
Following this, the model is developed using advanced machine learning or
deep learning techniques, trained on the engineered features to accurately
identify fraudulent transactions. Evaluation of the model's performance is then
performed using metrics such as the Area Under the Precision-Recall Curve
(AUPRC) to assess its effectiveness. Upon validation, the model is deployed
into production environments within financial institutions, where it is
continuously monitored to ensure ongoing accuracy and effectiveness in
detecting fraud. Additionally, collaboration with other researchers and
leveraging insights from collaborative research projects allow for continuous
improvement and enhancement of the system's capabilities over time. This
comprehensive workflow aims to provide robust protection against fraudulent
activities within the financial sector.
8
CHAPTER 6
REQUIREMENT ANALYSIS
PROJECT CATEGORY:
PYTHON
LIBRARIEES USED:
DEVELOPMENT PLATFORM:
DATASET USED:
TOOLS USED:
9
CHAPTER 7
IMPLEMENTATION
The implementation phase plays the most important role in the software
development process. It is at this stage that the physical source code of the
system being built is created. Programmers code the IT system on the basis
of the collected requirements and the developed project documentation.
Feature Engineering: Extract meaningful features from the data that can
help the deep learning model distinguish between fraudulent and legitimate
transactions. This might include features such as transaction amount,
location, time of day, frequency of transactions, etc. Feature engineering is
crucial for improving the performance of the model.
Training the Model: Split the data into training, validation, and testing sets.
Train the deep learning model on the training data using appropriate loss
functions and optimization algorithms (e.g., binary cross-entropy loss and
Adam optimizer). Experiment with different architectures, hyperparameters,
and regularization techniques to improve performance and prevent overfitting.
10
Evaluation: Evaluate the trained model on the validation set to assess its
performance. Common evaluation metrics for fraud detection include
precision, recall, F1-score, and area under the receiver operating
characteristic curve (AUC-ROC). Fine-tune the model based on the validation
results.
11
7.1 CODING
This Python code builds and trains a neural network model using Keras on
credit card transaction data, aiming to detect fraudulent transactions, followed
by evaluation using metrics such as accuracy, precision, recall, and F1-score.
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from keras.models import Sequential
from keras.layers import Dense, Dropout
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score
data = pd.read_csv('creditcard.csv')
print(data)
if 'class' in data.columns:
data.drop(columns=['class'], inplace=True)
scaler = StandardScaler()
X_scaled = scaler.fit_transform(X)
model = keras.Sequential([
12
keras.layers.Dense(64, activation='relu', input_shape=(X_train.shape[1],)),
keras.layers.Dropout(0.2),
keras.layers.Dense(32, activation='relu'),
keras.layers.Dropout(0.2),
keras.layers.Dense(1, activation='sigmoid')])
y_pred_prob = model.predict(X_test)
print("Accuracy:", accuracy)
print("Precision:", precision)
print("Recall:", recall)
print("F1-Score:", f1)
13
CHAPTER 8
RESULT
The result suggests that the fraud detection model achieved high accuracy,
precision, recall, and F1-score:
14
transactions. A recall of 74.49% suggests that the model successfully
captured 74.49% of all fraudulent transactions present in the dataset.
Although not as high as precision, this level of recall is still considerable and
indicates that the model is effective in identifying fraudulent transactions.
Overall, the high values of accuracy, precision, recall, and F1-score suggest
that the fraud detection model performs very well on the given dataset,
effectively distinguishing between fraudulent and legitimate transactions.
However, it's essential to consider the specific context of the application and
potential implications of false positives and false negatives for further
evaluation of the model's suitability.
15
CHAPTER 9
9.1 CONCLUSION
This high level of accuracy, coupled with balanced precision and recall,
suggests that the model is reliable and effective in detecting fraudulent
activities. However, further analysis and validation may be necessary to assess
its performance across different datasets and real-world scenarios.
Overall, the results indicate that the developed fraud detection model holds
promise for enhancing security and preventing financial losses in credit card
transactions, showcasing its potential for deployment in real-world financial
systems with appropriate monitoring and continuous improvement practices.
16
9.2 FUTURE WORKS
18
CHAPTER 10
REFERENCES:
[2].” Pumsirirat, A., & Liu, Y. (2018). Credit card fraud detection using
deep learning based on auto-encoder and restricted boltzmann
machine. International Journal of advanced computer science and
applications, 9(1).
[4].” Pillai, T. R., Hashem, I. A. T., Brohi, S. N., Kaur, S., & Marjani, M.
(2018, October). Credit card fraud detection using deep learning
technique. In 2018 Fourth International Conference on Advances in
Computing, Communication & Automation (ICACCA) (pp. 1-6). IEEE.
[5].’ Babu, A. M., & Pratap, A. (2020, December). Credit card fraud
detection using deep learning. In 2020 IEEE Recent Advances in
Intelligent Computational Systems (RAICS) (pp. 32-36). IEEE.
19
[7].” S. Bhattacharyya, S. Jha, K.K. Tharakunnel and J.C. Westland,
"Combining unsupervised and supervised learning in credit card fraud
detection", Data mining for credit card fraud: A comparative study.
Decis. Support Syst., vol. 50, pp. 602-613, 2011.
[9].” Shenvi, P., Samant, N., Kumar, S., & Kulkarni, V. (2019, March).
Credit card fraud detection using deep learning. In 2019 IEEE 5th
International Conference for Convergence in Technology (I2CT) (pp.
1-5). IEEE.
[10].” Beigi, S., & Amin Naseri, M. R. (2020). Credit card fraud
detection using data mining and statistical methods. Journal of AI and
Data Mining, 8(2),149-160.
20