business analytics with r

Post on 12-Apr-2017

889 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

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

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

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

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

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

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

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 adata 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

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

Slide 12Slide 12 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 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

Slide 14Slide 14 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions

Machine LearningWe 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

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

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

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

www.edureka.co/r-for-analyticsSlide 18 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions

K-means Clustering

www.edureka.in/hadoopSlide 19

K-Means Clustering

The process by which objects are classified intoa number of groups so that they are as muchdissimilar as possible from one group to anothergroup, but as much similar as possible withineach group.

The objects in group 1 should be as similar aspossible.

But there should be much difference between anobject in group 1 and group 2.

The attributes of the objects are allowed todetermine which objects should be groupedtogether.

Total population

Group 1

Group 2 Group 3

Group 4

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

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

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

www.edureka.co/r-for-analyticsSlide 23 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions

Iteration 1 summary

Cluster 1 (Good):

No 0f items = 14Sum of items = 129mean = 129/14 = 9

Cluster 1 (Average):

No 0f items = 2Sum of items = 4mean = 4/2 = 2

Cluster 1 (Bad):

No 0f items = 1Sum of items = 1mean = 1/1 = 1

Change detected

Good Average Bad(centroid=9) (centroid=2) (centroid=1)

New cluster center after iteration 1

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

www.edureka.co/r-for-analyticsSlide 25 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions

Cluster 1 (Good):

No 0f items = 12Sum of items = 120mean = 120/12 = 10

Cluster 1 (Average):

No 0f items = 4Sum of items = 13mean = 13/4= 3

Cluster 1 (Bad):

No 0f items = 1Sum of items = 1mean = 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

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

www.edureka.co/r-for-analyticsSlide 27 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions

Cluster 1 (Good):

No 0f items = 10Sum of items = 108mean = 108/11 = 11

Cluster 1 (Average):

No 0f items = 6Sum of items = 25mean = 13/4= 4

Cluster 1 (Bad):

No 0f items = 1Sum of items = 1mean = 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

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

www.edureka.co/r-for-analyticsSlide 29 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions

Cluster 1 (Good):

No 0f items = 9Sum of items = 101mean = 108/11 = 11

Cluster 1 (Average):

No 0f items = 5Sum of items = 28mean = 28/5= 6

Cluster 1 (Bad):

No 0f items = 3Sum of items = 5mean = 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

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,138,7,6,6,4,5 1,2,2

Iteration 5

www.edureka.co/r-for-analyticsSlide 31 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions

Cluster 1 (Good):

No 0f items = 8Sum of items = 93mean = 93/8 = 12

Cluster 1 (Average):

No 0f items = 6Sum of items = 36mean = 36/6= 6

Cluster 1 (Bad):

No 0f items = 3Sum of items = 5mean = 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

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,138,7,6,6,4,5 1,2,2

Iteration 6

www.edureka.co/r-for-analyticsSlide 33 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions

Cluster 1 (Good):

No 0f items = 8Sum of items = 93mean = 93/8 = 12

Cluster 1 (Average):

No 0f items = 6Sum of items = 36mean = 36/6= 6

Cluster 1 (Bad):

No 0f items = 3Sum of items = 5mean = 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

www.edureka.co/r-for-analyticsSlide 34 Twitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions

GOOd

Avg

Bad

10 1011

11

12

13

13

13

4

5

6

6

7

8

1

2

2

Slide 35Slide 35 www.edureka.co/r-for-analyticsTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions

Use Cases

Slide 36 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 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

Slide 38 www.edureka.co/r-for-analytics

top related