SlideShare a Scribd company logo
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

PDF
How to Use AdWords Segmentation for Better PPC Results by Amy Hebdon
PDF
Driving Insights with Tableau
PDF
Goal Setting for Digital Measurement Success
PDF
How Much Revenue Are You Losing From Organic Traffic Declines?
PPTX
Content marketing analytics: how to make your data work harder for your business
PPTX
Documenting your Plan A. Startups and the Business Model Canvas - Agrihack We...
PPTX
Conversion Rate Optmization
PPTX
How to Create and Optimize Content for Higher Google Rankings
How to Use AdWords Segmentation for Better PPC Results by Amy Hebdon
Driving Insights with Tableau
Goal Setting for Digital Measurement Success
How Much Revenue Are You Losing From Organic Traffic Declines?
Content marketing analytics: how to make your data work harder for your business
Documenting your Plan A. Startups and the Business Model Canvas - Agrihack We...
Conversion Rate Optmization
How to Create and Optimize Content for Higher Google Rankings

What's hot (20)

PDF
The Secrets To Agency Content Marketing Success
PDF
Content Strategy & Actionable On-Page SEO Tips to Drive Traffic in 2019
PDF
Marketing Mashup: Top takeaways from Web Opt Summit 2014
PDF
PPC Keyword Research
PDF
Bob Ruffalo - How Impact Used ResearchXL to 3X Conversions
 
PDF
Kraftblick: How To Take The Best of Marketing Strategies of Your Competitors ...
PDF
Infer and LeanData - Host Analytics Customer Case Study
PDF
Online Marketing Overview
PDF
The five essential steps to building a data product
PDF
How to Break Into Page 1 of the SERPs
PDF
How to Scale and Grow your Enterprise Technical SEO Strategy
PPT
Google Analytics: Advanced Technical Implementation
PPTX
Stamats: Analytics Webinar
PPTX
Lucidworks & IMRG Webinar – Best-In-Class Retail Product Discovery
PPTX
4 Steps to ABM Success with Predictive Analytics
PPTX
Content Marketing: Case Studies and Strategies for Success
PDF
The Hidden Potential Of Brand PPC - BrightonSEO 2018 - Daniel Moore
PPTX
Testing: A discussion about SAP's 27% lift in incremental sales leads
PPTX
Conquering the perfect storm share[1]
PDF
The Nuts and Bolts: How one company implements an entire testing methodology ...
The Secrets To Agency Content Marketing Success
Content Strategy & Actionable On-Page SEO Tips to Drive Traffic in 2019
Marketing Mashup: Top takeaways from Web Opt Summit 2014
PPC Keyword Research
Bob Ruffalo - How Impact Used ResearchXL to 3X Conversions
 
Kraftblick: How To Take The Best of Marketing Strategies of Your Competitors ...
Infer and LeanData - Host Analytics Customer Case Study
Online Marketing Overview
The five essential steps to building a data product
How to Break Into Page 1 of the SERPs
How to Scale and Grow your Enterprise Technical SEO Strategy
Google Analytics: Advanced Technical Implementation
Stamats: Analytics Webinar
Lucidworks & IMRG Webinar – Best-In-Class Retail Product Discovery
4 Steps to ABM Success with Predictive Analytics
Content Marketing: Case Studies and Strategies for Success
The Hidden Potential Of Brand PPC - BrightonSEO 2018 - Daniel Moore
Testing: A discussion about SAP's 27% lift in incremental sales leads
Conquering the perfect storm share[1]
The Nuts and Bolts: How one company implements an entire testing methodology ...
Ad

Viewers also liked (20)

PDF
Unlock the Magic of PPC Segmentation
PPTX
HR Analytics, Done Right
PPTX
Introduction to Machine Learning
PDF
Google Analytics Overview
PDF
Bagging Decision Trees on Data Sets with Classification Noise
PDF
Applications in Machine Learning
PPTX
Machine Learning @ Mendeley
PDF
Strata 2013: Tutorial-- How to Create Predictive Models in R using Ensembles
PPTX
Applications of Machine Learning
PDF
Making Machine Learning Work in Practice - StampedeCon 2014
PDF
Visualization and Machine Learning - for exploratory data ...
PDF
Predictive Modeling with Enterprise Miner
PDF
Mohan Chaddha - Machine Learning & Content Marketing
PDF
Marketing Analytics with R Lifting Campaign Success Rates
PDF
Amazon machine leaning の紹介
PPTX
Basic of influencer marketing
PDF
Data Visualisation Literacy - Learning to See
PPTX
Comment l'intelligence artificielle améliore la recherche documentaire
PPTX
Application of machine learning in industrial applications
PDF
Financial security and machine learning
Unlock the Magic of PPC Segmentation
HR Analytics, Done Right
Introduction to Machine Learning
Google Analytics Overview
Bagging Decision Trees on Data Sets with Classification Noise
Applications in Machine Learning
Machine Learning @ Mendeley
Strata 2013: Tutorial-- How to Create Predictive Models in R using Ensembles
Applications of Machine Learning
Making Machine Learning Work in Practice - StampedeCon 2014
Visualization and Machine Learning - for exploratory data ...
Predictive Modeling with Enterprise Miner
Mohan Chaddha - Machine Learning & Content Marketing
Marketing Analytics with R Lifting Campaign Success Rates
Amazon machine leaning の紹介
Basic of influencer marketing
Data Visualisation Literacy - Learning to See
Comment l'intelligence artificielle améliore la recherche documentaire
Application of machine learning in industrial applications
Financial security and machine learning
Ad

Similar to Machine Learning with R and Tableau (20)

PDF
Business Analytics Decision Tree in R
PDF
Webinar : Introduction to R Programming and Machine Learning
PDF
"Introduction to R Programming and Machine Learning"
PDF
Insider's introduction to microsoft azure machine learning: 201411 Seattle Bu...
PDF
Business Analytics with R
PPTX
IMPLEMENTATION OF MACHINE LEARNING IN E-COMMERCE & BEYOND
PDF
Linear Regression With R
PDF
Introduction To R
PPTX
Azure machine learning ile tahminleme modelleri
PPTX
Machine learning
PDF
Operationalizing R with Azure ML
PDF
Intro to R and Data Mining 2012 09 27
PDF
An Introduction to Data Mining with R
DOCX
Tableau Course Content.docx
PDF
Machine learning e book all chapters.pdf
PDF
Data Science : Make Smarter Business Decisions
PPTX
ML for DS.pptx
PDF
Robert Luong: Analyse prédictive dans Excel
PPTX
Machine learning101 v1.2
 
PDF
Machine_Learning_with_MATLAB_Seminar_Latest.pdf
Business Analytics Decision Tree in R
Webinar : Introduction to R Programming and Machine Learning
"Introduction to R Programming and Machine Learning"
Insider's introduction to microsoft azure machine learning: 201411 Seattle Bu...
Business Analytics with R
IMPLEMENTATION OF MACHINE LEARNING IN E-COMMERCE & BEYOND
Linear Regression With R
Introduction To R
Azure machine learning ile tahminleme modelleri
Machine learning
Operationalizing R with Azure ML
Intro to R and Data Mining 2012 09 27
An Introduction to Data Mining with R
Tableau Course Content.docx
Machine learning e book all chapters.pdf
Data Science : Make Smarter Business Decisions
ML for DS.pptx
Robert Luong: Analyse prédictive dans Excel
Machine learning101 v1.2
 
Machine_Learning_with_MATLAB_Seminar_Latest.pdf

More from Kayden Kelly (9)

PDF
Advanced Keyword Research - SMX London
PDF
Google Analytics Campaign Tracking Fundamentals
PDF
Segmentation is SEXY! Aggregates & Averages Lie
PDF
From Analytics to Analysis to Action - GA Event, San Francisco 2011
PDF
Google Analytics Standard Presentation - GA Event, San Francisco 2011
PDF
Google Analytics Segmentation Visualization Customization, GA Event - San Fra...
PPT
SMX West 2010 - Conversion Optimization Tips
PPT
Radically Improve Conversion Rates - eMSF 2009
PPT
Google Website Optimizer API integration with Motivity
Advanced Keyword Research - SMX London
Google Analytics Campaign Tracking Fundamentals
Segmentation is SEXY! Aggregates & Averages Lie
From Analytics to Analysis to Action - GA Event, San Francisco 2011
Google Analytics Standard Presentation - GA Event, San Francisco 2011
Google Analytics Segmentation Visualization Customization, GA Event - San Fra...
SMX West 2010 - Conversion Optimization Tips
Radically Improve Conversion Rates - eMSF 2009
Google Website Optimizer API integration with Motivity

Recently uploaded (20)

PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
assetexplorer- product-overview - presentation
PPTX
history of c programming in notes for students .pptx
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Digital Strategies for Manufacturing Companies
PPTX
Transform Your Business with a Software ERP System
PPTX
ai tools demonstartion for schools and inter college
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
How to Migrate SBCGlobal Email to Yahoo Easily
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Design an Analysis of Algorithms I-SECS-1021-03
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
CHAPTER 2 - PM Management and IT Context
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Operating system designcfffgfgggggggvggggggggg
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Wondershare Filmora 15 Crack With Activation Key [2025
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
assetexplorer- product-overview - presentation
history of c programming in notes for students .pptx
Upgrade and Innovation Strategies for SAP ERP Customers
Digital Strategies for Manufacturing Companies
Transform Your Business with a Software ERP System
ai tools demonstartion for schools and inter college
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free

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