SlideShare ist ein Scribd-Unternehmen logo
1 von 7
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
DETECTION OF FAKE NEWS THROUGH IMPLEMENTATION OF DATA SCIENCE APPLICATION
In this project we are using LSTM(Long Short Term Memory) Recurrent Neural Network to predict
fake news as huge amount of fake news is gathering in all types of media such as social media or
news media and to detect fake news author is training LSTMneural network with past news data
label as ‘Genuine’ and ‘Fake’. We downloaded available twitter FAKE NEWS tweets from internet
and below is the dataset screen shots
In above dataset we can see last two columns contains news text and target value where text
contains news data and target contain class label as 0 and 1 where 0 means that news is GENUINE
and 1 means thatnewsisFAKE. In belowscreen we are showing code that using NGRAMto convert
news data to TF-IDF vector
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above screeninselectedline we are creating TFIDF object with NGRAMand then in next line we
are applyingTFIDFobjectontextdata(newsdataset) toconvert news data to numeric vector which
contains count of each word. In below screen showing LSTMneural network creation
SCREEN SHOTS
To run project double click on‘run.bat’ file to get below screen
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above screen click on ‘Upload Fake News Dataset’ button to upload dataset
In above screen selecting and uploading ‘news.csv’ file and then click on ‘Open’ button to load
dataset and to get below screen
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above screendatasetloadedandthenintextareawe can see all news text with the class label as
0 or 1 and now click on ‘Preprocess Dataset & Apply NGram’ button to convert above string data to
numeric vector and to get below screen
In above screen all news words put in column header and if that word appear in any row then that
rowscolumnwill be change withwordcountand if not appearthen0 will be putincolumn. Inabove
screenshowingsome recordsfrom total 7612 news records and in bottom lines we can see dataset
contains total 7613 records and then application using 80% (6090 news records) for training and
then using 20% (1523 news records) for testing and now dataset is ready with numeric record and
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
now click on ‘Run LSTM Algorithm’ button to train above dataset with LSTM and then build LSTM
model and then calculate accuracy and error rate
In above screen LSTMmodel is generated and we got its prediction accuracy as 69.49% and we can
see below console to see LSTMlayer details
In above screen different LSTM layers are created to filter input data to get efficient features for
prediction. Now click on ‘Accuracy & Loss Graph’ button to get LSTMgraph
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above graphx-axisrepresentsepoch/iterationsandy-axisrepresents accuracy and loss value and
greenline representsaccuracyandblue line representslossvalue and at each increasing epoch loss
values get decrease and accuracy reached to 70%. Now click on ‘Test News Detection’ button to
uploadsome testnewssentencesandthenapplicationpredictwhetherthatnewsisgenuineorfake.
In belowtestnewsdatasetwe cansee onlyTEXT data noclass label and LSTMwill predict class label
for that test news
In above screen in test news we have only one column which contains only news ‘TEXT’ and after
applying above test news we will get prediction result
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above screen selecting and uploading ‘testNews.txt’ file and then click on ‘Open’ button to load
data and to get below prediction result
In above screen before dashed symbols we have news text and after dashed symbol application
predict news as ‘FAKE or GENUINE’. After building model when we gave any news text then LSTM
will check whether more words belongs to genuine or fake category and whatever category get
more matching percentage then application will predict that class label.

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

snake game
snake gamesnake game
snake game
 
Functions in python slide share
Functions in python slide shareFunctions in python slide share
Functions in python slide share
 
Strings in python
Strings in pythonStrings in python
Strings in python
 
Safety app for woman
Safety app for womanSafety app for woman
Safety app for woman
 
Python Functions
Python   FunctionsPython   Functions
Python Functions
 
Python
PythonPython
Python
 
Language processing activity
Language processing activityLanguage processing activity
Language processing activity
 
Python exception handling
Python   exception handlingPython   exception handling
Python exception handling
 
Infix to postfix conversion
Infix to postfix conversionInfix to postfix conversion
Infix to postfix conversion
 
report on snake game
report on snake game report on snake game
report on snake game
 
Quadratic probing
Quadratic probingQuadratic probing
Quadratic probing
 
List in Python
List in PythonList in Python
List in Python
 
Python GUI Programming
Python GUI ProgrammingPython GUI Programming
Python GUI Programming
 
Women security application
Women security applicationWomen security application
Women security application
 
Single pass assembler
Single pass assemblerSingle pass assembler
Single pass assembler
 
Single Pass Assembler
Single Pass AssemblerSingle Pass Assembler
Single Pass Assembler
 
Stacks
StacksStacks
Stacks
 
Introduction to Basics of Python
Introduction to Basics of PythonIntroduction to Basics of Python
Introduction to Basics of Python
 
Python: Modules and Packages
Python: Modules and PackagesPython: Modules and Packages
Python: Modules and Packages
 
Chapter 14 strings
Chapter 14 stringsChapter 14 strings
Chapter 14 strings
 

Ähnlich wie 4.detection of fake news through implementation of data science application

Ähnlich wie 4.detection of fake news through implementation of data science application (20)

Traffic sign detection and recognition
Traffic sign detection and recognitionTraffic sign detection and recognition
Traffic sign detection and recognition
 
Dynamic autoselection and autotuning of machine learning models forcloud netw...
Dynamic autoselection and autotuning of machine learning models forcloud netw...Dynamic autoselection and autotuning of machine learning models forcloud netw...
Dynamic autoselection and autotuning of machine learning models forcloud netw...
 
Deep clue visual interpretation of text based deep stock prediction
Deep clue visual interpretation of text based deep stock predictionDeep clue visual interpretation of text based deep stock prediction
Deep clue visual interpretation of text based deep stock prediction
 
Date fruit classification for robotic harvesting in a natural environment usi...
Date fruit classification for robotic harvesting in a natural environment usi...Date fruit classification for robotic harvesting in a natural environment usi...
Date fruit classification for robotic harvesting in a natural environment usi...
 
Deep learning for smartphone based malaria parasite detection in thick blood ...
Deep learning for smartphone based malaria parasite detection in thick blood ...Deep learning for smartphone based malaria parasite detection in thick blood ...
Deep learning for smartphone based malaria parasite detection in thick blood ...
 
Automating e government using ai
Automating e government using aiAutomating e government using ai
Automating e government using ai
 
Classifying fake news articles using natural language processing to identify ...
Classifying fake news articles using natural language processing to identify ...Classifying fake news articles using natural language processing to identify ...
Classifying fake news articles using natural language processing to identify ...
 
A new architecture of internet of things and big data ecosystem for
A new architecture of internet of things and big data ecosystem forA new architecture of internet of things and big data ecosystem for
A new architecture of internet of things and big data ecosystem for
 
Convolutional Neural Network Based Text Steganalysis Complete screens
Convolutional Neural Network Based Text Steganalysis Complete screensConvolutional Neural Network Based Text Steganalysis Complete screens
Convolutional Neural Network Based Text Steganalysis Complete screens
 
Use of artificial neural networks to identify fake profiles
Use of artificial neural networks to identify fake profilesUse of artificial neural networks to identify fake profiles
Use of artificial neural networks to identify fake profiles
 
Network intrusion detection using supervised machine learning technique with ...
Network intrusion detection using supervised machine learning technique with ...Network intrusion detection using supervised machine learning technique with ...
Network intrusion detection using supervised machine learning technique with ...
 
Forecasting crude oil prices a deep learning based model
Forecasting crude oil prices a deep learning based modelForecasting crude oil prices a deep learning based model
Forecasting crude oil prices a deep learning based model
 
Credit card fraud detection using random forest & cart algorithm
Credit card fraud detection using random forest & cart algorithmCredit card fraud detection using random forest & cart algorithm
Credit card fraud detection using random forest & cart algorithm
 
Ground water prediction screenshots
Ground water prediction screenshotsGround water prediction screenshots
Ground water prediction screenshots
 
Cognitive agent system to retrieve relevant code components from a repository
Cognitive agent system to retrieve relevant code components from a repositoryCognitive agent system to retrieve relevant code components from a repository
Cognitive agent system to retrieve relevant code components from a repository
 
10.sentiment analysis of customer product reviews using machine learni
10.sentiment analysis of customer product reviews using machine learni10.sentiment analysis of customer product reviews using machine learni
10.sentiment analysis of customer product reviews using machine learni
 
Comparison of machine learning methods for breast cancer diagnosis
Comparison of machine learning methods for breast cancer diagnosisComparison of machine learning methods for breast cancer diagnosis
Comparison of machine learning methods for breast cancer diagnosis
 
A knowledge based recommendation system that includes sentiment analysis and ...
A knowledge based recommendation system that includes sentiment analysis and ...A knowledge based recommendation system that includes sentiment analysis and ...
A knowledge based recommendation system that includes sentiment analysis and ...
 
Qrsvm (fast and communication efficient algorithm for distributed support vec...
Qrsvm (fast and communication efficient algorithm for distributed support vec...Qrsvm (fast and communication efficient algorithm for distributed support vec...
Qrsvm (fast and communication efficient algorithm for distributed support vec...
 
Qrsvm (fast and communication efficient algorithm for distributed support vec...
Qrsvm (fast and communication efficient algorithm for distributed support vec...Qrsvm (fast and communication efficient algorithm for distributed support vec...
Qrsvm (fast and communication efficient algorithm for distributed support vec...
 

Mehr von Venkat Projects

Mehr von Venkat Projects (20)

1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
 
12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...
12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...
12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...
 
10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx
10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx
10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx
 
9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx
9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx
9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx
 
8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...
8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...
8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...
 
Image Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docx
Image Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docxImage Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docx
Image Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docx
 
6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...
6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...
6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...
 
WATERMARKING IMAGES
WATERMARKING IMAGESWATERMARKING IMAGES
WATERMARKING IMAGES
 
4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...
4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...
4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...
 
Application and evaluation of a K-Medoidsbased shape clustering method for an...
Application and evaluation of a K-Medoidsbased shape clustering method for an...Application and evaluation of a K-Medoidsbased shape clustering method for an...
Application and evaluation of a K-Medoidsbased shape clustering method for an...
 
OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...
OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...
OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...
 
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
 
2022 PYTHON MAJOR PROJECTS LIST.docx
2022 PYTHON MAJOR  PROJECTS LIST.docx2022 PYTHON MAJOR  PROJECTS LIST.docx
2022 PYTHON MAJOR PROJECTS LIST.docx
 
2022 PYTHON PROJECTS LIST.docx
2022 PYTHON PROJECTS LIST.docx2022 PYTHON PROJECTS LIST.docx
2022 PYTHON PROJECTS LIST.docx
 
2021 PYTHON PROJECTS LIST.docx
2021 PYTHON PROJECTS LIST.docx2021 PYTHON PROJECTS LIST.docx
2021 PYTHON PROJECTS LIST.docx
 
2021 python projects list
2021 python projects list2021 python projects list
2021 python projects list
 
9.data analysis for understanding the impact of covid–19 vaccinations on the ...
9.data analysis for understanding the impact of covid–19 vaccinations on the ...9.data analysis for understanding the impact of covid–19 vaccinations on the ...
9.data analysis for understanding the impact of covid–19 vaccinations on the ...
 
6.iris recognition using machine learning technique
6.iris recognition using machine learning technique6.iris recognition using machine learning technique
6.iris recognition using machine learning technique
 
5.local community detection algorithm based on minimal cluster
5.local community detection algorithm based on minimal cluster5.local community detection algorithm based on minimal cluster
5.local community detection algorithm based on minimal cluster
 
an efficient spam detection technique for io t devices using machine learning
an efficient spam detection technique for io t devices using machine learningan efficient spam detection technique for io t devices using machine learning
an efficient spam detection technique for io t devices using machine learning
 

Kürzlich hochgeladen

Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
rknatarajan
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 

Kürzlich hochgeladen (20)

Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 

4.detection of fake news through implementation of data science application

  • 1. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com DETECTION OF FAKE NEWS THROUGH IMPLEMENTATION OF DATA SCIENCE APPLICATION In this project we are using LSTM(Long Short Term Memory) Recurrent Neural Network to predict fake news as huge amount of fake news is gathering in all types of media such as social media or news media and to detect fake news author is training LSTMneural network with past news data label as ‘Genuine’ and ‘Fake’. We downloaded available twitter FAKE NEWS tweets from internet and below is the dataset screen shots In above dataset we can see last two columns contains news text and target value where text contains news data and target contain class label as 0 and 1 where 0 means that news is GENUINE and 1 means thatnewsisFAKE. In belowscreen we are showing code that using NGRAMto convert news data to TF-IDF vector
  • 2. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com In above screeninselectedline we are creating TFIDF object with NGRAMand then in next line we are applyingTFIDFobjectontextdata(newsdataset) toconvert news data to numeric vector which contains count of each word. In below screen showing LSTMneural network creation SCREEN SHOTS To run project double click on‘run.bat’ file to get below screen
  • 3. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com In above screen click on ‘Upload Fake News Dataset’ button to upload dataset In above screen selecting and uploading ‘news.csv’ file and then click on ‘Open’ button to load dataset and to get below screen
  • 4. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com In above screendatasetloadedandthenintextareawe can see all news text with the class label as 0 or 1 and now click on ‘Preprocess Dataset & Apply NGram’ button to convert above string data to numeric vector and to get below screen In above screen all news words put in column header and if that word appear in any row then that rowscolumnwill be change withwordcountand if not appearthen0 will be putincolumn. Inabove screenshowingsome recordsfrom total 7612 news records and in bottom lines we can see dataset contains total 7613 records and then application using 80% (6090 news records) for training and then using 20% (1523 news records) for testing and now dataset is ready with numeric record and
  • 5. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com now click on ‘Run LSTM Algorithm’ button to train above dataset with LSTM and then build LSTM model and then calculate accuracy and error rate In above screen LSTMmodel is generated and we got its prediction accuracy as 69.49% and we can see below console to see LSTMlayer details In above screen different LSTM layers are created to filter input data to get efficient features for prediction. Now click on ‘Accuracy & Loss Graph’ button to get LSTMgraph
  • 6. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com In above graphx-axisrepresentsepoch/iterationsandy-axisrepresents accuracy and loss value and greenline representsaccuracyandblue line representslossvalue and at each increasing epoch loss values get decrease and accuracy reached to 70%. Now click on ‘Test News Detection’ button to uploadsome testnewssentencesandthenapplicationpredictwhetherthatnewsisgenuineorfake. In belowtestnewsdatasetwe cansee onlyTEXT data noclass label and LSTMwill predict class label for that test news In above screen in test news we have only one column which contains only news ‘TEXT’ and after applying above test news we will get prediction result
  • 7. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com In above screen selecting and uploading ‘testNews.txt’ file and then click on ‘Open’ button to load data and to get below prediction result In above screen before dashed symbols we have news text and after dashed symbol application predict news as ‘FAKE or GENUINE’. After building model when we gave any news text then LSTM will check whether more words belongs to genuine or fake category and whatever category get more matching percentage then application will predict that class label.