"Credit Card Fraud Detection": Project Report

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

Project Report

On
“Credit Card Fraud Detection”

Submitted in the Partial fulfillment of the requirement for the Award of Degree of

Bachelor of Technology
in
COMPUTER SCIENCE & ENGINEERING

Batch
(2017-2021)

Submitted to Submitted by
Er. Vinod Sharma Sanyam Dhawan-1701359
HOD (CSE) Prabhnoor Singh-1701327
Shivam Kapoor-1701368

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Amritsar College of Engineering & Technology,


Amritsar
(Autonomous college under UGC Act – 1956[2(f) and 12(B)])

CREDIT CARD FRAUD DETECTION 1


ACKNOWLEDGEMENT

This is a humble effort to express our sincere gratitude towards those who have guided and
helped me to complete this project.

A project is major milestone during the study period of a student. As such this project was a
challenge to us and was an opportunity to prove our caliber. We are highly grateful and
obliged to each and every-one making me help out of problems being faced by us.

It would not have been possible to see through the undertaken project without the guidance of
Er. Shivani Sharma. It was purely on the basis of their experience and knowledge that we
able to clear all the theoretical and technical hurdles during the development phases of this
project work.

Last but not the least we are very thankful to our Head of Department Er. Vinod Sharma
and all Members of Computer Science Deptt. who gave us an opportunity to face real time
problems while fulfilling need of an organization by making projects for them.

CREDIT CARD FRAUD DETECTION 2


DECLARATION

We Rajni and group hereby declare that the project work entitled “Credit Card Fraud
Detection” is an authentic record of our own work carried out as requirements of Institutional
project for the award of degree of B.Tech(CSE), Amritsar Group of Colleges, Amritsar,
under the guidance of Er. Shivani Sharma .

(Signature of Students)
Sanyam Dhawan-1701359
Prabhnoor Singh-1701327
Shivam Kapoor-1701368

Certified that the above statement made by the student is correct to the best of our knowledge
and belief.

Faculty Coordinator

Er. Shivani Sharma (Assistant Professor – CSE Department)

CREDIT CARD FRAUD DETECTION 3


INDEX PAGE

Sr. No. Content Page No.

1. Introduction about the subject 5-6

2. Introduction about the project 7-8

3. Project code 9-10

4. Output 11

CREDIT CARD FRAUD DETECTION 4


Introduction to subject

Machine learning (ML) is basically that field of computer science with the help of which computer
systems can provide sense to data in much the same way as human beings do. In simple words, ML is
a type of artificial intelligence that extract patterns out of raw data by using an algorithm or method.
The key focus of ML is to allow computer systems to learn from experience without being explicitly
programmed or human intervention.

It is the study of computer algorithms that improve automatically through experience. It is seen as a
subset of artificial intelligence. Machine learning algorithms build a mathematical model based on
sample data, known as "training data", in order to make predictions or decisions without being
explicitly programmed to do so. [2] Machine learning algorithms are used in a wide variety of
applications, such as email filtering and computer vision, where it is difficult or infeasible to develop
conventional algorithms to perform the needed tasks.

APPLICATION

 it is growing very rapidly day by day. We are using machine learning in our daily life even without
knowing it such as Google Maps, Google assistant, Alexa, etc. Below are some most trending real-
world applications of Machine Learning:

1. Image Recognition:

Image recognition is one of the most common applications of machine learning. It is used to identify
objects, persons, places, digital images, etc. Whenever we upload a photo with our Facebook friends,
then we automatically get a tagging suggestion with name, and the technology behind this is machine
learning's face detection and recognition algorithm.

2. Speech Recognition

Speech recognition is a process of converting voice instructions into text, and it is also known as
"Speech to text". At present, machine learning algorithms are widely used by various applications of
speech recognition. Google assistant, Siri, Cortana, and Alexa are using speech recognition
technology to follow the voice instructions.
CREDIT CARD FRAUD DETECTION 5
3. Traffic prediction

It predicts the traffic conditions such as whether traffic is cleared, slow-moving, or heavily congested
with the help of two ways:

o Real Time location of the vehicle form Google Map app and sensors
o Average time has taken on past days at the same time.

4. Product recommendations:

Machine learning is widely used by various e-commerce and entertainment companies such
as Amazon, Netflix, etc., for product recommendation to the user. Whenever we search for some
product on Amazon, then we started getting an advertisement for the same product while internet
surfing on the same browser and this is because of machine learning.

5. Self-driving cars:

One of the most exciting applications of machine learning is self-driving cars. Machine learning plays
a significant role in self-driving cars. Tesla, the most popular car manufacturing company is working
on self-driving car. It is using unsupervised learning method to train the car models to detect people
and objects while driving.

6. Email Spam and Malware Filtering:

Whenever we receive a new email, it is filtered automatically as important, normal, and spam. We
always receive an important mail in our inbox with the important symbol and spam emails in our

CREDIT CARD FRAUD DETECTION 6


spam box, and the technology behind this is Machine learning. Below are some spam filters used by
Gmail:

o Content Filter
o Header filter
o General blacklists filter
o Rules-based filters
o Permission filters

7. Virtual Personal Assistant:

We have various virtual personal assistants such as Google assistant, Alexa, Cortana, Siri. They


help us in finding the information using our voice instruction. These assistants can help us in various
ways just by our voice instructions such as Play music, call someone, open an email, Scheduling an
appointment, etc. These assistant record our voice instructions, send it over the server on a cloud, and
decode it using ML algorithms and act accordingly.

8. Online Fraud Detection:

Whenever we perform some online transaction, there may be various ways that a fraudulent
transaction can take place such as fake accounts, fake ids, and steal money in the middle of a
transaction. So to detect this, Feed Forward Neural network helps us by checking whether it is a
genuine transaction or a fraud transaction.

9. Stock Market trading:

Machine learning is widely used in stock market trading. In the stock market, there is always a risk of
up and downs in shares, so for this machine learning's long short term memory neural network is
used for the prediction of stock market trends.

10. Medical Diagnosis:

In medical science, machine learning is used for diseases diagnoses. With this, medical technology is
growing very fast and able to build 3D models that can predict the exact position of lesions in the
brain.

It helps in finding brain tumors and other brain-related diseases easily.

CREDIT CARD FRAUD DETECTION 7


Introduction to project

The challenge is to recognize fraudulent credit card transactions so that the


customers of credit card companies are not charged for items that they did not
purchase.
Main challenges involved in credit card fraud detection are:

1. Enormous Data is processed every day and the model build must be fast
enough to respond to the scam in time.
2. Imbalanced Data i.e most of the transactions (99.8%) are not fraudulent
which makes it really hard for detecting the fraudulent ones
3. Data availability as the data is mostly private.
4. Misclassified Data can be another major issue, as not every fraudulent
transaction is caught and reported.
5. Adaptive techniques used against the model by the scammers.

How to tackle these challenges?

1. The model used must be simple and fast enough to detect the anomaly
and classify it as a fraudulent transaction as quickly as possible.
2. Imbalance can be dealt with by properly using some methods which we
will talk about in the next paragraph
3. For protecting the privacy of the user the dimensionality of the data can
be reduced.
4. A more trustworthy source must be taken which double-check the data,
at least for training the model.
5. We can make the model simple and interpretable so that when the
scammer adapts to it with just some tweaks we can have a new model up
and running to deploy.

Before going to the code it is requested to work on a jupyter notebook. If not


installed on your machine you can use Google colab.
You can download the dataset from this link
If the link is not working please go to this link and login to kaggle to download the
dataset.

Advantages of Machine learning


1. Easily identifies trends and patterns

Machine Learning can review large volumes of data and discover specific trends and patterns that
would not be apparent to humans. For instance, for an e-commerce website like Amazon, it serves to
understand the browsing behaviors and purchase histories of its users to help cater to the right

CREDIT CARD FRAUD DETECTION 8


products, deals, and reminders relevant to them. It uses the results to reveal relevant advertisements to
them.

2. No human intervention needed (automation)

With ML, you don’t need to babysit your project every step of the way. Since it means giving
machines the ability to learn, it lets them make predictions and also improve the algorithms on their
own. A common example of this is anti-virus softwares, they learn to filter new threats as they are
recognized. ML is also good at recognizing spam.

3. Continuous Improvement

As ML algorithms gain experience, they keep improving in accuracy and efficiency. This lets them
make better decisions. Say you need to make a weather forecast model. As the amount of data you
have keeps growing, your algorithms learn to make more accurate predictions faster.

4. Handling multi-dimensional and multi-variety data

Machine Learning algorithms are good at handling data that are multi-dimensional and multi-variety,
and they can do this in dynamic or uncertain environments.

5. Wide Applications

You could be an e-tailer or a healthcare provider and make ML work for you. Where it does apply, it
holds the capability to help deliver a much more personal experience to customers while also targeting
the right customers.

Disadvantages of Machine Learning


With all those advantages to its powerfulness and popularity, Machine Learning isn’t perfect. The
following factors serve to limit it:

1. Data Acquisition

Machine Learning requires massive data sets to train on, and these should be inclusive/unbiased, and
of good quality. There can also be times where they must wait for new data to be generated.

2. Time and Resources

ML needs enough time to let the algorithms learn and develop enough to fulfill their purpose with a
considerable amount of accuracy and relevancy. It also needs massive resources to function. This can
mean additional requirements of computer power for you

CREDIT CARD FRAUD DETECTION 9


Source code

1
CREDIT CARD FRAUD DETECTION
0
1
CREDIT CARD FRAUD DETECTION
1
1
CREDIT CARD FRAUD DETECTION
2
1
CREDIT CARD FRAUD DETECTION
3
1
CREDIT CARD FRAUD DETECTION
4
1
CREDIT CARD FRAUD DETECTION
5

You might also like