0% found this document useful (0 votes)
67 views

FND Report Final

Uploaded by

shreya halaswamy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

FND Report Final

Uploaded by

shreya halaswamy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

JNANA SANGAMA, BELAGAVI

An Internship Report

On

FAKE NEWS DETECTION


Submitted as part of curriculum 2021 scheme with course code 21INT49

BACHELOR OF ENGINEERING
In
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Submitted By
RAJANI K 4GM21CS076

SHARADHI S G 4GM21CS097
SHREYA N M H 4GM21CS100

SUSHMITHA V N 4GM21CS112

Internship Carried Out in SIRINTEL TECHNOLOGIES

Anjaneya Temple opposite, 1st Main, 1st Cross, Near UBDT Boys Hostel Road,
Davangere, Karnataka 57700

Internal Guide External Guide/Mentor


Mrs. SANDHYA R SAVANUR Mr. SHIVALI S
Assistant Professor, GMIT SIRINTEL TECHNOLOGIES

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


GM INSTITUTE OF TECHNOLOGY, DAVANGERE
(Affiliated to VTU, Belagavi, Approved by AICTE -New Delhi & Govt. of Karnataka)

(Accredited by NBA New Delhi, Valid up to 30.06.2025)

2022-2023
Srishyla Educational Trust (R), Bheemasamudra

GM INSTITUTE OF TECHNOLOGY, DAVANGERE


(Affiliated to VTU, Belagavi, Approved by AICTE -New Delhi & Govt. of Karnataka)

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


(Accredited by NBA New Delhi, Valid up to 30.06.2025)

CERTIFICATE

Certified that the Internship titled “Fake News Detection” is a bonafide work carried out by
RAJANI K (4GM21CS076), SHARADHI S G (4GM21CS097), SHREYA N M H
(4GM21CS100), SUSHMITHA V N (4GM21CS112) as per curriculum scheme 2021 with
course code 21INT49 of Bachelor of Engineering in the Department of Computer Science and
Engineering of the Visvesvaraya Technological University, Belagavi, during the year 2022-23.
The internship report has been approved as it satisfies the academic requirements with respect
to the Internship work prescribed for Bachelor of Engineering Degree.

Guide Internship Coordinator Head of the Department


Mrs. Sandhya R Savanur Mr. Kotreshi S N Mr. Santoshkumar M

External Viva

Name of the Examiners Signature with Date

1.

2.
ACKNOWLEDGEMENT

The joy and satisfaction that accompany the successful completion of any task would be
incomplete without the mention of the people who made it possible.

We would like to express our gratitude to our Principal, Dr. Sanjay Pande M B for providing
us a congenial environment for engineering studies and also for having showed us the way to
carry out the Internship work.

We consider it a privilege and honour to express our sincere thanks to Mr.Santoshkumar M,


Assistant Professor and Head, Department of Computer Science and Engineering for his
support and invaluable guidance throughout the tenure of this Internship work.

We would like to thank our Guide Mrs. Sandhya R Savanur, Assistant Professor, Department
of Computer Science and Engineering for support, guidance, motivation, encouragement for
the successful completion of this Internship work.

We would like to thank our mentor Mr. Shivali S, Sirintel technologies, for providing
resources, sharing knowledge and providing industry working environment.

We intend to thank all the teaching and non-teaching staffs of our Department of Computer
Science and Engineering for their immense help and co-operation.

Finally, we would like to express our gratitude to our parents and friends who always stood by
us.

Student Name
RAJANI K 4GM21CS076

SHARADHI S G 4GM21CS097
SHREYA N M H 4GM21CS100

SUSHMITHA V N 4GM21CS112
Srishyla Educational Trust ® Bheemasamudra
GM INSTITUTE OF TECHNOLOGY, DAVANGERE
Department of Computer Science & Engineering

Vision

To build excellent Technocrats in Computer Science and Engineering by continuously


striving for excellence in IT industry to meet the challenges of society.

Mission

1. To train students by adopting effective teaching-learning approach.


2. To establish collaborative learning approach with Industry and Professional bodies.
3. To develop engineers with Professional-Social ethics and creative Research Culture.

Program Educational Objectives


1. Graduates able to apply the knowledge of Basics Science and Core Computer science to
analyze and solve real world problems.
2. Graduates possess professional skills needed for IT employment and pursue higher
education in Computer Science and Engineering.
3. Graduates engage in life-long learning and adapt to changing Environment.
4. Graduates who can succeed as an individual or team leader in multidisciplinary avenues.

Program Specific Outcomes

Graduates of Computer science & engineering are able to:


1. Understand basic principles of programming and core concepts of computer science.
2. Design and analyze software solutions for real world problems using computational
models.
3. Develop Applications using C, Object Oriented Concepts, Computer Graphics,
Database Management System, Web Programming, Machine Learning and Mobile
Application Development to meet current industry and entrepreneurial requirements.
Srishyla Educational Trust ® Bheemasamudra
GM INSTITUTE OF TECHNOLOGY, DAVANGERE
Department of Computer Science & Engineering

Programme outcomes of Computer Science & Engineering


1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering
fundamentals, and an engineering specialization to the solution of complex
engineering problems.
2. Problem analysis: Identify, formulate, research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.
3. Design/development of solutions: Design solutions for complex engineering
problems and design system components or processes that meet the specified needs
with appropriate consideration for the public health and safety, and the cultural,
societal, and environmental considerations.
4. Conduct investigations of complex problems: Use research-based knowledge and
research methods including design of experiments, analysis and interpretation of data,
and synthesis of the information to provide valid conclusions.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modeling to complex
engineering activities with an understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge
to assess societal, health, safety, legal and cultural issues and the consequent
responsibilities relevant to the professional engineering practice.
7. Environment and sustainability: Understand the impact of the professional
engineering solutions in societal and environmental contexts, and demonstrate the
knowledge of, and need for sustainable development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities
and norms of the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or
leader in diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as, being able to comprehend
and write effective reports and design documentation, make effective presentations,
and give and receive clear instructions.
11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a
member and leader in a team, to manage projects and in multidisciplinary
environments.
Life-long learning: Recognize the need for, and have the preparation and ability to engage in
independent and life-long learning in the broadest context of technological change.
CONTENTS

Page No.

Chapter 1: Company Profile 01 - 04


1.1 History
1.2 Vision And Mission
1.3 Company Values
1.4 Strategy
1.5 Commitment Policy
1.6 Quality Policy
1.7 Future Plans of Company
Chapter 2: Introduction 05 - 08
2.1 Objectives
2.2 Problem statement
2.3 Proposed solution
2.4 Organization of the report
Chapter 3: Task Performed 09 - 19
3.1 Weekly Tasks Performed
3.2 Implementation of objective
Chapter 4: Reflection Notes 20 - 21
4.1 Technical outcomes
4.2 Personality development
4.3 Time management
4.4 Skills
Chapter 5: Results 22 - 24
Chapter 6 : Conclusion 25
References 26
LIST OF FIGURES

FIGURE
FIGURE NAME PAGE NO.
NO.
5.1 Home Page of GUI 22

5.2 GUI Page with Result 22

5.3 Alert Box 23

5.4 GMIT Logo as Interactive Button 23

5.5 Guide Photo as Interactive Button 24

5.6 Student Photo as Interactive Button 24


Fake News Detection

CHAPTER 1 : COMPANY PROFILE

About the company SIRINTEL TECHNOLOGIES: Sirintel is a leading upcoming Information


Technology (IT) Service provider who delivers the complete solution for the entire software
necessities with the assured quality. They have proved our competence in IT consulting,
Technology services, R&D and Technology service, IEEE project development, corporate
training, Academic Project enhancement, Business Process Outsourcing, Web Designing,
Content writing, Research Article submission, Blog posting, Blogger services, IT hardware,
System compiling, Telecom products and services, Management solution and many more.
They bestowed the above services not for the client’s satisfaction but to delight us. They gained
the local, national and international clients due to their dedicated services since 2015.

1.1. HISTORY:

• HR DIRECTOR: MAMATA T
• TECHNICAL HEAD: SHIVALI S
• COMPANY PH: +91-89712791247
• EMAIL ID: SIRINTEL.TEC@GMAIL.COM

One good idea can rule the world. The idea of company was started with the expectation of
meeting requirements of real time projects. Sirintel Technologies is a leading firm providing
technological solutions to various students across the state of Karnataka to enrich their
knowledge with practical experience and live training through various projects. Being situated
in the city of Davangere, the center place of Karnataka, Sirintel Technologies is accessible to
all the students throughout Karnataka. It is having a geographical advantage being in the center
city of Karnataka.

1
Fake News Detection

1.2. VISION:

The Main vision of Sirintel Technologies is " To be a key player in deployment of Knowledge
Technology, by producing and providing versatile and resourceful professionals to the growing
Industries. The vision of Sirintel Technologies is to involve its students in never-ending
Engineering Research and make them excel in Quality Education. In the years to come its
vision is to keep its students in the forefront in Engineering and Technological Education.
Moreover, it should remain forever a world class institution for technological education and
scientific research for public good.

1.3. MISSION:

To create and sustain a community of learning in which students acquire knowledge and learn
to apply it professionally with due consideration for ethical, ecological and economic issues

• To pursue research and disseminate research findings


• To provide knowledge-based technological services to satisfy the needs of society and
the industry
• To help in building national capabilities in science, technology, humanities,
management, education and research

1.4. COMPANY VALUES:

• Diversity: Considerable diversity in the project design and acceptance. Application of


diversified tools and technologies.
• Team work: Teamwork of experts make it more worth it. Engagement of various
maestro on the subject make is more disciplined
• Knowledge Sharing and enhancement: Knowledge is available in plenty. This
knowledge is to reach students in simple and understandable way with the help of
experts.
• Transparency: Transparency in all the work, training, projects, simulation projects and
live projects is maintained so give a better insight to the students

2
Fake News Detection

• Commitment: Commitment of spreading and enhancing knowledge and presenting


better people with high skills to the organizations and to create Job Opportunities
• Continuous improvement: Continuous improvement through upgradation of
Technology, tools, designs, knowledge, expertise and experiments.

1.5. STRATEGY:

Our strategy is built on the strong foundation of corporate values. To drive the focus of
entire organization and to ensure successful implementation we have designed strategies such
as :

• Use advanced tools and technologies


• Continuous improvement and upgradation
• Inspire students
• Share Expertise knowledge

1.6. COMMITMENT POLICY:

We will achieve positive change across the globe through:

• Inspiring Students
• Establishing ultimate Expert Service Arena
• Knowledge Sharing and enhancement
• Embracing Sirintel Technologies to be the global performer
• Produce Pristine results and project solutions

Sirintel Technologies conduct a continuous set of workshops, Internship and Training


Programs to help students to be ready for the pragmatic and realistic practices for actual job on
the site. Students are seasoned to be skilled in an area of expertise to be pristine and successful.
Sirintel Technologies is also conducting live projects to give practical approach and
understanding to students so that the subject knowledge is acquired with mastery over it with
the help of various experts across the globe.

3
Fake News Detection

1.7. QUALITY POLICY:

• Sirintel Technologies commitment to quality extends to every aspect of business and


technology. The overarching goal is to fine tune and output the best in the student with
the practical and theoretical mastery over the area of expertise. In order to ensure robust
and impeccable solution, Sirintel Technologies follows the following major principles:
➢ Use advanced softwares
➢ Use advanced and proven technologies
➢ Design tailor made solutions and projects
➢ The best fine tune process of training and knowledge impartation
➢ Work with experts, specialists and maestro in each discipline
➢ Provide close student and project monitoring
➢ Round the clock accessibility to the students with the experts
➢ Online support in special cases
➢ Maintain a quality of culture
➢ Strive on continuous improvement and upgradation
➢ Ensure high quality results

1.8. FUTURE PLANS OF COMPANY:

The company is new and is having big plans to hit the big success in future. To ensure that the
Sirintel Technologies achieves its goals in the long run, we are carrying on the following
activities:

➢ We are approaching the Government with new projects in various fields such as
transportation, maintenance of records, Rural data etc.
➢ We are also planning to design various medical electronic devices at the lower cost.
➢ Planning to be broad based all over India and to enter the global markets in future.

4
Fake News Detection

Chapter 2: INTRODUCTION

2.1. OBJECTIVES:
➢ To detect fake news effectively to avoid defamation of individuals.
➢ Determines the accuracy of the “Fake News Detector”.

2.2. PROBLEM STATEMENT:


➢ Fake news is a real problem in today's world and it has become more extensive and
harder to identify.
➢ A major challenge in fake news detection is to detect it in the early phase.
➢ Another challenge in fake news detection is the unavailability or the shortage of labelled
data for training the detection models.
➢ A common practice to hide the source of the entity spreading fake news is to hijack
other individuals' accounts.
➢ The owners of such accounts may be defamed, e.g., by the spread of fake news.

2.3. PROPOSED SOLUTION:

“Passive Aggressive Classifier” algorithm is used to detect Fake News. It is a classification


algorithm that falls under the category of online learning in machine learning. Passive
Aggressive Classifier is an online learning algorithm where you train a system incrementally
by feeding it instances sequentially, individually or in small groups called mini-batches.

In online learning, a machine learning model is trained and deployed in production in


a way that continues to learn as new data sets arrive. So we can say that an algorithm like
Passive Aggressive Classifier is best for systems that receive data in a continuous stream.
Passive-Aggressive Algorithms Work as below :

Passive: If the prediction is correct, keep the model and do not make any changes. i.e.,
the data in the example is not enough to cause any changes in the model.

Aggressive: If the prediction is incorrect, make changes to the model. i.e., some change
to the model may correct it.

5
Fake News Detection

What is Confusion Matrix and why it is required ?


It is a performance measurement for machine learning classification problem where output can
be two or more classes. It is a table with 4 different combinations of predicted and actual values.

Confusion Matrix:

It is extremely useful for measuring Recall, Precision, Specificity, Accuracy, and most
importantly AUC-ROC curves.
Let’s take TP, FP, FN, TN in terms of pregnancy analogy.

6
Fake News Detection

True Positive:
Interpretation: If it is predicted positive and it’s true.
Prediction is that a woman is pregnant and she actually is.

True Negative:
Interpretation: If it is predicted negative and it’s true.
Prediction is that a man is not pregnant and he actually is not.

False Positive: (Type 1 Error)


Interpretation: If it is predicted positive and it’s false.
Prediction is that a man is pregnant but he actually is not.

False Negative: (Type 2 Error)


Interpretation: If it is predicted negative and it’s false.
Prediction is that a woman is not pregnant but she actually is.
We described predicted values as Positive and Negative and actual values as True and False.

7
Fake News Detection

How to Calculate Confusion Matrix for a 2-class classification problem?


Let us understand the confusion matrix through math.

2.4. ORGANIZATION OF THE REPORT

Section 2.1 explains the objective of our project “Fake News Detection”. Section 2.2 gives the
problem statement. Section 2.3 explains the proposed solution for the problem statement.
Section 3 lists the week wise report of tasks completed during internship period. Section 4.1
includes the technical outcomes of the project. Section 4.2 includes the details of how
internship helped in personality development. Section 4.3 details about the time management
skills learnt during internship. Section 4.4 describes the technical skills learnt during the
internship. Section 5 contains results and conclusion.

8
Fake News Detection

Chapter 3: TASK PERFORMED

3.1. WEEKLY TASKS PERFORMED

WEEK 1 (10/10/2022 – 15/10/2022)

TOPIC: Basics of Python and Data Structures in Python

What is Python?

Python is a popular programming language. It was created by Guido van Rossum, and released
in 1991.

It is used for:

• web development (server-side),


• software development,
• mathematics,
• system scripting.

What can Python do?

• Python can be used on a server to create web applications.


• Python can be used alongside software to create workflows.
• Python can connect to database systems. It can also read and modify files.
• Python can be used to handle big data and perform complex mathematics.
• Python can be used for rapid prototyping, or for production-ready software
development.

Why Python?

• Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.).

9
Fake News Detection

• Python has a simple syntax similar to the English language.


• Python has syntax that allows developers to write programs with fewer lines than some
other programming languages.
• Python runs on an interpreter system, meaning that code can be executed as soon as it
is written. This means that prototyping can be very quick.
• Python can be treated in a procedural way, an object-oriented way or a functional way.

Data Structures : are a way of organizing data so that it can be accessed more efficiently
depending upon the situation. Data Structures are fundamentals of any programming
language around which a program is built. Python helps to learn the fundamental of these
data structures in a simpler way as compared to other programming languages.

LISTS:

• A Python list is similar to an array in other languages. In Python, an empty list can be
created in the following ways.
my_list = []
my_list = list()

EXAMPLES:

• my_list = [1, 2, 3]
• my_list2 = ["a", "b", "c"]
• my_list3 = ["a", 1, "Python", 5]

TUPLES:
• A tuple is similar to a list, but you create them with parentheses instead of square
brackets. You can also use the tuple built-in. The main difference is that a tuple is
immutable while the list is mutable. Let’s look at a few examples:

my_tuple = (1, 2, 3, 4, 5)
my_tuple [0:3] = (1, 2, 3)

10
Fake News Detection

another_tuple = tuple ()
abc =tuple([1, 2, 3])

DICTIONARIES:
• A Python dictionary is basically a hash table or a hash mapping. In some languages,
they might be referred to as associative memories or associative arrays. They are
indexed with keys, which can be any immutable type. For example, a string or number
can be a key. You need to be aware that a dictionary is an unordered set of key : value
pairs and the keys must be unique. You can get a list of keys by calling a dictionary
instance’s keys method. To check if a dictionary has a key, you can use Python’s in
keyword. In some of the older versions of Python (2.3 and older to be specific), you
will see the has_key keyword used for testing if a key is in a dictionary. This keyword
is deprecated in Python 2.x and removed entirely from Python 3.x.

Let’s take a moment to see how we create a dictionary.


my_dict = {}
another_dict = dict()
my_other_dict = {"one":1, "two":2, "three":3}
my_other_dict
{'three': 3, 'two': 2, 'one': 1}

More on Lists:
The list data type has some more methods. Here are all the methods of list objects:

list.append(x)
Add an item to the end of the list. Equivalent to a[len(a):] = [x].

list.extend(iterable)
Extend the list by appending all the items from the iterable. Equivalent
to a[len(a):] = iterable.

11
Fake News Detection

list.insert(i, x)
Insert an item at a given position. The first argument is the index of the element before
which to insert, so a.insert(0, x) inserts at the front of the list, and a.insert(len(a), x) is
equivalent to a.append(x).

list.remove(x)
Remove the first item from the list whose value is equal to x. It raises a ValueError if
there is no such item.

list.pop([i])
Remove the item at the given position in the list, and return it. If no index is
specified, a.pop() removes and returns the last item in the list. (The square brackets
around the i in the method signature denote that the parameter is optional, not that you
should type square brackets at that position. You will see this notation frequently in the
Python Library Reference.)

list.clear()
Remove all items from the list. Equivalent to del a[:].

list.index(x[, start[, end]])


Return zero-based index in the list of the first item whose value is equal to x. Raises
a ValueError if there is no such item.

The optional arguments start and end are interpreted as in the slice notation and are
used to limit the search to a particular subsequence of the list. The returned index is
computed relative to the beginning of the full sequence rather than the start argument.

list.count(x)
Return the number of times x appears in the list.

list.sort(*, key=None, reverse=False)


Sort the items of the list in place (the arguments can be used for sort customization,
see sorted() for their explanation).

12
Fake News Detection

list.reverse()
Reverse the elements of the list in place.

list.copy()
Return a shallow copy of the list. Equivalent to a[:].

13
Fake News Detection

WEEK 2 (17/10/2022-22/10/2022)

TOPIC: Ethical hacking

Ethical hacking is also known as White hat Hacking or Penetration Testing. Ethical hacking
involves an authorized attempt to gain unauthorized access to a computer system or data.
Ethical hacking is used to improve the security of the systems and networks by fixing the
vulnerability found while testing.

Ethical hackers improve the security posture of an organization. Ethical hackers use the same
tools, tricks, and techniques that malicious hackers used, but with the permission of the
authorized person. The purpose of ethical hacking is to improve the security and to defend the
systems from attacks by malicious users.

Advantages of Hacking:

1. It is used to recover the loss of information, especially when you lost your password.
2. It is used to perform penetration testing to increase the security of the computer and
network.
3. It is used to test how good security is on your network.

Disadvantages of Hacking:
1. It can harm the privacy of someone.
2. Hacking is illegal.
3. Criminal can use hacking to their advantage.
4. Hampering system operations.
5. Massive security breach.

14
Fake News Detection

WEEK 3: (24/10/2022 – 31/10/2022)

TOPIC: Creating GUI in python

Python offers multiple options for developing GUI (Graphical User Interface). Out of all the
GUI methods, tkinter is the most commonly used method. It is a standard Python interface to
the Tk GUI toolkit shipped with Python. Python with tkinter is the fastest and easiest way to
create the GUI applications. Creating a GUI using tkinter is an easy task.

To create a tkinter app:


1. Importing the module – tkinter
2. Create the main window (container)
3. Add any number of widgets to the main window
4. Apply the event Trigger on the widgets.
Importing tkinter is same as importing any other module in the Python code. Note that the
name of the module in Python 2.x is ‘Tkinter’ and in Python 3.x it is ‘tkinter’.

import tkinter

There are two main methods used which the user needs to remember while creating the
Python application with GUI.

1. Tk(screenName=None, baseName=None, className=’Tk’, useTk=1): To


create a main window, tkinter offers a method
‘Tk(screenName=None, baseName=None, className=’Tk’, useTk=1)’. To
change the name of the window, you can change the className to the desired one.
The basic code used to create the main window of the application is:
m=tkinter.Tk() where m is the name of the main window object

2. mainloop(): There is a method known by the name mainloop() is used when


your application is ready to run. mainloop() is an infinite loop used to run the
application, wait for an event to occur and process the event as long as the window
is not closed.
m.mainloop()

15
Fake News Detection

import tkinter
m = tkinter.Tk()
'''
widgets are added here
'''
m.mainloop()

tkinter also offers access to the geometric configuration of the widgets which can organize
the widgets in the parent windows. There are mainly three geometry manager classes class.

1. pack() method : It organizes the widgets in blocks before placing in the parent
widget.
2. grid() method : It organizes the widgets in grid (table-like structure) before
placing in the parent widget.
3. place() method : It organizes the widgets by placing them on specific positions
directed by the programmer.

16
Fake News Detection

3.2. IMPLEMENTATION OF OBJECTIVE :

The “Fake News Detection” project is implemented using Passive Aggressive Algorithm
which works as shown below :

def accuracy():

# Read the CSV file 'news.csv' and load it into a DataFrame called df

df = pd.read_csv('news.csv')

# Display the shape of the DataFrame (number of rows and columns)

# and the first few rows of the DataFrame

df.shape

df.head()

# Extract the 'label' column (target variable) into the variable 'labels'

labels = df.label

# Split the data into training and testing sets

# 'text' column as input features (x_train and x_test)

# 'label' column as the target variable (y_train and y_test)

x_train, x_test, y_train, y_test = train_test_split(df['text'], labels, test_size=0.2,


random_state=7)

# Create a TF-IDF vectorizer to convert text data to numerical representation

# Stop words are removed (common English words like 'the', 'and', etc.)

17
Fake News Detection

# Terms with a document frequency higher than 70% are ignored

tfidf_vectorizer = TfidfVectorizer(stop_words='english', max_df=0.7)

# Convert the training data to TF-IDF vectors

tfidf_train = tfidf_vectorizer.fit_transform(x_train)

# Convert the test data to TF-IDF vectors using the same vectorizer

tfidf_test = tfidf_vectorizer.transform(x_test)

# Create a Passive Aggressive Classifier and train it on the training data

pac = PassiveAggressiveClassifier(max_iter=50)

pac.fit(tfidf_train, y_train)

# Predict labels for the test data using the trained model

y_pred = pac.predict(tfidf_test)

# Calculate the accuracy of the model's predictions on the test data

score = accuracy_score(y_test, y_pred)

# Print the accuracy score as a percentage rounded to two decimal places

print(f'Accuracy: {round(score*100,2)}%')

# Calculate the confusion matrix for the model's predictions

# The confusion matrix shows true positives, true negatives, false positives, and false negatives

18
Fake News Detection

CNF = confusion_matrix(y_test, y_pred, labels=['FAKE', 'REAL'])

# Print the confusion matrix

print(CNF)

19
Fake News Detection

Chapter 4: REFLECTION NOTES


Outcomes from the internship technical and non-technical.

4.1. TECHNICAL OUTCOMES:

➢ Python Programming : PyCharm is a dedicated Python Integrated Development


Environment (IDE) providing a wide range of essential tools for Python developers,
tightly integrated to create a convenient environment for productive Python, web, and
data science development.
➢ Machine Learning: Machine learning is mostly used for decision-making, or any
prediction which is used for developing projects.
➢ Artificial Intelligence: The development of computer system to perform tasks requiring
human intelligence such as decision making, speech recognition and translation between
languages.

4.2. PERSONALITY DEVELOPMENT:

➢ Sirintel Technologies company conducted a placement talk and business strategy event
by person Kisan, where he was an employer from upgrade.
➢ He discussed about higher studies and placement drives which is going to be huge turn
over in a student's personal choice.
➢ Discussed about courses offered from upgrade which a student can learn efficiently by
just sitting at home and completing the course duration affectively. And after taking up
& course a good performer will get a guaranteed job with a stipend salary.

4.3. TIME MANAGEMENT:

➢ Choose a dedicated work space.


➢ Communication with co-workers is key.
➢ Have to set the goal to complete the task within the time. While performing any work,
always
➢ keep in mind to meet the given deadlines.
➢ Documentation should be done

20
Fake News Detection

4.4. SKILLS :

➢ Introduction to Graphical User Interface:


It is a form of user interface that allows users to interact with electronic devices
through graphical icons. In this Internship we learnt how to create the website page
using python GUI. We had created college website page using GUI, Sentimental
Analysis using GUI etc.

➢ Introduction to python (basics):


We have learnt the basics of python like Basic Packages, PIP installation, Tuple ,
Append , Basic Data Types in the python

➢ Insertion of images, texts:


We learnt insertion of images and texts by importing the required libraries and
creating an instance Tkinter frame.

➢ Insertion of PDF:
We learnt how to display the PDF files in the Tkinter GUI by using the required
libraries to read the file.

➢ Collaboration:
It is the partnership; a union; The act of producing and making something, Where
we worked together to achieve a common goal in ways that benefits our skill
development.

21
Fake News Detection

Chapter 5: RESULTS

Fig. 5.1. HOME PAGE OF GUI

Fig. 5.2. GUI PAGE WITH RESULT

22
Fake News Detection

Fig. 5.3. ALERT BOX

Fig. 5.4. GMIT LOGO AS INTERACTIVE BUTTON

23
Fake News Detection

Fig. 5.5. GUIDE PHOTO AS INTERACTIVE BUTTON

Fig. 5.6. STUDENT PHOTO AS INTERACTIVE BUTTON

24
Fake News Detection

Chapter 6 : CONCLUSION

In the 21st century, the majority of the tasks are done online. Newspapers that were earlier
preferred as hard-copies are now being substituted by applications like Facebook, Twitter, and
news articles to be read online. WhatsApp’s forwards are also a major source. The growing
problem of fake news only makes things more complicated and tries to change or hamper the
opinion and attitude of people towards use of digital technology.

When a person is deceived by the real news, two possible things happen- People start
believing that their perceptions about a particular topic are true as assumed. Thus, in order to
curb the phenomenon, the “Fake News Detection” system has been developed that takes
performance evaluation, which is also done using various performance measures. The best
model, i.e. the model with highest accuracy is used to classify the news headlines or articles.
As evident above for static search, this best model came out to be Logistic Regression with an
accuracy of 65%. Hence, the grid search parameter is used for optimization to increase the
performance of logistic regression which gave the accuracy of 75%. Hence, if a user feed a
particular news article or its headline in this model, there are 75% chances that it will be
classified to its true nature. The user can check the news article or keywords online; he can also
check the authenticity of the website. The accuracy for dynamic system is 93% and it increases
with every iteration.

This project is intended to build its own dataset which will be kept up to date according
to the latest news. All the live news and latest data will be kept in a database using Web Crawler
and online database.input from the user and classify it to be true or fake. To implement this,
various NLP and Machine Learning Techniques have to be used. The model is trained using
an appropriate dataset.

25
Fake News Detection

REFERENCES

[1] H. Gupta, M. S. Jamal, S. Madisetty and M. S. Desarkar, "A framework for real-time spam
detection in Twitter," 2018 10th International Conference on Communication Systems &
Networks (COMSNETS), Bengaluru, 2018, pp. 380-383

[2] M. L. Della Vedova, E. Tacchini, S. Moret, G. Ballarin, M. DiPierro and L. de Alfaro,


"Automatic Online Fake News Detection Combining Content and Social Signals," 2018 22nd
Conference of Open Innovations Association (FRUCT), Jyvaskyla, 2018, pp. 272- 279.

[3] Reis 1. C. Correia, A., Murai, F., Veloso, A., Benevento, F., & Cambria, E. (2019).
Supervised Leaming for Fake News Detection IEEE Intelligent Systems, 34(2), 76-81

[4] Pal, S. Kumar, T. S, & Pal, S., (2019). Applying Machine Learning to Detect Fake News.
Indian Journal of Computer Science.

[5] IOP Conference Series: Materials Science and Engineering, Volume 1099, International
Conference on Applied Scientific Computational Intelligence using Data Science (ASCI 2020)
22nd-23rd December 2020, Jaipur, India

26

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy