Business Analytics with 'R' at Edureka will prepare you to perform analytics and build models for real world data science problems. It is the world’s most powerful programming language for statistical computing and graphics making it a must know language for the aspiring Data Scientists. 'R' wins strongly on Statistical Capability, Graphical capability, Cost and rich set of packages. The following blog will help you understand the significance of R Analytics training:
www.edureka.co/blog/r-training-first-step-to-become-a-data-scientist/
2. 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
3. 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
4. Slide 4Slide 4 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Business Analytics(BA)
Refers to the skills, technologies, practices for iterative study and investigation of historical business data to
gain insight and drive business planning
Study of data through statistical and operations analysis
Makes use of past data and statistical methods to understand business performance and hence makes us
take necessary steps to improve it
Injects intelligence into the business planning
Intersection of business and technology
5. Slide 5Slide 5 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
6. Slide 6Slide 6 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
7. Slide 7Slide 7 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Knowledge discovery and data mining ( KDD)
Stages of Analytics / Data Mining
8. Slide 8Slide 8 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
What is R : Programming Language
You do data analysis in R by writing scripts and functions
in the R programming language.
R has also quickly found the following because
statisticians, engineers and scientists without computer
programming skills find it easy to use.
R is Programming Language
9. Slide 9Slide 9 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
What is R : Data Analysis Software
Data Scientists, Statisticians, Analysts, Quants, and
others who need to make sense of data use R for
statistical analysis, data visualization, and
predictive modelling.
Rexer Analytics’s Annual Data Miner Survey is the
largest survey of data mining, data science, and
analytics professionals in the industry.
It has concluded that R's popularity has increased
substantially in recent years.
R is Data Analysis Software
10. Slide 10Slide 10 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
What is R : Environment for Statistical Analysis
R language consists of functions for almost every
data manipulation, statistical model, or chart that a
data analyst could ever need.
For statisticians, however, R is particularly useful
because it contains a number of built-in mechanisms
for organizing data, running calculations on the
information and creating graphical representations of
data sets.
R is Environment for Statistical Analysis
11. Slide 11Slide 11 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
12. Slide 12Slide 12 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Data Visualization in R
This 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.
13. Slide 13Slide 13 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
14. Slide 14Slide 14 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Machine Learning
We have so many algorithms for data mining which can be used to build systems that can read past data and can
generate a system that can accommodate any future data and derive useful insight from it
Such set of algorithms comes under machine learning
Machine learning focuses on the development of computer programs that can teach themselves to grow and change
when exposed to new data
Train data
ML
model
Algorithms
15. Slide 15Slide 15 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
16. www.edureka.co/r-for-analyticsSlide 16 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
17. www.edureka.co/r-for-analyticsSlide 17 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
What is Clustering?
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
19. www.edureka.in/hadoopSlide 19
K-Means Clustering
The process by which objects are classified into
a number of groups so that they are as much
dissimilar as possible from one group to another
group, but as much similar as possible within
each group.
The objects in group 1 should be as similar as
possible.
But there should be much difference between an
object in group 1 and group 2.
The attributes of the objects are allowed to
determine which objects should be grouped
together.
Total population
Group 1
Group 2 Group 3
Group 4
20. www.edureka.co/r-for-analyticsSlide 20 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
How it works
1. Given n object set, randomly initialize k cluster centers from the existing set
2. Assign the objects from the set to these randomly selected cluster center based on closets Euclidean distance
from the center.
3. Set the position of each cluster to the mean of all data points belonging to that cluster
4. Repeat steps 2-3 until cluster center changes no more and cluster size remains constant
21. www.edureka.co/r-for-analyticsSlide 21 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
We have marks of 17 students in a class. Their ratings are :
{1,2,2,4,5,6,6,7,8,10,10,11,11,12,13,13,13}
Group the students in three categories i.e. good, average and bad.
K-means example with one dimensional data
22. www.edureka.co/r-for-analyticsSlide 22 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Randomly initialize 3 cluster centers:
Iteration 1
Good
(centroid=3)
Average
(centroid=2)
Bad
(centroid=1)
4,5,6,6,7,8,
10,10,11,11,
12,13,13,13
2,2 1
23. www.edureka.co/r-for-analyticsSlide 23 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Iteration 1 summary
Cluster 1 (Good):
No 0f items = 14
Sum of items = 129
mean = 129/14 = 9
Cluster 1 (Average):
No 0f items = 2
Sum of items = 4
mean = 4/2 = 2
Cluster 1 (Bad):
No 0f items = 1
Sum of items = 1
mean = 1/1 = 1
Change
detected
Good Average Bad
(centroid=9) (centroid=2) (centroid=1)
New cluster center after iteration 1
24. www.edureka.co/r-for-analyticsSlide 24 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Good
(centroid=9)
Average
(centroid=2)
Bad
(centroid=1)
6,6,7,8,
10,10,11,11,
12,13,13,13
2,2,4,5 1
Iteration 2
25. www.edureka.co/r-for-analyticsSlide 25 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Cluster 1 (Good):
No 0f items = 12
Sum of items = 120
mean = 120/12 = 10
Cluster 1 (Average):
No 0f items = 4
Sum of items = 13
mean = 13/4= 3
Cluster 1 (Bad):
No 0f items = 1
Sum of items = 1
mean = 1/1 = 1
Change
detected
Good Average Bad
(centroid=10) (centroid=3) (centroid=1)
New cluster center after iteration 2
Change
detected
Iteration 2 summary
26. www.edureka.co/r-for-analyticsSlide 26 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Good
(centroid=10)
Average
(centroid=3)
Bad
(centroid=1)
7,8,
10,10,11,11,
12,13,13,13
6,6,2,2,4,5 1
Iteration 3
27. www.edureka.co/r-for-analyticsSlide 27 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Cluster 1 (Good):
No 0f items = 10
Sum of items = 108
mean = 108/11 = 11
Cluster 1 (Average):
No 0f items = 6
Sum of items = 25
mean = 13/4= 4
Cluster 1 (Bad):
No 0f items = 1
Sum of items = 1
mean = 1/1 = 1
Change
detected
Good Average Bad
(centroid=11) (centroid=4) (centroid=1)
New cluster center after iteration 3
Change
detected
Iteration 3 summary
28. www.edureka.co/r-for-analyticsSlide 28 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Good
(centroid=11)
Average
(centroid=4)
Bad
(centroid=1)
8,
10,10,11,11,
12,13,13,13
7,6,6,4,5 1,2,2
Iteration 4 summary
29. www.edureka.co/r-for-analyticsSlide 29 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Cluster 1 (Good):
No 0f items = 9
Sum of items = 101
mean = 108/11 = 11
Cluster 1 (Average):
No 0f items = 5
Sum of items = 28
mean = 28/5= 6
Cluster 1 (Bad):
No 0f items = 3
Sum of items = 5
mean = 5/3 = 2
No Change
detected
Good Average Bad
(centroid=11) (centroid=6) (centroid=2)
New cluster center after iteration 4
Change
detected
Change
detected
Iteration 4 summary
30. www.edureka.co/r-for-analyticsSlide 30 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Good
(centroid=11)
Average
(centroid=6)
Bad
(centroid=2)
10,10,
11,11,
12,13,13,13
8,7,6,6,4,5 1,2,2
Iteration 5
31. www.edureka.co/r-for-analyticsSlide 31 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Cluster 1 (Good):
No 0f items = 8
Sum of items = 93
mean = 93/8 = 12
Cluster 1 (Average):
No 0f items = 6
Sum of items = 36
mean = 36/6= 6
Cluster 1 (Bad):
No 0f items = 3
Sum of items = 5
mean = 5/3 = 2
Change
detected
Good Average Bad
(centroid=12) (centroid=6) (centroid=2)
New cluster center after iteration 5
No Change
detected
No Change
detected
Iteration 5 summary
32. www.edureka.co/r-for-analyticsSlide 32 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Good
(centroid=12)
Average
(centroid=6)
Bad
(centroid=2)
10,10,
11,11,
12,13,13,13
8,7,6,6,4,5 1,2,2
Iteration 6
33. www.edureka.co/r-for-analyticsSlide 33 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Cluster 1 (Good):
No 0f items = 8
Sum of items = 93
mean = 93/8 = 12
Cluster 1 (Average):
No 0f items = 6
Sum of items = 36
mean = 36/6= 6
Cluster 1 (Bad):
No 0f items = 3
Sum of items = 5
mean = 5/3 = 2
No Change
detected
Good Average Bad
(centroid=12) (centroid=6) (centroid=2)
New cluster center after iteration 6
No Change
detected
No Change
detected
Iteration 6 summary
35. Slide 35Slide 35 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Use Cases
36. Slide 36 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Demo
More Information on R setup and applications at:
http://www.edureka.in/blog/category/business-analytics-with-r/
37. Slide 37 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