SlideShare uma empresa Scribd logo
1 de 20
Accelerating NLP projects
with Driverless AI
Carmelo IARIA
data artisan,
The AI Academy
https://www.linkedin.com/in/carmeloiaria/
#H2OWORLD
The AI Academy is an integrated system of
education, research and consulting services
focusing on the application of Artificial Intelligence
to challenging real-life problems
We believe the speed at which technology is
evolving is proving current linear education
systems obsolete and we are re-discovering the
approach of the 15th century artists workshops
where continuous learning was integrated with
project development
2018 Brazilian Presidential Elections Project
THE CONTEXT
2018 Brazilian Presidential Elections Project
THE SCOPE
We studied, through the use of NLP and Visualization techniques, the
following use cases
1. The Ideological Position – medium post
• Where the political programs of the 13 presidential candidates stand in an ideological
spectrum
2. The Media War – [medium post]
• Visualize the political attacks by the candidates during the presidential campaign
• Comparing the attacks on traditional media with those on social media
USE CASE 1 – the ideological position
STRATEGY
Problem Statement:
Extract a single metric representing the ideological position of each political program
Data Source
• the 13 government programs
Analysis
Dimensions
• Economy and Employment
• Education and Health
• External Policy and
Environment
• Political System and
Corruption
• Social Policy and Human
Rights
• Safety
Visual Encoding
• Weight – how much
importance was given to each
policy in the political program
• Ideology Position – where
does the political program
stand in a left-right ideological
spectrum
Techniques
• Weight – Simple score
representing the number of
words on each specific policy
normalized to the size of the
program
• Ideology – [Slaping, Proksh -
A Poisson Scaling Model for
Estimating Time-Series Party
Positions from Text1]
[Wordfish R package 2]
• Visualizations – d3.js [3]
USE CASE 1 – the ideological position
ABOUT WORDFISH
The methodology proposed uses a Poisson scaling technique to estimate party positions in a single
left-right dimension based on word frequencies in political text. The main advantages of such method
are that
• It is language independent: as such it can be applied to any language with the same efficacy
• It is an unsupervised technique: unlike other methodologies analyzed in the paper, Wordfish
doesn't require hand-coding (i.e. providing training text that "defines" what's left and what's right in
a political text). This way it eliminate bias
It is important to highlight that the technique does not attempt to provide an absolute classification of
"left" or "right" but rather to measure the relative position of the different parties (government programs
in our case) as emerging from the political text.
You can read the paper here.
USE CASE 1 – the ideological position
SAMPLE RESULTS
Economy &
Employment
Human
Rights &
Social
Welfare
Security
USE CASE 1 – the ideological position
SAMPLE RESULTS
User can navigate a summarized
version of the political programs by
Policy and by Candidate making it
easy to compare
See the full Interactive Visualization
USE CASE 2 – the media war
STRATEGY
Problem Statement:
How do presidential candidates make use of traditional and social media to attack opponents
Data Source
• Presidential candidates
television debates run on the
main broadcast channels prior
to the elections’ first turn
• Tweeter accounts of the two
presidential candidates
running in the second turn
Analysis
Dimensions
• Political Attack
• Media Type (traditional vs
social)
Visual Encoding
• Participation – indicates which
TV debates the candidate
participated in
• Attacker/Attacked – who
attacked who
• Number of Attacks – how
many attacks each
presidential candidate
launched during each
television debate or twitter
account
Techniques
• Attacks (mentions + negative
sentiment) – Out-of-box
(Google and IBM SA APIs)
and internally developed
(Driverless AI) Sentiment
Analysis for Portuguese
language
• Visualizations – d3.js [3]
USE CASE 2 – the media war
DEVELOPING OUR SENTIMENT ANALYSIS CLASSIFIER
Sentiment Analysis on Brazilian Portuguese corpora
We tested a number of approaches to be able to extract political attacks from the political debates on
television and on social media. In particular we wanted to validate if it made sense to develop our own
classifier for Sentiment Analysis or if the out-of-box solutions were good enough when applied to a
NLP problem in Brazilian Portuguese
A. Out-of-Box Sentiment Analysis classifiers
1) IBM Watson Sentiment Analysis API
2) Google Sentiment Analysis API
B. Internally Developed Sentiment Analysis classifier – public dataset
1) Driverless AI NLP recipes to train a model on publicly available datasets
C. Internally Developed Sentiment Analysis classifier – large own corpus (*)
1) Driverless AI NLP recipes to automatically annotate a large corpus of Brazilian Portuguese political documents
(*) future work
Internally Developed Sentiment Analysis
classifier
EXPERIMENTS SET UP
Environment
• AWS EC2 p2.8xlarge instance:
• 8x GPUs
• 32 vCPUs
• 488GB RAM
Experiments
1. Airline sentiment analysis dataset [4]:
• It has 14640 valid tweets from 2/17/2015 to 2/24/2015 related to reviews of major U.S. airlines, containing sentiment
label, negative reason label, tweets content and other meta information like location, user ID etc. The data fraction is
roughly 15% positive, 65% negative, and 20% neutral.
2. Political Social Media Posts dataset [5]:
• This dataset, from Crowdflower's Data For Everyone Library, provides text of 5000 messages from politicians' social
media accounts, along with human judgments about the purpose, partisanship, and audience of the messages
3. TweetSentBR dataset [6]  selected
• The annotated dataset is composed of 15.000 tweets split in two documents - a training set with 12.999 documents
labeled in positive (44%), neutral (26%) and negative (29%); and a test set composed of 2001 documents with similar
distribution to the training set, 45%, 25% and 29% respectively
Tools
• Driverless AI release 1.5 AMI
• R/Python – data preparation
Internally Developed Sentiment Analysis
classifier
DRIVERLESS AI - NLP
The support for NLP on Driverless AI allowed us to extract
features from raw text that were used to carry forward our
sentiment analysis classification task
NLP Features
• Word Count
• TFIDF
• Word Embeddings
NLP specific models
• Truncated SVD on word count
• Linear models on TFIDF vectors
• Convolutional neural network models on word embeddings
Variable Importance
+----+----------------------------+------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| | Relative Importance | Feature | Description
|----+----------------------------+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------|
| 0 | 1 | 1_TxtCNN_TE:tweet.2 | Predicted probabilities of class #3 based on CNN model on text column ['tweet']
| 1 | 0.78723 | 1_TxtCNN_TE:tweet.0 | Predicted probabilities of class #1 based on CNN model on text column ['tweet']
| 2 | 0.66161 | 2_TxtTE:tweet.0 | Predicted probabilities of class #1 based on linear model on Tfidf features from text column ['tweet']
| 3 | 0.518799 | 1_TxtCNN_TE:tweet.1 | Predicted probabilities of class #2 based on CNN model on text column ['tweet']
| 4 | 0.518165 | 2_TxtTE:tweet.2 | Predicted probabilities of class #3 based on linear model on Tfidf features from text column ['tweet']
| 5 | 0.239108 | 2_TxtTE:tweet.1 | Predicted probabilities of class #2 based on linear model on Tfidf features from text column ['tweet']
| 6 | 0.0201291 | 0_Txt:tweet.1 | Feature #2 of tf-idf-based word embedding (followed by dimensionality reduction to 75 dimensions) of 'tweet'
TOP 6 Engineered Features during model building
Driverless AI Stage Timing (seconds) Number of Models
Data Preparation 7.73 0
Model and Feature Tuning 2,699.92 (45 mins) 730
Feature Evolution 2,283.49 (38 mins) 1566
Final Pipeline Training 1,386.20 (23 mins) 12
This classification experiment completed in 1 hours and 49 minutes (1:49:52), using 0 of the
1 original features, and 167 of the 1,140 engineered features.
Driverless AI built a stacked ensemble of 2 XGBoostModels, 2 LightGBMModels to predict
sentiment given 1 original features from the input dataset trainTT.csv.
Experiment Summary
USE CASE 2 – the media war
MODELS PERFORMANCE COMPARISON
F1-Score
+----+----------------------------+------------------------------+--------------------------------------------------------------+
| | Framework | F1-score [negative] | F1-score [neutral] | F1-score [positive] |
|----+----------------------------+-------------------------------+--------------------------------|----------------------------|
| | Google Cloud | 0.4313725 | 0.2357320 | 0.6467569 |
| | IBM Watson | 0.6921381 | 0.3324022 | 0.7383943 |
| | H2O Driverless AI | 0.6854839 | 0.5028185 | 0.7881669 |
USE CASE 2 – the media war
TV DEBATES VISUALIZATION
An attack is represented by a
line that connects distinct
regions
The external ring of the plot is divided
into regions, each one representing a
candidate
The regions are further separated
into sections (divided by thin lines),
each section representing a debate
Visualization inspired by 2007
article published by The New
York Time. In that article each
line would represent a
mention. We have detected
mentions and then applied
sentiment analysis to only
show those classified as
negative
USE CASE 2 – the media war
TV DEBATES VISUALIZATION
There’s a small circular scale on the outside of the section
- minor tick marks represent ten words from attack phrases
- major tick marks represent one hundred words.
For instance, candidate Ciro Gomes spoke about 1100
words in attack phrases across five television debates
Attacks received are pointing
to the candidate name in the
middle of the segment
Attacks from a specific debates can
be highlighted as well as visualize a
specific attack by selecting a line
USE CASE 2 – the media war
TV DEBATES VISUALIZATION
Not surprisingly Jair Bolsonaro was the candidate receiving most of the attacks (despite having participated to
only 2 television debates) and he’s also the candidate with the least amount of attacks made on the debates
Attacks to Bolsonaro during pre-electoral Television debates Attacks by Bolsonaro during pre-electoral Television debates
USE CASE 2 – the media war
ATTACKS ON TWITTER VISUALIZATION
TV DEBATES ATTACKS TWITTER ATTACKS
2018 Brazilian Presidential Elections Project
CONCLUSIONS
• Performing NLP projects for non-English languages presents a number of additional
challenges.
• While out-of-box Cognitive/Natural Language APIs offer a number of powerful NLP
functionalities, in this project we have validated that better performance can be achieved
by building your own model to in classify sentiment in Brazilian Portuguese text.
• Leveraging the NLP recipes built in into the Driverless AI Automated Machine Learning
pipeline we’ve been able to tremendously accelerate the experimentation cycle, allowing
us to focus on machine learning strategy definition, interpretation of the results and the
creation of powerful interactive visualizations to extract insights on the topic analyzed.
The project team
Data Lens
xan
Data Artisan
carmelo
Data Ninja
kubo
Lady Data
carol
ferrArI
driverless
IA enthusiast &
Data believer
santiago
Kung Fu Pandas
bruno
2018 Brazilian Presidential Elections Project
REFERENCES
Techniques
• Slaping, Proksh - A Poisson Scaling Model for Estimating Time-Series Party Positions from Text [link]
• NLP techniques in Driverless AI [link]
• Jonathan Corum and Farhana Hossai (NYT): Naming Names - names used by major presidential candidates in
series of Democratic and Republicans debates leading up to the Iowa caucuses [link]
Tools
• Driverless AI [link]
• Wordfish R package [link]
• d3.js [link]
• Circos [link]
Datasets
• Airline sentiment analysis dataset [link]:
• Political Social Media Posts dataset [link]:
• Building a Sentiment Corpus of Tweets in Brazilian Portuguese [link]:

Mais conteúdo relacionado

Mais procurados

A Look Under the Hood of H2O Driverless AI
A Look Under the Hood of H2O Driverless AIA Look Under the Hood of H2O Driverless AI
A Look Under the Hood of H2O Driverless AI
Sri Ambati
 
Automatic Model Documentation with H2O
Automatic Model Documentation with H2OAutomatic Model Documentation with H2O
Automatic Model Documentation with H2O
Sri Ambati
 
Prithvi Prabhu + Shivam Bansal, H2O.ai - Building Blocks for AI Applications ...
Prithvi Prabhu + Shivam Bansal, H2O.ai - Building Blocks for AI Applications ...Prithvi Prabhu + Shivam Bansal, H2O.ai - Building Blocks for AI Applications ...
Prithvi Prabhu + Shivam Bansal, H2O.ai - Building Blocks for AI Applications ...
Sri Ambati
 
ICLR 2020 Recap
ICLR 2020 RecapICLR 2020 Recap
ICLR 2020 Recap
Sri Ambati
 
Keynote by Mike Gualtieri, Forrester Research - Making AI Happen Without Gett...
Keynote by Mike Gualtieri, Forrester Research - Making AI Happen Without Gett...Keynote by Mike Gualtieri, Forrester Research - Making AI Happen Without Gett...
Keynote by Mike Gualtieri, Forrester Research - Making AI Happen Without Gett...
Sri Ambati
 

Mais procurados (20)

AI Foundations Course Module 1 - An AI Transformation Journey
AI Foundations Course Module 1 - An AI Transformation JourneyAI Foundations Course Module 1 - An AI Transformation Journey
AI Foundations Course Module 1 - An AI Transformation Journey
 
A Look Under the Hood of H2O Driverless AI
A Look Under the Hood of H2O Driverless AIA Look Under the Hood of H2O Driverless AI
A Look Under the Hood of H2O Driverless AI
 
Introducción al Aprendizaje Automatico con H2O-3 (1)
Introducción al Aprendizaje Automatico con H2O-3 (1)Introducción al Aprendizaje Automatico con H2O-3 (1)
Introducción al Aprendizaje Automatico con H2O-3 (1)
 
From Rapid Prototypes to an end-to-end Model Deployment: an AI Hedge Fund Use...
From Rapid Prototypes to an end-to-end Model Deployment: an AI Hedge Fund Use...From Rapid Prototypes to an end-to-end Model Deployment: an AI Hedge Fund Use...
From Rapid Prototypes to an end-to-end Model Deployment: an AI Hedge Fund Use...
 
Krish Swamy + Balaji Gopalakrishnan, Wells Fargo - Building a World Class Dat...
Krish Swamy + Balaji Gopalakrishnan, Wells Fargo - Building a World Class Dat...Krish Swamy + Balaji Gopalakrishnan, Wells Fargo - Building a World Class Dat...
Krish Swamy + Balaji Gopalakrishnan, Wells Fargo - Building a World Class Dat...
 
Debugging AI
Debugging AIDebugging AI
Debugging AI
 
Automatic Model Documentation with H2O
Automatic Model Documentation with H2OAutomatic Model Documentation with H2O
Automatic Model Documentation with H2O
 
Prithvi Prabhu + Shivam Bansal, H2O.ai - Building Blocks for AI Applications ...
Prithvi Prabhu + Shivam Bansal, H2O.ai - Building Blocks for AI Applications ...Prithvi Prabhu + Shivam Bansal, H2O.ai - Building Blocks for AI Applications ...
Prithvi Prabhu + Shivam Bansal, H2O.ai - Building Blocks for AI Applications ...
 
ICLR 2020 Recap
ICLR 2020 RecapICLR 2020 Recap
ICLR 2020 Recap
 
Scalable Automatic Machine Learning with H2O
Scalable Automatic Machine Learning with H2OScalable Automatic Machine Learning with H2O
Scalable Automatic Machine Learning with H2O
 
Keynote by Mike Gualtieri, Forrester Research - Making AI Happen Without Gett...
Keynote by Mike Gualtieri, Forrester Research - Making AI Happen Without Gett...Keynote by Mike Gualtieri, Forrester Research - Making AI Happen Without Gett...
Keynote by Mike Gualtieri, Forrester Research - Making AI Happen Without Gett...
 
Accelerate ML Deployment with H2O Driverless AI on AWS
Accelerate ML Deployment with H2O Driverless AI on AWSAccelerate ML Deployment with H2O Driverless AI on AWS
Accelerate ML Deployment with H2O Driverless AI on AWS
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine Learning
 
MLCommons: Better ML for Everyone
MLCommons: Better ML for EveryoneMLCommons: Better ML for Everyone
MLCommons: Better ML for Everyone
 
Vertical is the New Horizontal - MinneAnalytics 2016 Sri Ambati Keynote on AI
Vertical is the New Horizontal - MinneAnalytics 2016 Sri Ambati Keynote on AIVertical is the New Horizontal - MinneAnalytics 2016 Sri Ambati Keynote on AI
Vertical is the New Horizontal - MinneAnalytics 2016 Sri Ambati Keynote on AI
 
Custom Machine Learning Recipes
Custom Machine Learning Recipes Custom Machine Learning Recipes
Custom Machine Learning Recipes
 
Robert Coop, Stanley Black & Decker - Optimizing Manufacturing with Driverles...
Robert Coop, Stanley Black & Decker - Optimizing Manufacturing with Driverles...Robert Coop, Stanley Black & Decker - Optimizing Manufacturing with Driverles...
Robert Coop, Stanley Black & Decker - Optimizing Manufacturing with Driverles...
 
Seldon: Deploying Models at Scale
Seldon: Deploying Models at ScaleSeldon: Deploying Models at Scale
Seldon: Deploying Models at Scale
 
Custom Machine Learning Recipes for the Enterprise
Custom Machine Learning Recipes for the EnterpriseCustom Machine Learning Recipes for the Enterprise
Custom Machine Learning Recipes for the Enterprise
 
Ankit Sinha, Experian - Ascend Analytical Sandbox - #H2OWorld
Ankit Sinha, Experian - Ascend Analytical Sandbox - #H2OWorldAnkit Sinha, Experian - Ascend Analytical Sandbox - #H2OWorld
Ankit Sinha, Experian - Ascend Analytical Sandbox - #H2OWorld
 

Semelhante a Carmelo Iaria, AI Academy - How The AI Academy is accelerating NLP projects with Driverless AI - H2O World San Francisco

David vernon software_engineering_notes
David vernon software_engineering_notesDavid vernon software_engineering_notes
David vernon software_engineering_notes
mitthudwivedi
 
MITS5004 Assignment 3 2 Copyright © 2015-2018 VIT, All Rig.docx
MITS5004 Assignment 3 2 Copyright © 2015-2018 VIT, All Rig.docxMITS5004 Assignment 3 2 Copyright © 2015-2018 VIT, All Rig.docx
MITS5004 Assignment 3 2 Copyright © 2015-2018 VIT, All Rig.docx
helzerpatrina
 
MITS5004 Assignment 3 2 Copyright © 2015-2018 VIT, All Rig.docx
MITS5004 Assignment 3 2 Copyright © 2015-2018 VIT, All Rig.docxMITS5004 Assignment 3 2 Copyright © 2015-2018 VIT, All Rig.docx
MITS5004 Assignment 3 2 Copyright © 2015-2018 VIT, All Rig.docx
roushhsiu
 
IT 700 Final Project Guidelines and RubricOverviewAs the fin.docx
IT 700 Final Project Guidelines and RubricOverviewAs the fin.docxIT 700 Final Project Guidelines and RubricOverviewAs the fin.docx
IT 700 Final Project Guidelines and RubricOverviewAs the fin.docx
ADDY50
 
e3f55595181f7cad006f26db820fb78ec146e00e-1646623528083 (1).pdf
e3f55595181f7cad006f26db820fb78ec146e00e-1646623528083 (1).pdfe3f55595181f7cad006f26db820fb78ec146e00e-1646623528083 (1).pdf
e3f55595181f7cad006f26db820fb78ec146e00e-1646623528083 (1).pdf
SILVIUSyt
 
Artificial intelligence engineer course
Artificial intelligence engineer courseArtificial intelligence engineer course
Artificial intelligence engineer course
Ibrahim Khleifat
 

Semelhante a Carmelo Iaria, AI Academy - How The AI Academy is accelerating NLP projects with Driverless AI - H2O World San Francisco (20)

Sentiment Analysis on Twitter data using Machine Learning
Sentiment Analysis on Twitter data using Machine LearningSentiment Analysis on Twitter data using Machine Learning
Sentiment Analysis on Twitter data using Machine Learning
 
Narrative Mind Week 6 H4D Stanford 2016
Narrative Mind Week 6 H4D Stanford 2016Narrative Mind Week 6 H4D Stanford 2016
Narrative Mind Week 6 H4D Stanford 2016
 
Emotion Recognition By Textual Tweets Using Machine Learning
Emotion Recognition By Textual Tweets Using Machine LearningEmotion Recognition By Textual Tweets Using Machine Learning
Emotion Recognition By Textual Tweets Using Machine Learning
 
Sentiment Analysis of Twitter Data
Sentiment Analysis of Twitter DataSentiment Analysis of Twitter Data
Sentiment Analysis of Twitter Data
 
Nt1320 Unit 6
Nt1320 Unit 6Nt1320 Unit 6
Nt1320 Unit 6
 
David vernon software_engineering_notes
David vernon software_engineering_notesDavid vernon software_engineering_notes
David vernon software_engineering_notes
 
OOSE Unit 1 PPT.ppt
OOSE Unit 1 PPT.pptOOSE Unit 1 PPT.ppt
OOSE Unit 1 PPT.ppt
 
Oose unit 1 ppt
Oose unit 1 pptOose unit 1 ppt
Oose unit 1 ppt
 
Productivity Factors in Software Development for PC Platform
Productivity Factors in Software Development for PC PlatformProductivity Factors in Software Development for PC Platform
Productivity Factors in Software Development for PC Platform
 
VWO - Mark de Winter - Run more experiments with fewer resources.pdf
VWO - Mark de Winter - Run more experiments with fewer resources.pdfVWO - Mark de Winter - Run more experiments with fewer resources.pdf
VWO - Mark de Winter - Run more experiments with fewer resources.pdf
 
Run more experiments with fewer resources
Run more experiments with fewer resourcesRun more experiments with fewer resources
Run more experiments with fewer resources
 
MITS5004 Assignment 3 2 Copyright © 2015-2018 VIT, All Rig.docx
MITS5004 Assignment 3 2 Copyright © 2015-2018 VIT, All Rig.docxMITS5004 Assignment 3 2 Copyright © 2015-2018 VIT, All Rig.docx
MITS5004 Assignment 3 2 Copyright © 2015-2018 VIT, All Rig.docx
 
MITS5004 Assignment 3 2 Copyright © 2015-2018 VIT, All Rig.docx
MITS5004 Assignment 3 2 Copyright © 2015-2018 VIT, All Rig.docxMITS5004 Assignment 3 2 Copyright © 2015-2018 VIT, All Rig.docx
MITS5004 Assignment 3 2 Copyright © 2015-2018 VIT, All Rig.docx
 
Bootcamp_AIAppsUCSD.pptx
Bootcamp_AIAppsUCSD.pptxBootcamp_AIAppsUCSD.pptx
Bootcamp_AIAppsUCSD.pptx
 
Bootcamp_AIApps.pdf
Bootcamp_AIApps.pdfBootcamp_AIApps.pdf
Bootcamp_AIApps.pdf
 
Bootcamp_AIApps.pdf
Bootcamp_AIApps.pdfBootcamp_AIApps.pdf
Bootcamp_AIApps.pdf
 
IT 700 Final Project Guidelines and RubricOverviewAs the fin.docx
IT 700 Final Project Guidelines and RubricOverviewAs the fin.docxIT 700 Final Project Guidelines and RubricOverviewAs the fin.docx
IT 700 Final Project Guidelines and RubricOverviewAs the fin.docx
 
e3f55595181f7cad006f26db820fb78ec146e00e-1646623528083 (1).pdf
e3f55595181f7cad006f26db820fb78ec146e00e-1646623528083 (1).pdfe3f55595181f7cad006f26db820fb78ec146e00e-1646623528083 (1).pdf
e3f55595181f7cad006f26db820fb78ec146e00e-1646623528083 (1).pdf
 
How to Run Discrete Choice Conjoint Analysis
How to Run Discrete Choice Conjoint AnalysisHow to Run Discrete Choice Conjoint Analysis
How to Run Discrete Choice Conjoint Analysis
 
Artificial intelligence engineer course
Artificial intelligence engineer courseArtificial intelligence engineer course
Artificial intelligence engineer course
 

Mais de Sri Ambati

AI Solutions in Manufacturing
AI Solutions in ManufacturingAI Solutions in Manufacturing
AI Solutions in Manufacturing
Sri Ambati
 
AI and AutoML: Debunking Myths
AI and AutoML: Debunking MythsAI and AutoML: Debunking Myths
AI and AutoML: Debunking Myths
Sri Ambati
 

Mais de Sri Ambati (20)

H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Generative AI Masterclass - Model Risk Management.pptx
Generative AI Masterclass - Model Risk Management.pptxGenerative AI Masterclass - Model Risk Management.pptx
Generative AI Masterclass - Model Risk Management.pptx
 
AI and the Future of Software Development: A Sneak Peek
AI and the Future of Software Development: A Sneak Peek AI and the Future of Software Development: A Sneak Peek
AI and the Future of Software Development: A Sneak Peek
 
LLMOps: Match report from the top of the 5th
LLMOps: Match report from the top of the 5thLLMOps: Match report from the top of the 5th
LLMOps: Match report from the top of the 5th
 
Building, Evaluating, and Optimizing your RAG App for Production
Building, Evaluating, and Optimizing your RAG App for ProductionBuilding, Evaluating, and Optimizing your RAG App for Production
Building, Evaluating, and Optimizing your RAG App for Production
 
Building LLM Solutions using Open Source and Closed Source Solutions in Coher...
Building LLM Solutions using Open Source and Closed Source Solutions in Coher...Building LLM Solutions using Open Source and Closed Source Solutions in Coher...
Building LLM Solutions using Open Source and Closed Source Solutions in Coher...
 
Risk Management for LLMs
Risk Management for LLMsRisk Management for LLMs
Risk Management for LLMs
 
Open-Source AI: Community is the Way
Open-Source AI: Community is the WayOpen-Source AI: Community is the Way
Open-Source AI: Community is the Way
 
Building Custom GenAI Apps at H2O
Building Custom GenAI Apps at H2OBuilding Custom GenAI Apps at H2O
Building Custom GenAI Apps at H2O
 
Applied Gen AI for the Finance Vertical
Applied Gen AI for the Finance Vertical Applied Gen AI for the Finance Vertical
Applied Gen AI for the Finance Vertical
 
Cutting Edge Tricks from LLM Papers
Cutting Edge Tricks from LLM PapersCutting Edge Tricks from LLM Papers
Cutting Edge Tricks from LLM Papers
 
Practitioner's Guide to LLMs: Exploring Use Cases and a Glimpse Beyond Curren...
Practitioner's Guide to LLMs: Exploring Use Cases and a Glimpse Beyond Curren...Practitioner's Guide to LLMs: Exploring Use Cases and a Glimpse Beyond Curren...
Practitioner's Guide to LLMs: Exploring Use Cases and a Glimpse Beyond Curren...
 
Open Source h2oGPT with Retrieval Augmented Generation (RAG), Web Search, and...
Open Source h2oGPT with Retrieval Augmented Generation (RAG), Web Search, and...Open Source h2oGPT with Retrieval Augmented Generation (RAG), Web Search, and...
Open Source h2oGPT with Retrieval Augmented Generation (RAG), Web Search, and...
 
KGM Mastering Classification and Regression with LLMs: Insights from Kaggle C...
KGM Mastering Classification and Regression with LLMs: Insights from Kaggle C...KGM Mastering Classification and Regression with LLMs: Insights from Kaggle C...
KGM Mastering Classification and Regression with LLMs: Insights from Kaggle C...
 
LLM Interpretability
LLM Interpretability LLM Interpretability
LLM Interpretability
 
Never Reply to an Email Again
Never Reply to an Email AgainNever Reply to an Email Again
Never Reply to an Email Again
 
ML Model Deployment and Scoring on the Edge with Automatic ML & DF
ML Model Deployment and Scoring on the Edge with Automatic ML & DFML Model Deployment and Scoring on the Edge with Automatic ML & DF
ML Model Deployment and Scoring on the Edge with Automatic ML & DF
 
AI Solutions in Manufacturing
AI Solutions in ManufacturingAI Solutions in Manufacturing
AI Solutions in Manufacturing
 
Getting Your Supply Chain Back on Track with AI
Getting Your Supply Chain Back on Track with AIGetting Your Supply Chain Back on Track with AI
Getting Your Supply Chain Back on Track with AI
 
AI and AutoML: Debunking Myths
AI and AutoML: Debunking MythsAI and AutoML: Debunking Myths
AI and AutoML: Debunking Myths
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Carmelo Iaria, AI Academy - How The AI Academy is accelerating NLP projects with Driverless AI - H2O World San Francisco

  • 1. Accelerating NLP projects with Driverless AI Carmelo IARIA data artisan, The AI Academy https://www.linkedin.com/in/carmeloiaria/ #H2OWORLD
  • 2. The AI Academy is an integrated system of education, research and consulting services focusing on the application of Artificial Intelligence to challenging real-life problems We believe the speed at which technology is evolving is proving current linear education systems obsolete and we are re-discovering the approach of the 15th century artists workshops where continuous learning was integrated with project development
  • 3. 2018 Brazilian Presidential Elections Project THE CONTEXT
  • 4. 2018 Brazilian Presidential Elections Project THE SCOPE We studied, through the use of NLP and Visualization techniques, the following use cases 1. The Ideological Position – medium post • Where the political programs of the 13 presidential candidates stand in an ideological spectrum 2. The Media War – [medium post] • Visualize the political attacks by the candidates during the presidential campaign • Comparing the attacks on traditional media with those on social media
  • 5. USE CASE 1 – the ideological position STRATEGY Problem Statement: Extract a single metric representing the ideological position of each political program Data Source • the 13 government programs Analysis Dimensions • Economy and Employment • Education and Health • External Policy and Environment • Political System and Corruption • Social Policy and Human Rights • Safety Visual Encoding • Weight – how much importance was given to each policy in the political program • Ideology Position – where does the political program stand in a left-right ideological spectrum Techniques • Weight – Simple score representing the number of words on each specific policy normalized to the size of the program • Ideology – [Slaping, Proksh - A Poisson Scaling Model for Estimating Time-Series Party Positions from Text1] [Wordfish R package 2] • Visualizations – d3.js [3]
  • 6. USE CASE 1 – the ideological position ABOUT WORDFISH The methodology proposed uses a Poisson scaling technique to estimate party positions in a single left-right dimension based on word frequencies in political text. The main advantages of such method are that • It is language independent: as such it can be applied to any language with the same efficacy • It is an unsupervised technique: unlike other methodologies analyzed in the paper, Wordfish doesn't require hand-coding (i.e. providing training text that "defines" what's left and what's right in a political text). This way it eliminate bias It is important to highlight that the technique does not attempt to provide an absolute classification of "left" or "right" but rather to measure the relative position of the different parties (government programs in our case) as emerging from the political text. You can read the paper here.
  • 7. USE CASE 1 – the ideological position SAMPLE RESULTS Economy & Employment Human Rights & Social Welfare Security
  • 8. USE CASE 1 – the ideological position SAMPLE RESULTS User can navigate a summarized version of the political programs by Policy and by Candidate making it easy to compare See the full Interactive Visualization
  • 9. USE CASE 2 – the media war STRATEGY Problem Statement: How do presidential candidates make use of traditional and social media to attack opponents Data Source • Presidential candidates television debates run on the main broadcast channels prior to the elections’ first turn • Tweeter accounts of the two presidential candidates running in the second turn Analysis Dimensions • Political Attack • Media Type (traditional vs social) Visual Encoding • Participation – indicates which TV debates the candidate participated in • Attacker/Attacked – who attacked who • Number of Attacks – how many attacks each presidential candidate launched during each television debate or twitter account Techniques • Attacks (mentions + negative sentiment) – Out-of-box (Google and IBM SA APIs) and internally developed (Driverless AI) Sentiment Analysis for Portuguese language • Visualizations – d3.js [3]
  • 10. USE CASE 2 – the media war DEVELOPING OUR SENTIMENT ANALYSIS CLASSIFIER Sentiment Analysis on Brazilian Portuguese corpora We tested a number of approaches to be able to extract political attacks from the political debates on television and on social media. In particular we wanted to validate if it made sense to develop our own classifier for Sentiment Analysis or if the out-of-box solutions were good enough when applied to a NLP problem in Brazilian Portuguese A. Out-of-Box Sentiment Analysis classifiers 1) IBM Watson Sentiment Analysis API 2) Google Sentiment Analysis API B. Internally Developed Sentiment Analysis classifier – public dataset 1) Driverless AI NLP recipes to train a model on publicly available datasets C. Internally Developed Sentiment Analysis classifier – large own corpus (*) 1) Driverless AI NLP recipes to automatically annotate a large corpus of Brazilian Portuguese political documents (*) future work
  • 11. Internally Developed Sentiment Analysis classifier EXPERIMENTS SET UP Environment • AWS EC2 p2.8xlarge instance: • 8x GPUs • 32 vCPUs • 488GB RAM Experiments 1. Airline sentiment analysis dataset [4]: • It has 14640 valid tweets from 2/17/2015 to 2/24/2015 related to reviews of major U.S. airlines, containing sentiment label, negative reason label, tweets content and other meta information like location, user ID etc. The data fraction is roughly 15% positive, 65% negative, and 20% neutral. 2. Political Social Media Posts dataset [5]: • This dataset, from Crowdflower's Data For Everyone Library, provides text of 5000 messages from politicians' social media accounts, along with human judgments about the purpose, partisanship, and audience of the messages 3. TweetSentBR dataset [6]  selected • The annotated dataset is composed of 15.000 tweets split in two documents - a training set with 12.999 documents labeled in positive (44%), neutral (26%) and negative (29%); and a test set composed of 2001 documents with similar distribution to the training set, 45%, 25% and 29% respectively Tools • Driverless AI release 1.5 AMI • R/Python – data preparation
  • 12. Internally Developed Sentiment Analysis classifier DRIVERLESS AI - NLP The support for NLP on Driverless AI allowed us to extract features from raw text that were used to carry forward our sentiment analysis classification task NLP Features • Word Count • TFIDF • Word Embeddings NLP specific models • Truncated SVD on word count • Linear models on TFIDF vectors • Convolutional neural network models on word embeddings Variable Importance +----+----------------------------+------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ | | Relative Importance | Feature | Description |----+----------------------------+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------| | 0 | 1 | 1_TxtCNN_TE:tweet.2 | Predicted probabilities of class #3 based on CNN model on text column ['tweet'] | 1 | 0.78723 | 1_TxtCNN_TE:tweet.0 | Predicted probabilities of class #1 based on CNN model on text column ['tweet'] | 2 | 0.66161 | 2_TxtTE:tweet.0 | Predicted probabilities of class #1 based on linear model on Tfidf features from text column ['tweet'] | 3 | 0.518799 | 1_TxtCNN_TE:tweet.1 | Predicted probabilities of class #2 based on CNN model on text column ['tweet'] | 4 | 0.518165 | 2_TxtTE:tweet.2 | Predicted probabilities of class #3 based on linear model on Tfidf features from text column ['tweet'] | 5 | 0.239108 | 2_TxtTE:tweet.1 | Predicted probabilities of class #2 based on linear model on Tfidf features from text column ['tweet'] | 6 | 0.0201291 | 0_Txt:tweet.1 | Feature #2 of tf-idf-based word embedding (followed by dimensionality reduction to 75 dimensions) of 'tweet' TOP 6 Engineered Features during model building Driverless AI Stage Timing (seconds) Number of Models Data Preparation 7.73 0 Model and Feature Tuning 2,699.92 (45 mins) 730 Feature Evolution 2,283.49 (38 mins) 1566 Final Pipeline Training 1,386.20 (23 mins) 12 This classification experiment completed in 1 hours and 49 minutes (1:49:52), using 0 of the 1 original features, and 167 of the 1,140 engineered features. Driverless AI built a stacked ensemble of 2 XGBoostModels, 2 LightGBMModels to predict sentiment given 1 original features from the input dataset trainTT.csv. Experiment Summary
  • 13. USE CASE 2 – the media war MODELS PERFORMANCE COMPARISON F1-Score +----+----------------------------+------------------------------+--------------------------------------------------------------+ | | Framework | F1-score [negative] | F1-score [neutral] | F1-score [positive] | |----+----------------------------+-------------------------------+--------------------------------|----------------------------| | | Google Cloud | 0.4313725 | 0.2357320 | 0.6467569 | | | IBM Watson | 0.6921381 | 0.3324022 | 0.7383943 | | | H2O Driverless AI | 0.6854839 | 0.5028185 | 0.7881669 |
  • 14. USE CASE 2 – the media war TV DEBATES VISUALIZATION An attack is represented by a line that connects distinct regions The external ring of the plot is divided into regions, each one representing a candidate The regions are further separated into sections (divided by thin lines), each section representing a debate Visualization inspired by 2007 article published by The New York Time. In that article each line would represent a mention. We have detected mentions and then applied sentiment analysis to only show those classified as negative
  • 15. USE CASE 2 – the media war TV DEBATES VISUALIZATION There’s a small circular scale on the outside of the section - minor tick marks represent ten words from attack phrases - major tick marks represent one hundred words. For instance, candidate Ciro Gomes spoke about 1100 words in attack phrases across five television debates Attacks received are pointing to the candidate name in the middle of the segment Attacks from a specific debates can be highlighted as well as visualize a specific attack by selecting a line
  • 16. USE CASE 2 – the media war TV DEBATES VISUALIZATION Not surprisingly Jair Bolsonaro was the candidate receiving most of the attacks (despite having participated to only 2 television debates) and he’s also the candidate with the least amount of attacks made on the debates Attacks to Bolsonaro during pre-electoral Television debates Attacks by Bolsonaro during pre-electoral Television debates
  • 17. USE CASE 2 – the media war ATTACKS ON TWITTER VISUALIZATION TV DEBATES ATTACKS TWITTER ATTACKS
  • 18. 2018 Brazilian Presidential Elections Project CONCLUSIONS • Performing NLP projects for non-English languages presents a number of additional challenges. • While out-of-box Cognitive/Natural Language APIs offer a number of powerful NLP functionalities, in this project we have validated that better performance can be achieved by building your own model to in classify sentiment in Brazilian Portuguese text. • Leveraging the NLP recipes built in into the Driverless AI Automated Machine Learning pipeline we’ve been able to tremendously accelerate the experimentation cycle, allowing us to focus on machine learning strategy definition, interpretation of the results and the creation of powerful interactive visualizations to extract insights on the topic analyzed.
  • 19. The project team Data Lens xan Data Artisan carmelo Data Ninja kubo Lady Data carol ferrArI driverless IA enthusiast & Data believer santiago Kung Fu Pandas bruno
  • 20. 2018 Brazilian Presidential Elections Project REFERENCES Techniques • Slaping, Proksh - A Poisson Scaling Model for Estimating Time-Series Party Positions from Text [link] • NLP techniques in Driverless AI [link] • Jonathan Corum and Farhana Hossai (NYT): Naming Names - names used by major presidential candidates in series of Democratic and Republicans debates leading up to the Iowa caucuses [link] Tools • Driverless AI [link] • Wordfish R package [link] • d3.js [link] • Circos [link] Datasets • Airline sentiment analysis dataset [link]: • Political Social Media Posts dataset [link]: • Building a Sentiment Corpus of Tweets in Brazilian Portuguese [link]:

Notas do Editor

  1. 2018’s Brazilian Presidential Elections represented a significant change not only with regards to the elections results but also from the way the election campaigns were conducted by the candidates The winning candidate deserted Television debates and conducted his campaign from social media platforms in a way nobody had ever done in Brazil