business analytics decision tree in r
TRANSCRIPT
www.edureka.co/r-for-analytics
View Business Analytics with R course details at www.edureka.co/r-for-analytics
Business Analytics with R
www.edureka.co/r-for-analyticsSlide 2 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Objectives
What is data mining
What is Business Analytics
Stages of Analytics / data mining
What is R
overview of Machine Learning
What is Clustering
What is K-means Clustering
Use-case
At the end of this session, you will be able to
Slide 3Slide 3 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Data mining ??
Generally, data mining is the process of studying data from maximum possible dimensions and summarizing it into
useful information
Technically, data mining is the process of finding correlations or patterns among dozens of fields in large data
generated from business
Or you can say, data mining is the process finding useful information from the data and then devising knowledge
out of it for improving future of our business
» Data ??
Data are any facts, numbers, or text is getting produced by existing system
» Information ??
The patterns, associations, or relationships among all this data can provide information
» Knowledge ??
Information can be converted into knowledge about historical patterns and future trends. For example summary of
sales in off season may help to start some offers in that period to increase sales
Slide 4Slide 4 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Business Analytics
Why Business Analytics is getting popular these days ?
Cost of storing data Cost of processing data
Slide 5Slide 5 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Cross Industry standard Process for data mining ( CRISP – DM )
Stages of Analytics / Data Mining
Slide 6Slide 6 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
What is R
R is Programming Language
R is Environment for Statistical Analysis
R is Data Analysis Software
Slide 7Slide 7 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
R : Characteristics
Effective and fast data handling and storage facility
A bunch of operators for calculations on arrays, lists, vectors etc
A large integrated collection of tools for data analysis, and visualization
Facilities for data analysis using graphs and display either directly at the computer or paper
A well implemented and effective programming language called ‘S’ on top of which R is built
A complete range of packages to extend and enrich the functionality of R
Slide 8Slide 8 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Data Visualization in RThis plot represents the
locations of all the traffic signals in the city.
It is recognizable as Toronto without any other geographic data being plotted - the structure of the city comes out in the data alone.
Slide 9Slide 9 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Who Uses R : Domains
Telecom
Pharmaceuticals
Financial Services
Life Sciences
Education, etc
Slide 10Slide 10 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Types of Learning
Supervised Learning Unsupervised Learning
1. Uses a known dataset to make predictions.
2. The training dataset includes input data and response values.
3. From it, the supervised learning algorithm builds a model to make predictions of the response values for a new dataset.
1. Draw inferences from datasets consisting of input data without labeled responses.
2. Used for exploratory data analysis to find hidden patterns or grouping in data
3. The most common unsupervised learning method is cluster analysis.
Machine Learning
www.edureka.co/r-for-analyticsSlide 11 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Common Machine Learning Algorithms
Types of Learning
Supervised Learning
Unsupervised Learning
Algorithms
Naïve Bayes Support Vector Machines Random Forests Decision Trees
Algorithms
K-means
Fuzzy Clustering
Hierarchical Clustering
Gaussian mixture models
Self-organizing maps
www.edureka.co/r-for-analyticsSlide 12 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
What is Decision Trees?
Organizing data into clusters such that there is:
High intra-cluster similarity Low inter-cluster similarity Informally, finding natural groupings among objects
http://en.wikipedia.org/wiki/Cluster_analysis
www.edureka.co/r-for-analyticsSlide 13 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Decision Trees
www.edureka.co/r-for-analyticsSlide 14 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
What is Decision Trees??
www.edureka.co/r-for-analyticsSlide 15 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
How to Build Decision Trees??
www.edureka.co/r-for-analyticsSlide 16 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Algorithm for Decision Tree Induction
www.edureka.co/r-for-analyticsSlide 17 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Decision Tree Example??
www.edureka.co/r-for-analyticsSlide 18 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Decision Tree 1: Root “student”
www.edureka.co/r-for-analyticsSlide 19 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Decision Tree 1: Root “student”
www.edureka.co/r-for-analyticsSlide 20 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Decision Tree 1: Root “student”
www.edureka.co/r-for-analyticsSlide 21 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Decision Tree 1: Root “student”
www.edureka.co/r-for-analyticsSlide 22 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Decision Tree 1: Root “student”
www.edureka.co/r-for-analyticsSlide 23 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Decision Tree 1: Root “student”
www.edureka.co/r-for-analyticsSlide 24 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Decision Tree 1: Root “student”
www.edureka.co/r-for-analyticsSlide 25 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Decision Tree 2: Root “Income”
www.edureka.co/r-for-analyticsSlide 26 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Decision Tree 2: Root “Income”
www.edureka.co/r-for-analyticsSlide 27 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Decision Tree 2: Root “Income”
www.edureka.co/r-for-analyticsSlide 28 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Decision Tree 2: Root “Income”
www.edureka.co/r-for-analyticsSlide 29 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Decision Tree 2: Root “Income”
www.edureka.co/r-for-analyticsSlide 30 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Decision Tree 2: Root “Income”
www.edureka.co/r-for-analyticsSlide 31 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Decision Tree 2: Root “Income”
Slide 32Slide 32 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Decision Trees Case-study
Slide 33Slide 33 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Let’s consider a Company dataset with around 10 variables and 400 records.
The attributes are as follows:
Sales
Competitor Price
Income
Advertising
Population
Price
Shelf Location at stores
Age
Education
Urban
US
About the data:
Slide 34Slide 34 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
The company dataset looks like this:
Problem Statement:
A cloth manufacturing company is interested to know about the segment or attributes causes high sale.
Approach - A decision tree can be built with target variable Sale (we will first convert it in categorical variable) & all other variable will be independent in the analysis.
Slide 35 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
DemoMore Information on R setup and applications at:
http://www.edureka.in/blog/category/business-analytics-with-r/
Slide 36 www.edureka.co/r-for-analytics
Module 1 » Introduction to Business Analytics
Module 2» Introduction to R Programming
Module 3» Data Manipulation in R
Module 4» Data Import Techniques in R
Module 5 » Exploratory Data Analysis
Module 6» Data Visualization in R
Course Topics
Module 7» Data mining: Clustering Techniques
Module 8» Data Mining: Association rule mining and
Sentiment analysis
Module 9» Linear and Logistic Regression
Module 10» Annova and Predictive Analysis
Module 11» Data Mining: Decision Trees and Random forest
Module 12» Final Project Business Analytics with R class –
Census Data
Slide 37 www.edureka.co/r-for-analytics