SlideShare a Scribd company logo
1 of 18
Download to read offline
Machine Learning with R
and Tableau
Tableau User Group (TUG)
Greg Armstrong
Blast Analytics & Marketing
garmstrong@blastam.com
TUG | Machine Learning with R and Tableau
Agenda
Machine Learning with R and Tableau
2
1. What is Machine Learning?
2. What is R?
3. Live Examples using Tableau and R
TUG | Machine Learning with R and Tableau
Machine Learning
What is machine learning?
3
Machine learning explores
the study and construction
of algorithms that can
learn from and make
predictions on data.
• Classification
• Regression
• Segmentation
Common Methods
TUG | Machine Learning with R and Tableau 4
Regression
Machine Learning
Supervised Learning
Classification
X
Y
X
Y
TUG | Machine Learning with R and Tableau 5
Segmentation (cluster)
Machine Learning
Unsupervised Learning
X
Y
TUG | Machine Learning with R and Tableau
Machine Learning
Marketing use cases
6
• Predicting Lifetime Value (LTV)
• Predicting Churn
• Customer segmentation
• Product recommendations
I like it. I like it a lot!
TUG | Machine Learning with R and Tableau
Machine Learning
Finance use cases
7
• Predicting credit risk
• Treasury or currency risk
• Fraud detection
• Accounts Payable Recovery
“Because a large font makes profits look bigger.”
TUG | Machine Learning with R and Tableau
Machine Learning
Human Resources use cases
8
• Resume screening
• Employee churn
• Training recommendation
• Talent management
“I pruned a tree once, so technically I’m allowed
to put ‘branch manager’ on my resume”
TUG | Machine Learning with R and Tableau
Machine Learning
Web Search
9
… and predictive text
algorithms to fill in the most
common keyword search
terms.
Google uses machine
learning algorithms to serve
up the correct search even
when the search terms are
vastly misspelled.
TUG | Machine Learning with R and Tableau
Machine Learning
Social Networks
10
TUG | Machine Learning with R and Tableau
Machine Learning
Spam Filtering
11
No Spam
TUG | Machine Learning with R and Tableau
Machine Learning
Research - Fishers Iris
12
Based on Ronald Fisher’s 1936 paper
the idea was to perform statistical
classification on the Iris flower
data set.
Petal widthPetal length
SepalwidthSepallength
TUG | Machine Learning with R and Tableau
ahhRRRR!
What is R?
13
• Data manipulation
• Statistical modeling
• Visualization tool
• Open Source
R is a language for statistical analysis and
data visualization.
TUG | Machine Learning with R and Tableau
R Studio, R & Tableau
A brief introduction
14
+
TUG | Machine Learning with R and Tableau
Tableau + R
What did we discover?
15
Customer Segmentation (clusters)
1. There are some big spenders in the Red group,
who may not have purchased in a while.
2. Our most profitable customers seem to be older
with higher incomes. (Blue group)
Forecasting (linear regression)
1. Tableau forecasting is very good.
2. More flexibility with R forecasting.
TUG | Machine Learning with R and Tableau
Tableau User Group (TUG)
Machine Learning with R and Tableau
16
Questions?
Thank you!
Phone (888) 252-7866 Email sales@blastam.comWeb www.blastam.com
Roseville Office
6020 West Oaks Blvd, Suite 260
Rocklin, CA 95765
San Francisco Office
625 Second Street, Suite 280
San Francisco, CA 94107
New York Office
261 Madison Ave, 9th Floor
New York, NY 10016
Seattle Office
500 Yale Avenue North
Seattle, WA 98109
Los Angeles Office
7083 Hollywood Boulevard
Los Angeles, CA 90028
TUG | Machine Learning with R and Tableau
Calculated Fields
Tableau Calculated Fields for R
18
SCRIPT_INT("
## Sets the seed
set.seed( .arg7[1])
## Studentizes the variables
day <- ( .arg1 - mean(.arg1) )/ sd(.arg1)
mos <- ( .arg2 - mean(.arg2) )/ sd(.arg2)
dis <- ( .arg3 - mean(.arg3) )/ sd(.arg3)
inc <- ( .arg4 - mean(.arg4) )/ sd(.arg4)
age <- ( .arg5 - mean(.arg5) )/ sd(.arg5)
dat <- cbind(day, mos, dis, inc, age)
day <- .arg6[1]
## Creates the clusters
kmeans(dat, day)$cluster
",
MIN([Days Since Last Order]),
[Months as Customer],
AVG([Discount]),
MAX([Income]),
MAX([Age]),
[clusters],
[seed]
)
K-means cluster for customer segmentation
SCRIPT_STR('hello <- "Hello TUG!"', ATTR([R
Result]))
Pass string to R with a parameter
SCRIPT_INT("as.integer(.arg1 * 2)", [R Variable])
Pass calculation to R based on parameter
SCRIPT_BOOL("
print('******************************************
*********************')
print('the vector sent was')
print(.arg1)
print('with length')
print(length(.arg1))
TRUE
",
SUM([Sales])
)
Print to console R arguments

More Related Content

Viewers also liked

Creating a Culture of CareerFinal 111015
Creating a Culture of CareerFinal 111015Creating a Culture of CareerFinal 111015
Creating a Culture of CareerFinal 111015Poonam Sahotra
 
Data first with Tableau [FutureStack16]
Data first with Tableau [FutureStack16]Data first with Tableau [FutureStack16]
Data first with Tableau [FutureStack16]New Relic
 
whitepaper_advanced_analytics_with_tableau_eng
whitepaper_advanced_analytics_with_tableau_engwhitepaper_advanced_analytics_with_tableau_eng
whitepaper_advanced_analytics_with_tableau_engS. Hanau
 
Turismo 2.0 e nicchie di mercato
Turismo 2.0 e nicchie di mercatoTurismo 2.0 e nicchie di mercato
Turismo 2.0 e nicchie di mercatoForlani Fabio
 
Machine Learning with R and Tableau
Machine Learning with R and TableauMachine Learning with R and Tableau
Machine Learning with R and TableauKayden Kelly
 
Tableau Customer Presentation
Tableau Customer PresentationTableau Customer Presentation
Tableau Customer PresentationSplunk
 

Viewers also liked (8)

BI_BigData_Titulo
BI_BigData_TituloBI_BigData_Titulo
BI_BigData_Titulo
 
Creating a Culture of CareerFinal 111015
Creating a Culture of CareerFinal 111015Creating a Culture of CareerFinal 111015
Creating a Culture of CareerFinal 111015
 
Data first with Tableau [FutureStack16]
Data first with Tableau [FutureStack16]Data first with Tableau [FutureStack16]
Data first with Tableau [FutureStack16]
 
Tableau Suite Analysis
Tableau Suite Analysis Tableau Suite Analysis
Tableau Suite Analysis
 
whitepaper_advanced_analytics_with_tableau_eng
whitepaper_advanced_analytics_with_tableau_engwhitepaper_advanced_analytics_with_tableau_eng
whitepaper_advanced_analytics_with_tableau_eng
 
Turismo 2.0 e nicchie di mercato
Turismo 2.0 e nicchie di mercatoTurismo 2.0 e nicchie di mercato
Turismo 2.0 e nicchie di mercato
 
Machine Learning with R and Tableau
Machine Learning with R and TableauMachine Learning with R and Tableau
Machine Learning with R and Tableau
 
Tableau Customer Presentation
Tableau Customer PresentationTableau Customer Presentation
Tableau Customer Presentation
 

Recently uploaded

What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 

Recently uploaded (20)

What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 

Machine Learning with R and Tableau

  • 1. Machine Learning with R and Tableau Tableau User Group (TUG) Greg Armstrong Blast Analytics & Marketing garmstrong@blastam.com
  • 2. TUG | Machine Learning with R and Tableau Agenda Machine Learning with R and Tableau 2 1. What is Machine Learning? 2. What is R? 3. Live Examples using Tableau and R
  • 3. TUG | Machine Learning with R and Tableau Machine Learning What is machine learning? 3 Machine learning explores the study and construction of algorithms that can learn from and make predictions on data. • Classification • Regression • Segmentation Common Methods
  • 4. TUG | Machine Learning with R and Tableau 4 Regression Machine Learning Supervised Learning Classification X Y X Y
  • 5. TUG | Machine Learning with R and Tableau 5 Segmentation (cluster) Machine Learning Unsupervised Learning X Y
  • 6. TUG | Machine Learning with R and Tableau Machine Learning Marketing use cases 6 • Predicting Lifetime Value (LTV) • Predicting Churn • Customer segmentation • Product recommendations I like it. I like it a lot!
  • 7. TUG | Machine Learning with R and Tableau Machine Learning Finance use cases 7 • Predicting credit risk • Treasury or currency risk • Fraud detection • Accounts Payable Recovery “Because a large font makes profits look bigger.”
  • 8. TUG | Machine Learning with R and Tableau Machine Learning Human Resources use cases 8 • Resume screening • Employee churn • Training recommendation • Talent management “I pruned a tree once, so technically I’m allowed to put ‘branch manager’ on my resume”
  • 9. TUG | Machine Learning with R and Tableau Machine Learning Web Search 9 … and predictive text algorithms to fill in the most common keyword search terms. Google uses machine learning algorithms to serve up the correct search even when the search terms are vastly misspelled.
  • 10. TUG | Machine Learning with R and Tableau Machine Learning Social Networks 10
  • 11. TUG | Machine Learning with R and Tableau Machine Learning Spam Filtering 11 No Spam
  • 12. TUG | Machine Learning with R and Tableau Machine Learning Research - Fishers Iris 12 Based on Ronald Fisher’s 1936 paper the idea was to perform statistical classification on the Iris flower data set. Petal widthPetal length SepalwidthSepallength
  • 13. TUG | Machine Learning with R and Tableau ahhRRRR! What is R? 13 • Data manipulation • Statistical modeling • Visualization tool • Open Source R is a language for statistical analysis and data visualization.
  • 14. TUG | Machine Learning with R and Tableau R Studio, R & Tableau A brief introduction 14 +
  • 15. TUG | Machine Learning with R and Tableau Tableau + R What did we discover? 15 Customer Segmentation (clusters) 1. There are some big spenders in the Red group, who may not have purchased in a while. 2. Our most profitable customers seem to be older with higher incomes. (Blue group) Forecasting (linear regression) 1. Tableau forecasting is very good. 2. More flexibility with R forecasting.
  • 16. TUG | Machine Learning with R and Tableau Tableau User Group (TUG) Machine Learning with R and Tableau 16 Questions? Thank you!
  • 17. Phone (888) 252-7866 Email sales@blastam.comWeb www.blastam.com Roseville Office 6020 West Oaks Blvd, Suite 260 Rocklin, CA 95765 San Francisco Office 625 Second Street, Suite 280 San Francisco, CA 94107 New York Office 261 Madison Ave, 9th Floor New York, NY 10016 Seattle Office 500 Yale Avenue North Seattle, WA 98109 Los Angeles Office 7083 Hollywood Boulevard Los Angeles, CA 90028
  • 18. TUG | Machine Learning with R and Tableau Calculated Fields Tableau Calculated Fields for R 18 SCRIPT_INT(" ## Sets the seed set.seed( .arg7[1]) ## Studentizes the variables day <- ( .arg1 - mean(.arg1) )/ sd(.arg1) mos <- ( .arg2 - mean(.arg2) )/ sd(.arg2) dis <- ( .arg3 - mean(.arg3) )/ sd(.arg3) inc <- ( .arg4 - mean(.arg4) )/ sd(.arg4) age <- ( .arg5 - mean(.arg5) )/ sd(.arg5) dat <- cbind(day, mos, dis, inc, age) day <- .arg6[1] ## Creates the clusters kmeans(dat, day)$cluster ", MIN([Days Since Last Order]), [Months as Customer], AVG([Discount]), MAX([Income]), MAX([Age]), [clusters], [seed] ) K-means cluster for customer segmentation SCRIPT_STR('hello <- "Hello TUG!"', ATTR([R Result])) Pass string to R with a parameter SCRIPT_INT("as.integer(.arg1 * 2)", [R Variable]) Pass calculation to R based on parameter SCRIPT_BOOL(" print('****************************************** *********************') print('the vector sent was') print(.arg1) print('with length') print(length(.arg1)) TRUE ", SUM([Sales]) ) Print to console R arguments