SlideShare uma empresa Scribd logo
1 de 18
Baixar para ler 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

Mais conteúdo relacionado

Destaque

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
 

Destaque (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
 

Último

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
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
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptrcbcrtm
 

Último (20)

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
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
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.ppt
 

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