SlideShare a Scribd company logo
1 of 28
© INFOMOTION GmbH 18. September 2018
Simon Pickert
Semi-Automatic Text Classification with Deep Neural Networks
with the aid of huge cluster computation power
An example on Deutsche Bahn Sentiments and SpiegelOnline Topic
Classification
Frankfurt, 11.09.2019
2© INFOMOTION GmbH 18. September 2018
„Forget about the meaning of words, forget about grammar, forget about syntax, forget even the
very concept of a word. Now let the machine learn everything by itself.”
François Petitjean, Senior researcher in machine learning and data mining at Monash University
3© INFOMOTION GmbH 18. September 2018
Agenda
1. Introduction Text Classification
2. Introduction Machine Learning / Deep Learning
3. Example Use Case Spiegel Online Topic und DB Sentiment Classification
4. Conclusion
4© INFOMOTION GmbH 18. September 2018
Types of applications for Text Classification
Extract patternsRatings Intention
Sentiments /
Emotions
› Sentiment Analysis:
e.g. for products /
services in social
media
› Customer Relationship
Analytics: Decision
making based on E-
Mail texts
› HR Analytics: CV Texts
› Review analysis for
products
› Detect intentions e.g.
for chat bot
conversations
› IT service-ticket
assignment
› Fraud Detection
› Extract semantics from
data (e.g. extract
invoice data)
› Interpret text
paragraphs (e.g.
contractdetails)
› Text summarization
5© INFOMOTION GmbH 18. September 2018
Rapid development in science and software-technological progress
(Deep Learning, improves algorithms and parallelisation support)
→ effort for implementation will decline further
Costs for data storage and computation power are dropping continually
Drivers for Revival of Machine Learning and Text Classification
Increasing amount and variety of data as part of the digitalization
6© INFOMOTION GmbH 18. September 2018
Requirements for the application of Machine Learning / Deep Learning
PROBLEM-
COMPLEXITY
IMPORTANCE / SCALE
SUFFICIENT DATA
PROBLEM RELEVANT
REGULARITIES /
PATTERNS IN DATA
Problem Characteristics
Machine
Learning
/ Deep
Learning
7© INFOMOTION GmbH 18. September 2018
Supervised Learning algorithms that can be used for Text Classification
Naive Bayes
Random
Forests
Support Vector
Machines
Ensemble
Methods
(Deep) Neural
Networks
Class ŷ
Features Labels𝑥1 … 𝑥i y
LEARNING
ALGORITHMS
8© INFOMOTION GmbH 18. September 2018
What is Deep Learning?
› Learning based on biological principles
Applications
› Bigest success of Deep Learning applications
especially for image, speech and text data
› Based on Artifical Neural Networks which are used for
time series forecasting, regression and classification
› Used as part of artificial intelligence: e.g. Google
Alpha GO, Chess AI
9© INFOMOTION GmbH 18. September 2018
Neural Networks – Multilayer Perceptron (MLP)
Input Layer Hidden Layers Output Layer
… …
…
10© INFOMOTION GmbH 18. September 2018
Hello World of Neural Networks: Handwritten Digit Recognition
› Goal: Recognize the „intended“ written
number
› 10.000 examples of handwritten digits images
and the real numbers
› Images 28 x 28 pixels with gray scales in an
interval of [0;1]
11© INFOMOTION GmbH 18. September 2018
Hello World of Neural Networks: Handwritten Digit Recognition
12© INFOMOTION GmbH 18. September 2018
How to do the magic of training?
J – Errorfunction
θ – Weights
› All Weights get initialized
randomly
› Every row in the digits data get
calculated forward and
compared with the actual
value (error function)
› Weight gets now adjusted to
minimize the error
Optimization per Gradient Descent
13© INFOMOTION GmbH 18. September 2018
Different Types of Deep Learning Networks
› Neuronale Networks are considered as „deep“ if they have an optimization path length > 3
haben
› Common types of Neural Networks for text classification:
› Multi Layer Perceptron (MLP) ab 2 Hidden Layern
› Recurrent Neural Networks (RNN) mit Sequenztiefe > 1
› Gated Recurrent Unit Network (GRUs)
› Long Short Term Memory (BI-LSTM)
› Convolutional Network (CNN)
…
14© INFOMOTION GmbH 18. September 2018
Research Timeline Neural Networks / Deep Learning
15© INFOMOTION GmbH 18. September 2018
Timeline for IMDB Movie Rating Benchmark
16© INFOMOTION GmbH 18. September 2018
Deep Neural Networks – Recurrent Neural Network (RNN)
› Recurrent Neural Network are an extension of the Multilayer Perceptron (MLP), with the
speciality that the hidden nodes have recurrent weights on their previous activation
› d is a parameter which indicates how deep the recurrent should look back (e.g. the amount of words per text)
17© INFOMOTION GmbH 18. September 2018
Exmaple Case Deutsche Bahn: Germeval Task 2017
› 22000 text messages from social media with statements about
occurrences with Deutsche Bahn
› Employee have labeled all the text messages with topics and
sentiments
› The goal of the competition is to classify the sentiments and category
of new text messages on the social web or e-mails automatically
18© INFOMOTION GmbH 18. September 2018
Example Deutsche Bahn: Germeval Task 2017
› Example for tweet:
Text:
Wenn die Bahn so voll ist, dass man lieber noch 10 Minuten in der Kälte wartet, weil man keinen
Bock hat in einer Sardinenbüchse zu stehen.
When the train is so crowded, that you prefer to wait another 10 minutes in the cold, instead of
staying in a sardine can.
Label Topic: Load Factor / Overcrowding
Label Sentiment: negativ
19© INFOMOTION GmbH 18. September 2018
How to proceed with texts for analysis?
› Find a numerical representation of the texts
› Every Word and syntactic elements get a unique identification number (tokenization)
› Every sentence is then represented by tokenized word vector
› Calculate special word representations such that semantic related words are near to each
other in numerical vector space (word embeddings)
› Can be trained by word2vec algorithms or can be used from pretrained models (e.g. Wikipedia
copora of Facebook)
20© INFOMOTION GmbH 18. September 2018
Training of Word Embeddings with Word2Vec – 2-Layer Neural Network
0
0
0
0
0
0
1
0
0
0
0
…
Word2vec (2-Layer
MLP)
1-hot-vector with
length D
Bahn
0.39
0.11
0.12
0.33
0.01
0.91
0.11
…
(Skip grams,
Continuous Bag Of
Words)
Word embedding
represantion of
length L
21© INFOMOTION GmbH 18. September 2018
Deep Neural Networks for word based Text Classifikation
Deep Neural Network
(RNN, LSTM,
CNN,Fasttext…)
0
0
1
Output Units
(Labels)
Sentiments
Positive
Neutral
Negative
0.39
0.11
0.12
0.33
0.01
0.91
0.11
…
0.19
0.24
0.52
0.23
0.11
0.24
0.83
…
Word 1 Word 2
…
…
Document Text
N Hidden Layer
W maximum sentence length
N*W*L = Weights Count
© INFOMOTION GmbH 18. September 2018
Textclassifikation with Deep Learning am Beispiel
spiegel.de
23© INFOMOTION GmbH 18. September 2018
Use Case Spiegel Online
Data:
All articles from 1968 from Spiegel Online (news)
Classes:
8 possible categories in summary: Sport, Politik, Kultur, Netzwelt, Wissenschaft, etc.
Text length:
Up to 500 words
Amount of arcticles:
400 000
24© INFOMOTION GmbH 18. September 2018
Datasets der Use Cases
Case
Spiegel Online
Case
Deutsche Bahn Sentiments
Amount of rows 500000 22000
Content / Source News articles of Spiegel
Online
Media texts of Deutsche
Bahn passengers
Text Classification Type Topic / Semantics Sentiments / Emotions
Output Classes In summary 8 classes: Sport,
Politik, Kultur, Netzwelt,
Wissenschaft, etc.
3 possible sentiment classes:
Positiv, neutral, negativ
Textlänge 10 - 100 words 100 – 500 words
25© INFOMOTION GmbH 18. September 2018
INFOMOTION Toolbox for Text Classification
Worker Worker Worker Worker…
Dsitributed computation of different model approaches
and hyperparameters (Monitoring, Error Handling)
Spark Distribution | AWS Distribution
Texts +
Labels
Text
preprocessing
(Word
Vectorization,
Bag of Words)
Evaluation of different model approaches
Experiments +
Optimization of
Hyperparamets
+ Model
Selection
Final
optimized
modelClassic Text Mining methods:
Bag of Words + Naive Bayes, SVM
Deep Learning:
CNN, RNN, (Bi-)LSTM, FastText
Worker Worker
GPU / TPU
26© INFOMOTION GmbH 18. September 2018
Accuracy per for each use case and model approach
Attribute Accuracy
Spiegel Online
F1 Score
Accuracy
Deutsche Bahn Sentiments
F1 Score
FastText Framework (Ngrams) 74,4 % 82,6 %
BI-LSTM + word2Vec 81,1 % 86,4 %
Convolutional Network +
word2Vec
71,3 % 81,2 %
TF-IDF + Naive Bayes 61,8 % 65,6 %
TF-IDF + SVM 64,3 % 68,1 %
27© INFOMOTION GmbH 18. September 2018
Conclusion
› Deep Learning methods showed best performance compared to classic approaches for both
use cases (short and long texts)
› FastText not far behind, classic methods significant lower
› It is recommended to try different state of the artmodel approaches
› Tools for automizing model selection for text classification is possible because a lot of state of the
art can be stanardized and parallized
› Training und hyperparameter optimization is very computational expensiv, so distribution helps to
run large experiment trial for optimization in a limited time span
28© INFOMOTION GmbH 18. September 2018
Alle Angaben basieren auf dem derzeitigen Kenntnisstand. Änderungen vorbehalten. Dieses Dokument der INFOMOTION GmbH ist ausschließlich für den Adressaten bzw. Auftraggeber bestimmt. Es bleibt bis zu
einer ausdrücklichen Übertragung von Nutzungsrechten Eigentum der INFOMOTION GmbH. Jede Bearbeitung, Verwertung, Vervielfältigung und/oder gewerbsmäßige Verbreitung des Werkes ist nur mit
Einverständnis der INFOMOTION GmbH zulässig.
INFOMOTION GmbH
Niederlassung Frankfurt
SIMON PICKERT
INFOMOTION GMBH
Ludwigstraße 33-37
60327 Frankfurt
Wirtschaftsinformatik (M. Sc.)
Data Scientist
www.infomotion.de
T +49 69 97460-700
F +49 69 97460-799
M +49 176 94247079
simon.pickert@infomotion.de

More Related Content

What's hot

A Steganography LSB technique for hiding Image within Image Using blowfish En...
A Steganography LSB technique for hiding Image within Image Using blowfish En...A Steganography LSB technique for hiding Image within Image Using blowfish En...
A Steganography LSB technique for hiding Image within Image Using blowfish En...IJRES Journal
 
Semantic information theory in 20 minutes
Semantic information theory in 20 minutesSemantic information theory in 20 minutes
Semantic information theory in 20 minutesJie Bao
 
Towards a theory of semantic communication
Towards a theory of semantic communicationTowards a theory of semantic communication
Towards a theory of semantic communicationJie Bao
 
Scientific Programming in Python
Scientific Programming in PythonScientific Programming in Python
Scientific Programming in Pythonzukun
 
steganography and watermarking
steganography and watermarkingsteganography and watermarking
steganography and watermarkingSaurabh Kaushik
 
Python and its applications
Python and its applicationsPython and its applications
Python and its applicationsmohakmishra97
 
Steganography: Hiding your secrets with PHP
Steganography: Hiding your secrets with PHPSteganography: Hiding your secrets with PHP
Steganography: Hiding your secrets with PHPRaul Fraile
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)ijceronline
 
A Secure Software Implementation of Nonlinear Advanced Encryption Standard
A Secure Software Implementation of Nonlinear Advanced Encryption StandardA Secure Software Implementation of Nonlinear Advanced Encryption Standard
A Secure Software Implementation of Nonlinear Advanced Encryption StandardIOSR Journals
 
IRJET- Python Libraries and Packages for Deep Learning-A Survey
IRJET-  	  Python Libraries and Packages for Deep Learning-A SurveyIRJET-  	  Python Libraries and Packages for Deep Learning-A Survey
IRJET- Python Libraries and Packages for Deep Learning-A SurveyIRJET Journal
 
Steganography Project
Steganography Project Steganography Project
Steganography Project Uttam Jain
 
Steganography
Steganography Steganography
Steganography Uttam Jain
 

What's hot (20)

Steganography
SteganographySteganography
Steganography
 
A Steganography LSB technique for hiding Image within Image Using blowfish En...
A Steganography LSB technique for hiding Image within Image Using blowfish En...A Steganography LSB technique for hiding Image within Image Using blowfish En...
A Steganography LSB technique for hiding Image within Image Using blowfish En...
 
Dy35710714
Dy35710714Dy35710714
Dy35710714
 
Semantic information theory in 20 minutes
Semantic information theory in 20 minutesSemantic information theory in 20 minutes
Semantic information theory in 20 minutes
 
Steganography
SteganographySteganography
Steganography
 
Towards a theory of semantic communication
Towards a theory of semantic communicationTowards a theory of semantic communication
Towards a theory of semantic communication
 
Scientific Programming in Python
Scientific Programming in PythonScientific Programming in Python
Scientific Programming in Python
 
steganography and watermarking
steganography and watermarkingsteganography and watermarking
steganography and watermarking
 
Steganography in images
Steganography in imagesSteganography in images
Steganography in images
 
Report
ReportReport
Report
 
Python and its applications
Python and its applicationsPython and its applications
Python and its applications
 
Steganography
SteganographySteganography
Steganography
 
Steganography: Hiding your secrets with PHP
Steganography: Hiding your secrets with PHPSteganography: Hiding your secrets with PHP
Steganography: Hiding your secrets with PHP
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
 
Steganography
SteganographySteganography
Steganography
 
A Secure Software Implementation of Nonlinear Advanced Encryption Standard
A Secure Software Implementation of Nonlinear Advanced Encryption StandardA Secure Software Implementation of Nonlinear Advanced Encryption Standard
A Secure Software Implementation of Nonlinear Advanced Encryption Standard
 
IRJET- Python Libraries and Packages for Deep Learning-A Survey
IRJET-  	  Python Libraries and Packages for Deep Learning-A SurveyIRJET-  	  Python Libraries and Packages for Deep Learning-A Survey
IRJET- Python Libraries and Packages for Deep Learning-A Survey
 
E031022026
E031022026E031022026
E031022026
 
Steganography Project
Steganography Project Steganography Project
Steganography Project
 
Steganography
Steganography Steganography
Steganography
 

Similar to Semi-Automatic Text Classification with Deep Neural Networks

Deep Learning for Recommender Systems
Deep Learning for Recommender SystemsDeep Learning for Recommender Systems
Deep Learning for Recommender SystemsNick Pentreath
 
Platform for the Research and Analysis of Cybernetic Threats
Platform for the Research and Analysis of Cybernetic ThreatsPlatform for the Research and Analysis of Cybernetic Threats
Platform for the Research and Analysis of Cybernetic ThreatsDataWorks Summit
 
Hoe een efficiënte Machine of Deep Learning backend ontwikkelen?
Hoe een efficiënte Machine of Deep Learning backend ontwikkelen?Hoe een efficiënte Machine of Deep Learning backend ontwikkelen?
Hoe een efficiënte Machine of Deep Learning backend ontwikkelen?Agentschap Innoveren & Ondernemen
 
State of the Domain-Adaptive Machine Translation by Intento (November 2018)
State of the Domain-Adaptive Machine Translation by Intento (November 2018)State of the Domain-Adaptive Machine Translation by Intento (November 2018)
State of the Domain-Adaptive Machine Translation by Intento (November 2018)Konstantin Savenkov
 
Project Trillium: Arm Machine Learning Platform
Project Trillium: Arm Machine Learning PlatformProject Trillium: Arm Machine Learning Platform
Project Trillium: Arm Machine Learning PlatformArm
 
Inteligencia artificial - Quebrando el paradigma de la amnesia empresarial
Inteligencia artificial - Quebrando el paradigma de la amnesia empresarialInteligencia artificial - Quebrando el paradigma de la amnesia empresarial
Inteligencia artificial - Quebrando el paradigma de la amnesia empresarialMarcos Quezada
 
雲端推動的人工智能革命
雲端推動的人工智能革命雲端推動的人工智能革命
雲端推動的人工智能革命Amazon Web Services
 
RNNs for Recommendations and Personalization
RNNs for Recommendations and PersonalizationRNNs for Recommendations and Personalization
RNNs for Recommendations and PersonalizationNick Pentreath
 
Google Analytics Konferenz 2018_Machine Learning / AI mit Google_Lukman Ramse...
Google Analytics Konferenz 2018_Machine Learning / AI mit Google_Lukman Ramse...Google Analytics Konferenz 2018_Machine Learning / AI mit Google_Lukman Ramse...
Google Analytics Konferenz 2018_Machine Learning / AI mit Google_Lukman Ramse...e-dialog GmbH
 
Lecture 05: Recurrent Neural Networks / Deep Learning by Pankaj Gupta
Lecture 05: Recurrent Neural Networks / Deep Learning by Pankaj GuptaLecture 05: Recurrent Neural Networks / Deep Learning by Pankaj Gupta
Lecture 05: Recurrent Neural Networks / Deep Learning by Pankaj GuptaPankaj Gupta, PhD
 
Open Source AI - News and examples
Open Source AI - News and examplesOpen Source AI - News and examples
Open Source AI - News and examplesLuciano Resende
 
Rosinski ibm ai overview with several examples of projects in the media and l...
Rosinski ibm ai overview with several examples of projects in the media and l...Rosinski ibm ai overview with several examples of projects in the media and l...
Rosinski ibm ai overview with several examples of projects in the media and l...FIAT/IFTA
 
applications and advantages of python
applications and advantages of pythonapplications and advantages of python
applications and advantages of pythonbhavesh lande
 
H2O Machine Learning with KNIME Analytics Platform - Christian Dietz - H2O AI...
H2O Machine Learning with KNIME Analytics Platform - Christian Dietz - H2O AI...H2O Machine Learning with KNIME Analytics Platform - Christian Dietz - H2O AI...
H2O Machine Learning with KNIME Analytics Platform - Christian Dietz - H2O AI...Sri Ambati
 
Deep Learning for Recommender Systems with Nick pentreath
Deep Learning for Recommender Systems with Nick pentreathDeep Learning for Recommender Systems with Nick pentreath
Deep Learning for Recommender Systems with Nick pentreathDatabricks
 
Prior AI consulting use cases
Prior AI consulting use casesPrior AI consulting use cases
Prior AI consulting use casesHarendra Singh
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
Inteligencia artificial, open source e IBM Call for Code
Inteligencia artificial, open source e IBM Call for CodeInteligencia artificial, open source e IBM Call for Code
Inteligencia artificial, open source e IBM Call for CodeLuciano Resende
 
Session 1 - The Current Landscape of Big Data Benchmarks
Session 1 - The Current Landscape of Big Data BenchmarksSession 1 - The Current Landscape of Big Data Benchmarks
Session 1 - The Current Landscape of Big Data BenchmarksDataBench
 
Smarter Event-Driven Edge with Amazon SageMaker & Project Flogo (AIM204-S) - ...
Smarter Event-Driven Edge with Amazon SageMaker & Project Flogo (AIM204-S) - ...Smarter Event-Driven Edge with Amazon SageMaker & Project Flogo (AIM204-S) - ...
Smarter Event-Driven Edge with Amazon SageMaker & Project Flogo (AIM204-S) - ...Amazon Web Services
 

Similar to Semi-Automatic Text Classification with Deep Neural Networks (20)

Deep Learning for Recommender Systems
Deep Learning for Recommender SystemsDeep Learning for Recommender Systems
Deep Learning for Recommender Systems
 
Platform for the Research and Analysis of Cybernetic Threats
Platform for the Research and Analysis of Cybernetic ThreatsPlatform for the Research and Analysis of Cybernetic Threats
Platform for the Research and Analysis of Cybernetic Threats
 
Hoe een efficiënte Machine of Deep Learning backend ontwikkelen?
Hoe een efficiënte Machine of Deep Learning backend ontwikkelen?Hoe een efficiënte Machine of Deep Learning backend ontwikkelen?
Hoe een efficiënte Machine of Deep Learning backend ontwikkelen?
 
State of the Domain-Adaptive Machine Translation by Intento (November 2018)
State of the Domain-Adaptive Machine Translation by Intento (November 2018)State of the Domain-Adaptive Machine Translation by Intento (November 2018)
State of the Domain-Adaptive Machine Translation by Intento (November 2018)
 
Project Trillium: Arm Machine Learning Platform
Project Trillium: Arm Machine Learning PlatformProject Trillium: Arm Machine Learning Platform
Project Trillium: Arm Machine Learning Platform
 
Inteligencia artificial - Quebrando el paradigma de la amnesia empresarial
Inteligencia artificial - Quebrando el paradigma de la amnesia empresarialInteligencia artificial - Quebrando el paradigma de la amnesia empresarial
Inteligencia artificial - Quebrando el paradigma de la amnesia empresarial
 
雲端推動的人工智能革命
雲端推動的人工智能革命雲端推動的人工智能革命
雲端推動的人工智能革命
 
RNNs for Recommendations and Personalization
RNNs for Recommendations and PersonalizationRNNs for Recommendations and Personalization
RNNs for Recommendations and Personalization
 
Google Analytics Konferenz 2018_Machine Learning / AI mit Google_Lukman Ramse...
Google Analytics Konferenz 2018_Machine Learning / AI mit Google_Lukman Ramse...Google Analytics Konferenz 2018_Machine Learning / AI mit Google_Lukman Ramse...
Google Analytics Konferenz 2018_Machine Learning / AI mit Google_Lukman Ramse...
 
Lecture 05: Recurrent Neural Networks / Deep Learning by Pankaj Gupta
Lecture 05: Recurrent Neural Networks / Deep Learning by Pankaj GuptaLecture 05: Recurrent Neural Networks / Deep Learning by Pankaj Gupta
Lecture 05: Recurrent Neural Networks / Deep Learning by Pankaj Gupta
 
Open Source AI - News and examples
Open Source AI - News and examplesOpen Source AI - News and examples
Open Source AI - News and examples
 
Rosinski ibm ai overview with several examples of projects in the media and l...
Rosinski ibm ai overview with several examples of projects in the media and l...Rosinski ibm ai overview with several examples of projects in the media and l...
Rosinski ibm ai overview with several examples of projects in the media and l...
 
applications and advantages of python
applications and advantages of pythonapplications and advantages of python
applications and advantages of python
 
H2O Machine Learning with KNIME Analytics Platform - Christian Dietz - H2O AI...
H2O Machine Learning with KNIME Analytics Platform - Christian Dietz - H2O AI...H2O Machine Learning with KNIME Analytics Platform - Christian Dietz - H2O AI...
H2O Machine Learning with KNIME Analytics Platform - Christian Dietz - H2O AI...
 
Deep Learning for Recommender Systems with Nick pentreath
Deep Learning for Recommender Systems with Nick pentreathDeep Learning for Recommender Systems with Nick pentreath
Deep Learning for Recommender Systems with Nick pentreath
 
Prior AI consulting use cases
Prior AI consulting use casesPrior AI consulting use cases
Prior AI consulting use cases
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
Inteligencia artificial, open source e IBM Call for Code
Inteligencia artificial, open source e IBM Call for CodeInteligencia artificial, open source e IBM Call for Code
Inteligencia artificial, open source e IBM Call for Code
 
Session 1 - The Current Landscape of Big Data Benchmarks
Session 1 - The Current Landscape of Big Data BenchmarksSession 1 - The Current Landscape of Big Data Benchmarks
Session 1 - The Current Landscape of Big Data Benchmarks
 
Smarter Event-Driven Edge with Amazon SageMaker & Project Flogo (AIM204-S) - ...
Smarter Event-Driven Edge with Amazon SageMaker & Project Flogo (AIM204-S) - ...Smarter Event-Driven Edge with Amazon SageMaker & Project Flogo (AIM204-S) - ...
Smarter Event-Driven Edge with Amazon SageMaker & Project Flogo (AIM204-S) - ...
 

Recently uploaded

Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
Data Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationData Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationBoston Institute of Analytics
 
Spark3's new memory model/management
Spark3's new memory model/managementSpark3's new memory model/management
Spark3's new memory model/managementakshesh doshi
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts ServiceSapana Sha
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...shivangimorya083
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
Data Warehouse , Data Cube Computation
Data Warehouse   , Data Cube ComputationData Warehouse   , Data Cube Computation
Data Warehouse , Data Cube Computationsit20ad004
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiSuhani Kapoor
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 

Recently uploaded (20)

Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
Data Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationData Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health Classification
 
Spark3's new memory model/management
Spark3's new memory model/managementSpark3's new memory model/management
Spark3's new memory model/management
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts Service
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
Data Warehouse , Data Cube Computation
Data Warehouse   , Data Cube ComputationData Warehouse   , Data Cube Computation
Data Warehouse , Data Cube Computation
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 

Semi-Automatic Text Classification with Deep Neural Networks

  • 1. © INFOMOTION GmbH 18. September 2018 Simon Pickert Semi-Automatic Text Classification with Deep Neural Networks with the aid of huge cluster computation power An example on Deutsche Bahn Sentiments and SpiegelOnline Topic Classification Frankfurt, 11.09.2019
  • 2. 2© INFOMOTION GmbH 18. September 2018 „Forget about the meaning of words, forget about grammar, forget about syntax, forget even the very concept of a word. Now let the machine learn everything by itself.” François Petitjean, Senior researcher in machine learning and data mining at Monash University
  • 3. 3© INFOMOTION GmbH 18. September 2018 Agenda 1. Introduction Text Classification 2. Introduction Machine Learning / Deep Learning 3. Example Use Case Spiegel Online Topic und DB Sentiment Classification 4. Conclusion
  • 4. 4© INFOMOTION GmbH 18. September 2018 Types of applications for Text Classification Extract patternsRatings Intention Sentiments / Emotions › Sentiment Analysis: e.g. for products / services in social media › Customer Relationship Analytics: Decision making based on E- Mail texts › HR Analytics: CV Texts › Review analysis for products › Detect intentions e.g. for chat bot conversations › IT service-ticket assignment › Fraud Detection › Extract semantics from data (e.g. extract invoice data) › Interpret text paragraphs (e.g. contractdetails) › Text summarization
  • 5. 5© INFOMOTION GmbH 18. September 2018 Rapid development in science and software-technological progress (Deep Learning, improves algorithms and parallelisation support) → effort for implementation will decline further Costs for data storage and computation power are dropping continually Drivers for Revival of Machine Learning and Text Classification Increasing amount and variety of data as part of the digitalization
  • 6. 6© INFOMOTION GmbH 18. September 2018 Requirements for the application of Machine Learning / Deep Learning PROBLEM- COMPLEXITY IMPORTANCE / SCALE SUFFICIENT DATA PROBLEM RELEVANT REGULARITIES / PATTERNS IN DATA Problem Characteristics Machine Learning / Deep Learning
  • 7. 7© INFOMOTION GmbH 18. September 2018 Supervised Learning algorithms that can be used for Text Classification Naive Bayes Random Forests Support Vector Machines Ensemble Methods (Deep) Neural Networks Class ŷ Features Labels𝑥1 … 𝑥i y LEARNING ALGORITHMS
  • 8. 8© INFOMOTION GmbH 18. September 2018 What is Deep Learning? › Learning based on biological principles Applications › Bigest success of Deep Learning applications especially for image, speech and text data › Based on Artifical Neural Networks which are used for time series forecasting, regression and classification › Used as part of artificial intelligence: e.g. Google Alpha GO, Chess AI
  • 9. 9© INFOMOTION GmbH 18. September 2018 Neural Networks – Multilayer Perceptron (MLP) Input Layer Hidden Layers Output Layer … … …
  • 10. 10© INFOMOTION GmbH 18. September 2018 Hello World of Neural Networks: Handwritten Digit Recognition › Goal: Recognize the „intended“ written number › 10.000 examples of handwritten digits images and the real numbers › Images 28 x 28 pixels with gray scales in an interval of [0;1]
  • 11. 11© INFOMOTION GmbH 18. September 2018 Hello World of Neural Networks: Handwritten Digit Recognition
  • 12. 12© INFOMOTION GmbH 18. September 2018 How to do the magic of training? J – Errorfunction θ – Weights › All Weights get initialized randomly › Every row in the digits data get calculated forward and compared with the actual value (error function) › Weight gets now adjusted to minimize the error Optimization per Gradient Descent
  • 13. 13© INFOMOTION GmbH 18. September 2018 Different Types of Deep Learning Networks › Neuronale Networks are considered as „deep“ if they have an optimization path length > 3 haben › Common types of Neural Networks for text classification: › Multi Layer Perceptron (MLP) ab 2 Hidden Layern › Recurrent Neural Networks (RNN) mit Sequenztiefe > 1 › Gated Recurrent Unit Network (GRUs) › Long Short Term Memory (BI-LSTM) › Convolutional Network (CNN) …
  • 14. 14© INFOMOTION GmbH 18. September 2018 Research Timeline Neural Networks / Deep Learning
  • 15. 15© INFOMOTION GmbH 18. September 2018 Timeline for IMDB Movie Rating Benchmark
  • 16. 16© INFOMOTION GmbH 18. September 2018 Deep Neural Networks – Recurrent Neural Network (RNN) › Recurrent Neural Network are an extension of the Multilayer Perceptron (MLP), with the speciality that the hidden nodes have recurrent weights on their previous activation › d is a parameter which indicates how deep the recurrent should look back (e.g. the amount of words per text)
  • 17. 17© INFOMOTION GmbH 18. September 2018 Exmaple Case Deutsche Bahn: Germeval Task 2017 › 22000 text messages from social media with statements about occurrences with Deutsche Bahn › Employee have labeled all the text messages with topics and sentiments › The goal of the competition is to classify the sentiments and category of new text messages on the social web or e-mails automatically
  • 18. 18© INFOMOTION GmbH 18. September 2018 Example Deutsche Bahn: Germeval Task 2017 › Example for tweet: Text: Wenn die Bahn so voll ist, dass man lieber noch 10 Minuten in der Kälte wartet, weil man keinen Bock hat in einer Sardinenbüchse zu stehen. When the train is so crowded, that you prefer to wait another 10 minutes in the cold, instead of staying in a sardine can. Label Topic: Load Factor / Overcrowding Label Sentiment: negativ
  • 19. 19© INFOMOTION GmbH 18. September 2018 How to proceed with texts for analysis? › Find a numerical representation of the texts › Every Word and syntactic elements get a unique identification number (tokenization) › Every sentence is then represented by tokenized word vector › Calculate special word representations such that semantic related words are near to each other in numerical vector space (word embeddings) › Can be trained by word2vec algorithms or can be used from pretrained models (e.g. Wikipedia copora of Facebook)
  • 20. 20© INFOMOTION GmbH 18. September 2018 Training of Word Embeddings with Word2Vec – 2-Layer Neural Network 0 0 0 0 0 0 1 0 0 0 0 … Word2vec (2-Layer MLP) 1-hot-vector with length D Bahn 0.39 0.11 0.12 0.33 0.01 0.91 0.11 … (Skip grams, Continuous Bag Of Words) Word embedding represantion of length L
  • 21. 21© INFOMOTION GmbH 18. September 2018 Deep Neural Networks for word based Text Classifikation Deep Neural Network (RNN, LSTM, CNN,Fasttext…) 0 0 1 Output Units (Labels) Sentiments Positive Neutral Negative 0.39 0.11 0.12 0.33 0.01 0.91 0.11 … 0.19 0.24 0.52 0.23 0.11 0.24 0.83 … Word 1 Word 2 … … Document Text N Hidden Layer W maximum sentence length N*W*L = Weights Count
  • 22. © INFOMOTION GmbH 18. September 2018 Textclassifikation with Deep Learning am Beispiel spiegel.de
  • 23. 23© INFOMOTION GmbH 18. September 2018 Use Case Spiegel Online Data: All articles from 1968 from Spiegel Online (news) Classes: 8 possible categories in summary: Sport, Politik, Kultur, Netzwelt, Wissenschaft, etc. Text length: Up to 500 words Amount of arcticles: 400 000
  • 24. 24© INFOMOTION GmbH 18. September 2018 Datasets der Use Cases Case Spiegel Online Case Deutsche Bahn Sentiments Amount of rows 500000 22000 Content / Source News articles of Spiegel Online Media texts of Deutsche Bahn passengers Text Classification Type Topic / Semantics Sentiments / Emotions Output Classes In summary 8 classes: Sport, Politik, Kultur, Netzwelt, Wissenschaft, etc. 3 possible sentiment classes: Positiv, neutral, negativ Textlänge 10 - 100 words 100 – 500 words
  • 25. 25© INFOMOTION GmbH 18. September 2018 INFOMOTION Toolbox for Text Classification Worker Worker Worker Worker… Dsitributed computation of different model approaches and hyperparameters (Monitoring, Error Handling) Spark Distribution | AWS Distribution Texts + Labels Text preprocessing (Word Vectorization, Bag of Words) Evaluation of different model approaches Experiments + Optimization of Hyperparamets + Model Selection Final optimized modelClassic Text Mining methods: Bag of Words + Naive Bayes, SVM Deep Learning: CNN, RNN, (Bi-)LSTM, FastText Worker Worker GPU / TPU
  • 26. 26© INFOMOTION GmbH 18. September 2018 Accuracy per for each use case and model approach Attribute Accuracy Spiegel Online F1 Score Accuracy Deutsche Bahn Sentiments F1 Score FastText Framework (Ngrams) 74,4 % 82,6 % BI-LSTM + word2Vec 81,1 % 86,4 % Convolutional Network + word2Vec 71,3 % 81,2 % TF-IDF + Naive Bayes 61,8 % 65,6 % TF-IDF + SVM 64,3 % 68,1 %
  • 27. 27© INFOMOTION GmbH 18. September 2018 Conclusion › Deep Learning methods showed best performance compared to classic approaches for both use cases (short and long texts) › FastText not far behind, classic methods significant lower › It is recommended to try different state of the artmodel approaches › Tools for automizing model selection for text classification is possible because a lot of state of the art can be stanardized and parallized › Training und hyperparameter optimization is very computational expensiv, so distribution helps to run large experiment trial for optimization in a limited time span
  • 28. 28© INFOMOTION GmbH 18. September 2018 Alle Angaben basieren auf dem derzeitigen Kenntnisstand. Änderungen vorbehalten. Dieses Dokument der INFOMOTION GmbH ist ausschließlich für den Adressaten bzw. Auftraggeber bestimmt. Es bleibt bis zu einer ausdrücklichen Übertragung von Nutzungsrechten Eigentum der INFOMOTION GmbH. Jede Bearbeitung, Verwertung, Vervielfältigung und/oder gewerbsmäßige Verbreitung des Werkes ist nur mit Einverständnis der INFOMOTION GmbH zulässig. INFOMOTION GmbH Niederlassung Frankfurt SIMON PICKERT INFOMOTION GMBH Ludwigstraße 33-37 60327 Frankfurt Wirtschaftsinformatik (M. Sc.) Data Scientist www.infomotion.de T +49 69 97460-700 F +49 69 97460-799 M +49 176 94247079 simon.pickert@infomotion.de