SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
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

Contenu connexe

En vedette

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
 

En vedette (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
 

Dernier

Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Anthony Dahanne
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
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
 
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
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
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
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profileakrivarotava
 
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
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 

Dernier (20)

Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
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
 
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
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
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...
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profile
 
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 ...
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 

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