1.0 Defining the Question

Kira Plastinina is a Russian brand that is sold through a defunct chain of retail stores in Russia, Ukraine, Kazakhstan, Belarus, China, Philippines, and Armenia. The brand’s Sales and Marketing team would like to understand their customer’s behavior from data that they have collected over the past year. More specifically, they would like to learn the characteristics of customer groups.

Data provided

Dataset Url = http://bit.ly/EcommerceCustomersDataset

Data grossary

‘Revenue’ attribute can be used as the class label

“Administrative”, “Administrative Duration”, “Informational”, “Informational Duration”, “Product Related” and “Product Related Duration” represents the number of different types of pages visited by the visitor in that session and total time spent in each of these page categories. The values of these features are derived from the URL information of the pages visited by the user and updated in real-time when a user takes an action, e.g. moving from one page to another.

“Bounce Rate”, “Exit Rate” and “Page Value” features represent the metrics measured by “Google Analytics” for each page in the e-commerce site.

“Bounce Rate” feature for a web page refers to the percentage of visitors who enter the site from that page and then leave (“bounce”) without triggering any other requests to the analytics server during that session.

“Exit Rate” feature for a specific web page is calculated as for all pageviews to the page, the percentage that was the last in the session.

“Page Value” feature represents the average value for a web page that a user visited before completing an e-commerce transaction.

“Special Day” feature indicates the closeness of the site visiting time to a specific special day (e.g. Mother’s Day, Valentine’s Day) in which the sessions are more likely to be finalized with the transaction. The value of this attribute is determined by considering the dynamics of e-commerce such as the duration between the order date and delivery date. For example, for Valentine’s day, this value takes a nonzero value between February 2 and February 12, zero before and after this date unless it is close to another special day, and its maximum value of 1 on February 8.

The dataset also includes the operating system, browser, region, traffic type, visitor type as returning or new visitor, a Boolean value indicating whether the date of the visit is weekend, and month of the year.

1.1 Specifying the data analytic

Use clustering (K-Means and Hierarchical) to group customers according to their behavior.

1.2 Defining the metric for success

Identify individuals that are likely to click on the add after performing exploratory data analysis

1.3 Understanding the Context

A Kenyan entrepreneur has created an online cryptography course and would want to advertise it on her blog. She currently targets audiences originating from various countries. In the past, she ran ads to advertise a related course on the same blog and collected data in the process.

1.4 Recording the Experimental

1.Data Loading

2.Data cleaning for missing values and outliers

3.Exploratory Data Analysis

  1. Perform clustering stating insights drawn from your analysis and visualizations.

  2. Upon implementation, provide comparisons between the approaches learned this week i.e. K-Means clustering vs Hierarchical clustering highlighting the strengths and limitations of each approach in the context of your analysis

6.Conclusion-Detecting the trend in behavior.

1.5 Assessing the Relevance of the Data

The dataset provided has ecommerce data and it is genuine.

2.0 Importing package

## 2.0 Importing packages
#
#importing libraries
#
#install.packages("caret")
#loading the library
library(data.table) # load package
#install.packages(c("Rcpp","tidyverse")) # install packages to work with data frame - extends into visualization
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v ggplot2 3.3.3     v purrr   0.3.4
## v tibble  3.1.2     v dplyr   1.0.6
## v tidyr   1.1.3     v stringr 1.4.0
## v readr   1.4.0     v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::between()   masks data.table::between()
## x dplyr::filter()    masks stats::filter()
## x dplyr::first()     masks data.table::first()
## x dplyr::lag()       masks stats::lag()
## x dplyr::last()      masks data.table::last()
## x purrr::transpose() masks data.table::transpose()
library("caret")
## Loading required package: lattice
## 
## Attaching package: 'caret'
## The following object is masked from 'package:purrr':
## 
##     lift

##2.1 Importing dataset

# Dataset Url = http://bit.ly/EcommerceCustomersDataset
# Importing our dataset
# ---
#
customer_dataset <- read.csv('http://bit.ly/EcommerceCustomersDataset')

# Previewing the dataset
# ---
#having a look at the dataset 
head(customer_dataset,6)
##   Administrative Administrative_Duration Informational Informational_Duration
## 1              0                       0             0                      0
## 2              0                       0             0                      0
## 3              0                      -1             0                     -1
## 4              0                       0             0                      0
## 5              0                       0             0                      0
## 6              0                       0             0                      0
##   ProductRelated ProductRelated_Duration BounceRates ExitRates PageValues
## 1              1                0.000000  0.20000000 0.2000000          0
## 2              2               64.000000  0.00000000 0.1000000          0
## 3              1               -1.000000  0.20000000 0.2000000          0
## 4              2                2.666667  0.05000000 0.1400000          0
## 5             10              627.500000  0.02000000 0.0500000          0
## 6             19              154.216667  0.01578947 0.0245614          0
##   SpecialDay Month OperatingSystems Browser Region TrafficType
## 1          0   Feb                1       1      1           1
## 2          0   Feb                2       2      1           2
## 3          0   Feb                4       1      9           3
## 4          0   Feb                3       2      2           4
## 5          0   Feb                3       3      1           4
## 6          0   Feb                2       2      1           3
##         VisitorType Weekend Revenue
## 1 Returning_Visitor   FALSE   FALSE
## 2 Returning_Visitor   FALSE   FALSE
## 3 Returning_Visitor   FALSE   FALSE
## 4 Returning_Visitor   FALSE   FALSE
## 5 Returning_Visitor    TRUE   FALSE
## 6 Returning_Visitor   FALSE   FALSE

Previewing the dataset

#viewing the dataset
#
View(customer_dataset)

observation: 12,330 records and 18 total columns.

checking the colunms summary

# checking the content/summary statistics of each column.
str(customer_dataset)
## 'data.frame':    12330 obs. of  18 variables:
##  $ Administrative         : int  0 0 0 0 0 0 0 1 0 0 ...
##  $ Administrative_Duration: num  0 0 -1 0 0 0 -1 -1 0 0 ...
##  $ Informational          : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ Informational_Duration : num  0 0 -1 0 0 0 -1 -1 0 0 ...
##  $ ProductRelated         : int  1 2 1 2 10 19 1 1 2 3 ...
##  $ ProductRelated_Duration: num  0 64 -1 2.67 627.5 ...
##  $ BounceRates            : num  0.2 0 0.2 0.05 0.02 ...
##  $ ExitRates              : num  0.2 0.1 0.2 0.14 0.05 ...
##  $ PageValues             : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ SpecialDay             : num  0 0 0 0 0 0 0.4 0 0.8 0.4 ...
##  $ Month                  : chr  "Feb" "Feb" "Feb" "Feb" ...
##  $ OperatingSystems       : int  1 2 4 3 3 2 2 1 2 2 ...
##  $ Browser                : int  1 2 1 2 3 2 4 2 2 4 ...
##  $ Region                 : int  1 1 9 2 1 1 3 1 2 1 ...
##  $ TrafficType            : int  1 2 3 4 4 3 3 5 3 2 ...
##  $ VisitorType            : chr  "Returning_Visitor" "Returning_Visitor" "Returning_Visitor" "Returning_Visitor" ...
##  $ Weekend                : logi  FALSE FALSE FALSE FALSE TRUE FALSE ...
##  $ Revenue                : logi  FALSE FALSE FALSE FALSE FALSE FALSE ...

observation: the dataset comprise of integer, numerical, categorical and logical datatypes.

displaying dataset dimension

### checking the dataset dimension(displaying the number of rows and columns).
dim(customer_dataset)
## [1] 12330    18
### checking our dataset class
class(customer_dataset)
## [1] "data.frame"

converting the data into a tibble for easy manupulation

#For ease in analysis,we convert the data into a tibble
df_dataset<-as_tibble(customer_dataset) # there is suggestion to use as_tibble instead of as.tibble.
df_dataset
## # A tibble: 12,330 x 18
##    Administrative Administrative_~ Informational Informational_D~ ProductRelated
##             <int>            <dbl>         <int>            <dbl>          <int>
##  1              0                0             0                0              1
##  2              0                0             0                0              2
##  3              0               -1             0               -1              1
##  4              0                0             0                0              2
##  5              0                0             0                0             10
##  6              0                0             0                0             19
##  7              0               -1             0               -1              1
##  8              1               -1             0               -1              1
##  9              0                0             0                0              2
## 10              0                0             0                0              3
## # ... with 12,320 more rows, and 13 more variables:
## #   ProductRelated_Duration <dbl>, BounceRates <dbl>, ExitRates <dbl>,
## #   PageValues <dbl>, SpecialDay <dbl>, Month <chr>, OperatingSystems <int>,
## #   Browser <int>, Region <int>, TrafficType <int>, VisitorType <chr>,
## #   Weekend <lgl>, Revenue <lgl>

###checking dataset summary

### dataset summary 
summary(df_dataset)
##  Administrative   Administrative_Duration Informational   
##  Min.   : 0.000   Min.   :  -1.00         Min.   : 0.000  
##  1st Qu.: 0.000   1st Qu.:   0.00         1st Qu.: 0.000  
##  Median : 1.000   Median :   8.00         Median : 0.000  
##  Mean   : 2.318   Mean   :  80.91         Mean   : 0.504  
##  3rd Qu.: 4.000   3rd Qu.:  93.50         3rd Qu.: 0.000  
##  Max.   :27.000   Max.   :3398.75         Max.   :24.000  
##  NA's   :14       NA's   :14              NA's   :14      
##  Informational_Duration ProductRelated   ProductRelated_Duration
##  Min.   :  -1.00        Min.   :  0.00   Min.   :   -1.0        
##  1st Qu.:   0.00        1st Qu.:  7.00   1st Qu.:  185.0        
##  Median :   0.00        Median : 18.00   Median :  599.8        
##  Mean   :  34.51        Mean   : 31.76   Mean   : 1196.0        
##  3rd Qu.:   0.00        3rd Qu.: 38.00   3rd Qu.: 1466.5        
##  Max.   :2549.38        Max.   :705.00   Max.   :63973.5        
##  NA's   :14             NA's   :14       NA's   :14             
##   BounceRates         ExitRates         PageValues        SpecialDay     
##  Min.   :0.000000   Min.   :0.00000   Min.   :  0.000   Min.   :0.00000  
##  1st Qu.:0.000000   1st Qu.:0.01429   1st Qu.:  0.000   1st Qu.:0.00000  
##  Median :0.003119   Median :0.02512   Median :  0.000   Median :0.00000  
##  Mean   :0.022152   Mean   :0.04300   Mean   :  5.889   Mean   :0.06143  
##  3rd Qu.:0.016684   3rd Qu.:0.05000   3rd Qu.:  0.000   3rd Qu.:0.00000  
##  Max.   :0.200000   Max.   :0.20000   Max.   :361.764   Max.   :1.00000  
##  NA's   :14         NA's   :14                                           
##     Month           OperatingSystems    Browser           Region     
##  Length:12330       Min.   :1.000    Min.   : 1.000   Min.   :1.000  
##  Class :character   1st Qu.:2.000    1st Qu.: 2.000   1st Qu.:1.000  
##  Mode  :character   Median :2.000    Median : 2.000   Median :3.000  
##                     Mean   :2.124    Mean   : 2.357   Mean   :3.147  
##                     3rd Qu.:3.000    3rd Qu.: 2.000   3rd Qu.:4.000  
##                     Max.   :8.000    Max.   :13.000   Max.   :9.000  
##                                                                      
##   TrafficType    VisitorType         Weekend         Revenue       
##  Min.   : 1.00   Length:12330       Mode :logical   Mode :logical  
##  1st Qu.: 2.00   Class :character   FALSE:9462      FALSE:10422    
##  Median : 2.00   Mode  :character   TRUE :2868      TRUE :1908     
##  Mean   : 4.07                                                     
##  3rd Qu.: 4.00                                                     
##  Max.   :20.00                                                     
## 

3.0 Data cleaning

###3.0a missing values

# Identify missing data in our entire dataset using is.na() function
#

colSums(is.na(df_dataset))
##          Administrative Administrative_Duration           Informational 
##                      14                      14                      14 
##  Informational_Duration          ProductRelated ProductRelated_Duration 
##                      14                      14                      14 
##             BounceRates               ExitRates              PageValues 
##                      14                      14                       0 
##              SpecialDay                   Month        OperatingSystems 
##                       0                       0                       0 
##                 Browser                  Region             TrafficType 
##                       0                       0                       0 
##             VisitorType                 Weekend                 Revenue 
##                       0                       0                       0

###3.0b Checking for missing values using the complete function

# using complete function 
df_dataset[!complete.cases(df_dataset),]
## # A tibble: 14 x 18
##    Administrative Administrative_~ Informational Informational_D~ ProductRelated
##             <int>            <dbl>         <int>            <dbl>          <int>
##  1             NA               NA            NA               NA             NA
##  2             NA               NA            NA               NA             NA
##  3             NA               NA            NA               NA             NA
##  4             NA               NA            NA               NA             NA
##  5             NA               NA            NA               NA             NA
##  6             NA               NA            NA               NA             NA
##  7             NA               NA            NA               NA             NA
##  8             NA               NA            NA               NA             NA
##  9             NA               NA            NA               NA             NA
## 10             NA               NA            NA               NA             NA
## 11             NA               NA            NA               NA             NA
## 12             NA               NA            NA               NA             NA
## 13             NA               NA            NA               NA             NA
## 14             NA               NA            NA               NA             NA
## # ... with 13 more variables: ProductRelated_Duration <dbl>, BounceRates <dbl>,
## #   ExitRates <dbl>, PageValues <dbl>, SpecialDay <dbl>, Month <chr>,
## #   OperatingSystems <int>, Browser <int>, Region <int>, TrafficType <int>,
## #   VisitorType <chr>, Weekend <lgl>, Revenue <lgl>

observation: we have missing values in our dataset.

dealing with missing values

Before we can do anything about the missing values, we have to first confirm that we have more than sufficient records. A rule of thumb is to ensure that there are at least 5 records per variables (at least 5 rows for each column). We have 18 columns, so 18 times 5 is 900. Since we have way more than 900 records, it is safe and efficient to just drop these records with missing values.

#dropping missing values
df_dataset <- na.omit(df_dataset)
#
#comfirming no more missing values
colSums(is.na(df_dataset))
##          Administrative Administrative_Duration           Informational 
##                       0                       0                       0 
##  Informational_Duration          ProductRelated ProductRelated_Duration 
##                       0                       0                       0 
##             BounceRates               ExitRates              PageValues 
##                       0                       0                       0 
##              SpecialDay                   Month        OperatingSystems 
##                       0                       0                       0 
##                 Browser                  Region             TrafficType 
##                       0                       0                       0 
##             VisitorType                 Weekend                 Revenue 
##                       0                       0                       0

observations: all missing values were dropped.

#checking our dataset dimension after dropping missing values
dim(df_dataset)
## [1] 12316    18

observation: we have not lost too many records

3.1a Duplicated Data

#Identifying Duplicated Data
#
duplicated_rows <- df_dataset[duplicated(df_dataset),]
duplicated_rows
## # A tibble: 117 x 18
##    Administrative Administrative_~ Informational Informational_D~ ProductRelated
##             <int>            <dbl>         <int>            <dbl>          <int>
##  1              0                0             0                0              1
##  2              0                0             0                0              1
##  3              0                0             0                0              1
##  4              0                0             0                0              1
##  5              0                0             0                0              1
##  6              0                0             0                0              1
##  7              0                0             0                0              1
##  8              0                0             0                0              1
##  9              0                0             0                0              2
## 10              0                0             0                0              1
## # ... with 107 more rows, and 13 more variables: ProductRelated_Duration <dbl>,
## #   BounceRates <dbl>, ExitRates <dbl>, PageValues <dbl>, SpecialDay <dbl>,
## #   Month <chr>, OperatingSystems <int>, Browser <int>, Region <int>,
## #   TrafficType <int>, VisitorType <chr>, Weekend <lgl>, Revenue <lgl>

observation: a couple of colunms has duplicated values. checking further for the sum of duplicates

# checking for duplicated records
anyDuplicated(df_dataset)
## [1] 159

observation: there is a total of 159 duplicates in our dataset.

###dealing with the duplicates

# removing duplicates using unique () function
df_dataset <- unique(df_dataset)
#
#confirming no duplicates.
anyDuplicated(df_dataset)
## [1] 0

###checking the new dimension

#checking dataset dimension
dim(df_dataset)
## [1] 12199    18

observation: 159 duplicated records was removed to reduce redundancy. we now have 12199 records and 18 colunms.

###3.2 Outliers

installing outlier package and library

# installing outlier package
#install.packages("outliers")
#
library(outliers)

converting some clunms to categorical datatypes.

‘month’, ‘The OperatingSystems’, ‘Browser’, ‘Region’, and ‘TrafficType variables’, vistor type’ are categorical in nature and not numerical, they have already been encoded to make them easier to work with. also ‘Weekend’ and ‘Revenue’ columns. We will convert all of them to their appropriate data type.

#converting colunms to categorical datatypes
#
df_dataset$Month  <- as.factor(df_dataset$Month)
df_dataset$OperatingSystems <- as.factor(df_dataset$OperatingSystems)
df_dataset$Browser <- as.factor(df_dataset$Browser)
df_dataset$Region <- as.factor(df_dataset$Region)
df_dataset$TrafficType <- as.factor(df_dataset$TrafficType)
df_dataset$VisitorType  <- as.factor(df_dataset$VisitorType)
df_dataset$Weekend <- as.factor(df_dataset$Weekend)
df_dataset$Revenue <- as.factor(df_dataset$Revenue)

confirming the datatype changes

# confirming the data types changes
str(df_dataset)
## tibble [12,199 x 18] (S3: tbl_df/tbl/data.frame)
##  $ Administrative         : int [1:12199] 0 0 0 0 0 0 0 1 0 0 ...
##  $ Administrative_Duration: num [1:12199] 0 0 -1 0 0 0 -1 -1 0 0 ...
##  $ Informational          : int [1:12199] 0 0 0 0 0 0 0 0 0 0 ...
##  $ Informational_Duration : num [1:12199] 0 0 -1 0 0 0 -1 -1 0 0 ...
##  $ ProductRelated         : int [1:12199] 1 2 1 2 10 19 1 1 2 3 ...
##  $ ProductRelated_Duration: num [1:12199] 0 64 -1 2.67 627.5 ...
##  $ BounceRates            : num [1:12199] 0.2 0 0.2 0.05 0.02 ...
##  $ ExitRates              : num [1:12199] 0.2 0.1 0.2 0.14 0.05 ...
##  $ PageValues             : num [1:12199] 0 0 0 0 0 0 0 0 0 0 ...
##  $ SpecialDay             : num [1:12199] 0 0 0 0 0 0 0.4 0 0.8 0.4 ...
##  $ Month                  : Factor w/ 10 levels "Aug","Dec","Feb",..: 3 3 3 3 3 3 3 3 3 3 ...
##  $ OperatingSystems       : Factor w/ 8 levels "1","2","3","4",..: 1 2 4 3 3 2 2 1 2 2 ...
##  $ Browser                : Factor w/ 13 levels "1","2","3","4",..: 1 2 1 2 3 2 4 2 2 4 ...
##  $ Region                 : Factor w/ 9 levels "1","2","3","4",..: 1 1 9 2 1 1 3 1 2 1 ...
##  $ TrafficType            : Factor w/ 20 levels "1","2","3","4",..: 1 2 3 4 4 3 3 5 3 2 ...
##  $ VisitorType            : Factor w/ 3 levels "New_Visitor",..: 3 3 3 3 3 3 3 3 3 3 ...
##  $ Weekend                : Factor w/ 2 levels "FALSE","TRUE": 1 1 1 1 2 1 1 2 1 1 ...
##  $ Revenue                : Factor w/ 2 levels "FALSE","TRUE": 1 1 1 1 1 1 1 1 1 1 ...
##  - attr(*, "na.action")= 'omit' Named int [1:14] 1066 1133 1134 1135 1136 1137 1474 1475 1476 1477 ...
##   ..- attr(*, "names")= chr [1:14] "1066" "1133" "1134" "1135" ...

###3.2a Identifying the numeric class in the data and evaluating if there are any outliers

#
#Checking the data types of the columns
#
df_num<- df_dataset %>% select_if(is.numeric)
df_num
## # A tibble: 12,199 x 10
##    Administrative Administrative_~ Informational Informational_D~ ProductRelated
##             <int>            <dbl>         <int>            <dbl>          <int>
##  1              0                0             0                0              1
##  2              0                0             0                0              2
##  3              0               -1             0               -1              1
##  4              0                0             0                0              2
##  5              0                0             0                0             10
##  6              0                0             0                0             19
##  7              0               -1             0               -1              1
##  8              1               -1             0               -1              1
##  9              0                0             0                0              2
## 10              0                0             0                0              3
## # ... with 12,189 more rows, and 5 more variables:
## #   ProductRelated_Duration <dbl>, BounceRates <dbl>, ExitRates <dbl>,
## #   PageValues <dbl>, SpecialDay <dbl>

observation: there are 10 numerical colunms.

3.2b Checking for outliers

#checking outliers in numerical colunms
#
outlier(df_num)
##          Administrative Administrative_Duration           Informational 
##                 27.0000               3398.7500                 24.0000 
##  Informational_Duration          ProductRelated ProductRelated_Duration 
##               2549.3750                705.0000              63973.5222 
##             BounceRates               ExitRates              PageValues 
##                  0.2000                  0.2000                361.7637 
##              SpecialDay 
##                  1.0000

observation: we have outliers. However we will handle in univariate analysis.

##checking dataset summary after data cleaning

# getting the main summary
summary(df_dataset)
##  Administrative  Administrative_Duration Informational    
##  Min.   : 0.00   Min.   :  -1.00         Min.   : 0.0000  
##  1st Qu.: 0.00   1st Qu.:   0.00         1st Qu.: 0.0000  
##  Median : 1.00   Median :   9.00         Median : 0.0000  
##  Mean   : 2.34   Mean   :  81.68         Mean   : 0.5088  
##  3rd Qu.: 4.00   3rd Qu.:  94.75         3rd Qu.: 0.0000  
##  Max.   :27.00   Max.   :3398.75         Max.   :24.0000  
##                                                           
##  Informational_Duration ProductRelated   ProductRelated_Duration
##  Min.   :  -1.00        Min.   :  0.00   Min.   :   -1.0        
##  1st Qu.:   0.00        1st Qu.:  8.00   1st Qu.:  193.6        
##  Median :   0.00        Median : 18.00   Median :  609.5        
##  Mean   :  34.84        Mean   : 32.06   Mean   : 1207.5        
##  3rd Qu.:   0.00        3rd Qu.: 38.00   3rd Qu.: 1477.6        
##  Max.   :2549.38        Max.   :705.00   Max.   :63973.5        
##                                                                 
##   BounceRates        ExitRates         PageValues        SpecialDay     
##  Min.   :0.00000   Min.   :0.00000   Min.   :  0.000   Min.   :0.00000  
##  1st Qu.:0.00000   1st Qu.:0.01422   1st Qu.:  0.000   1st Qu.:0.00000  
##  Median :0.00293   Median :0.02500   Median :  0.000   Median :0.00000  
##  Mean   :0.02045   Mean   :0.04150   Mean   :  5.952   Mean   :0.06197  
##  3rd Qu.:0.01667   3rd Qu.:0.04848   3rd Qu.:  0.000   3rd Qu.:0.00000  
##  Max.   :0.20000   Max.   :0.20000   Max.   :361.764   Max.   :1.00000  
##                                                                         
##      Month      OperatingSystems    Browser         Region      TrafficType  
##  May    :3328   2      :6536     2      :7878   1      :4711   2      :3907  
##  Nov    :2983   1      :2548     1      :2426   3      :2382   1      :2383  
##  Mar    :1853   3      :2530     4      : 730   4      :1168   3      :2017  
##  Dec    :1706   4      : 478     5      : 466   2      :1127   4      :1066  
##  Oct    : 549   8      :  75     6      : 174   6      : 800   13     : 728  
##  Sep    : 448   6      :  19     10     : 163   7      : 758   10     : 450  
##  (Other):1332   (Other):  13     (Other): 362   (Other):1253   (Other):1648  
##             VisitorType     Weekend      Revenue     
##  New_Visitor      : 1693   FALSE:9343   FALSE:10291  
##  Other            :   81   TRUE :2856   TRUE : 1908  
##  Returning_Visitor:10425                             
##                                                      
##                                                      
##                                                      
## 

observations: this shows the distribution of data, just to check a few.

On Visitor Type:

10425 are Returning 1693 are New 81 are Other

On Weekend:

9343 are False 2856 are True

On Revenue:

10291 are False 1908 are True

##getting the dataset description

library(psych)
## 
## Attaching package: 'psych'
## The following object is masked from 'package:outliers':
## 
##     outlier
## The following objects are masked from 'package:ggplot2':
## 
##     %+%, alpha
describe(df_dataset)
##                         vars     n    mean      sd median trimmed    mad min
## Administrative             1 12199    2.34    3.33   1.00    1.66   1.48   0
## Administrative_Duration    2 12199   81.68  177.53   9.00   42.87  13.34  -1
## Informational              3 12199    0.51    1.28   0.00    0.18   0.00   0
## Informational_Duration     4 12199   34.84  141.46   0.00    3.73   0.00  -1
## ProductRelated             5 12199   32.06   44.60  18.00   23.06  19.27   0
## ProductRelated_Duration    6 12199 1207.51 1919.93 609.54  832.36 745.12  -1
## BounceRates                7 12199    0.02    0.05   0.00    0.01   0.00   0
## ExitRates                  8 12199    0.04    0.05   0.03    0.03   0.02   0
## PageValues                 9 12199    5.95   18.66   0.00    1.33   0.00   0
## SpecialDay                10 12199    0.06    0.20   0.00    0.00   0.00   0
## Month*                    11 12199    6.17    2.37   7.00    6.36   1.48   1
## OperatingSystems*         12 12199    2.12    0.91   2.00    2.06   0.00   1
## Browser*                  13 12199    2.36    1.71   2.00    2.00   0.00   1
## Region*                   14 12199    3.15    2.40   3.00    2.79   2.97   1
## TrafficType*              15 12199    4.07    4.02   2.00    3.22   1.48   1
## VisitorType*              16 12199    2.72    0.69   3.00    2.89   0.00   1
## Weekend*                  17 12199    1.23    0.42   1.00    1.17   0.00   1
## Revenue*                  18 12199    1.16    0.36   1.00    1.07   0.00   1
##                              max    range  skew kurtosis    se
## Administrative             27.00    27.00  1.95     4.63  0.03
## Administrative_Duration  3398.75  3399.75  5.59    50.09  1.61
## Informational              24.00    24.00  4.01    26.64  0.01
## Informational_Duration   2549.38  2550.38  7.54    75.45  1.28
## ProductRelated            705.00   705.00  4.33    31.04  0.40
## ProductRelated_Duration 63973.52 63974.52  7.25   136.57 17.38
## BounceRates                 0.20     0.20  3.15     9.25  0.00
## ExitRates                   0.20     0.20  2.23     4.62  0.00
## PageValues                361.76   361.76  6.35    64.93  0.17
## SpecialDay                  1.00     1.00  3.28     9.78  0.00
## Month*                     10.00     9.00 -0.83    -0.37  0.02
## OperatingSystems*           8.00     7.00  2.03    10.27  0.01
## Browser*                   13.00    12.00  3.22    12.53  0.02
## Region*                     9.00     8.00  0.98    -0.16  0.02
## TrafficType*               20.00    19.00  1.96     3.47  0.04
## VisitorType*                3.00     2.00 -2.05     2.23  0.01
## Weekend*                    2.00     1.00  1.26    -0.42  0.00
## Revenue*                    2.00     1.00  1.89     1.58  0.00

observation: it gives us the gimplse of the mean,variance,max and so on.

4.0 Univariate Analysis

4.1 univariate Analysis for Numerical Data

#preview of the numerical colunms
#
df_num <- df_dataset[,1:10]
head(df_num)
## # A tibble: 6 x 10
##   Administrative Administrative_D~ Informational Informational_D~ ProductRelated
##            <int>             <dbl>         <int>            <dbl>          <int>
## 1              0                 0             0                0              1
## 2              0                 0             0                0              2
## 3              0                -1             0               -1              1
## 4              0                 0             0                0              2
## 5              0                 0             0                0             10
## 6              0                 0             0                0             19
## # ... with 5 more variables: ProductRelated_Duration <dbl>, BounceRates <dbl>,
## #   ExitRates <dbl>, PageValues <dbl>, SpecialDay <dbl>
str(df_num)
## tibble [12,199 x 10] (S3: tbl_df/tbl/data.frame)
##  $ Administrative         : int [1:12199] 0 0 0 0 0 0 0 1 0 0 ...
##  $ Administrative_Duration: num [1:12199] 0 0 -1 0 0 0 -1 -1 0 0 ...
##  $ Informational          : int [1:12199] 0 0 0 0 0 0 0 0 0 0 ...
##  $ Informational_Duration : num [1:12199] 0 0 -1 0 0 0 -1 -1 0 0 ...
##  $ ProductRelated         : int [1:12199] 1 2 1 2 10 19 1 1 2 3 ...
##  $ ProductRelated_Duration: num [1:12199] 0 64 -1 2.67 627.5 ...
##  $ BounceRates            : num [1:12199] 0.2 0 0.2 0.05 0.02 ...
##  $ ExitRates              : num [1:12199] 0.2 0.1 0.2 0.14 0.05 ...
##  $ PageValues             : num [1:12199] 0 0 0 0 0 0 0 0 0 0 ...
##  $ SpecialDay             : num [1:12199] 0 0 0 0 0 0 0.4 0 0.8 0.4 ...
##  - attr(*, "na.action")= 'omit' Named int [1:14] 1066 1133 1134 1135 1136 1137 1474 1475 1476 1477 ...
##   ..- attr(*, "names")= chr [1:14] "1066" "1133" "1134" "1135" ...

previewing the numerical variables’ using boxplots

#3.2bi. Checking the outliers in the 'Administrative' Column.
#
boxplot(df_dataset$Administrative, main= "Administrative boxplot",ylab="Administrative", boxwex=0.2)

#3.2bi. Checking the outliers in the 'Administrative_Duration' Column.
#
boxplot(df_dataset$Administrative_Duration, main= "Administrative_Duration",ylab="Administrative_Duration", boxwex=0.2)

#3.2bi. Checking the outliers in the 'Informational' Column.
#
boxplot(df_dataset$Informational, main= "Informational",ylab="Informational", boxwex=0.2)

#3.2bi. Checking the outliers in the 'Informational_Duration' Column.
#
boxplot(df_dataset$Informational_Duration, main= "Informational_Duration",ylab="Informational_Duration", boxwex=0.2)

#3.2bi. Checking the outliers in the 'ProductRelated' Column.
#
boxplot(df_dataset$ProductRelated, main= "ProductRelated",ylab="ProductRelated", boxwex=0.2)

#3.2bi. Checking the outliers in the 'ProductRelated_Duration' Column.
#
boxplot(df_dataset$ProductRelated_Duration, main= "ProductRelated_Duration",ylab="ProductRelated_Duration", boxwex=0.2)

#3.2bi. Checking the outliers in the 'BounceRates' Column.
#
boxplot(df_dataset$BounceRates, main= "BounceRates",ylab="BounceRates", boxwex=0.2)

#3.2bi. Checking the outliers in the 'ExitRates' Column.
#
boxplot(df_dataset$ExitRates, main= "ExitRates",ylab="ExitRates", boxwex=0.2)

#3.2bi. Checking the outliers in the 'PageValues' Column.
#
boxplot(df_dataset$PageValues, main= "PageValues",ylab="PageValues", boxwex=0.2)

#3.2bi. Checking the outliers in the 'SpecialDay' Column.
#
boxplot(df_dataset$SpecialDay, main= "SpecialDay",ylab="SpecialDay", boxwex=0.2)

Observation: all the numerical columns has outliers, however will not be removed because they represent the real world, and can provide some insights as to why they

previewing the numerical variables using histograms to check skewness.

#3.3ai installing ggplot2 package for visualization.
#install.packages('ggplot2')
#
#installing ggplot2 library
#
library(ggplot2)
#
#note: the above  have been installed in the console section.
#visualizing the Administrative colunm to check for skewness
#
ggplot2::qplot(data = df_dataset, x = Administrative)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

#visualizing the Administrative_Duration colunm to check for skewness
#
ggplot2::qplot(data = df_dataset, x = Administrative_Duration)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

#visualizing the Informational colunm to check for skewness
#
ggplot2::qplot(data = df_dataset, x = Informational)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

#visualizing the Informational_Duration colunm to check for skewness
#
ggplot2::qplot(data = df_dataset, x = Informational_Duration)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

#visualizing the  colunm to check for skewness
#
ggplot2::qplot(data = df_dataset, x = ProductRelated)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

#visualizing the  ProductRelated_Duration colunm to check for skewness
#
ggplot2::qplot(data = df_dataset, x = ProductRelated_Duration)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

#visualizing the BounceRates colunm to check for skewness
#
ggplot2::qplot(data = df_dataset, x = BounceRates)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

#visualizing the ExitRates colunm to check for skewness
#
ggplot2::qplot(data = df_dataset, x = ExitRates)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

#visualizing the PageValues colunm to check for skewness
#
ggplot2::qplot(data = df_dataset, x = PageValues)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

#visualizing the SpecialDay  colunm to check for skewness
#
ggplot2::qplot(data = df_dataset, x = SpecialDay)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

observation: All our numerical variables have outliers are positively skewed.

#importing library for visualization
#
library(dplyr)    # alternatively, this also loads %>%
library(tidyr) ## for gather
library("ggplot2") ### for visualization

we can check skewness for numerical values at once as below

df_dataset%>%
  gather(attributes, value, 1:10) %>%
  ggplot(aes(x = value)) +
  geom_histogram(fill = 'lightblue2', color = 'black') +
  facet_wrap(~attributes, scales = 'free_x') +
  labs(x="Values", y="Frequency") +
  theme_bw()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

observation: shows skewness to the right(positive skewness).

4.1b univariate Analysis for categorical Data

## Identifying the categorical class in the data 
#
#Checking the data types of the columns
#
df_cat<- df_dataset %>% select_if(is.factor)
df_cat
## # A tibble: 12,199 x 8
##    Month OperatingSystems Browser Region TrafficType VisitorType Weekend Revenue
##    <fct> <fct>            <fct>   <fct>  <fct>       <fct>       <fct>   <fct>  
##  1 Feb   1                1       1      1           Returning_~ FALSE   FALSE  
##  2 Feb   2                2       1      2           Returning_~ FALSE   FALSE  
##  3 Feb   4                1       9      3           Returning_~ FALSE   FALSE  
##  4 Feb   3                2       2      4           Returning_~ FALSE   FALSE  
##  5 Feb   3                3       1      4           Returning_~ TRUE    FALSE  
##  6 Feb   2                2       1      3           Returning_~ FALSE   FALSE  
##  7 Feb   2                4       3      3           Returning_~ FALSE   FALSE  
##  8 Feb   1                2       1      5           Returning_~ TRUE    FALSE  
##  9 Feb   2                2       2      3           Returning_~ FALSE   FALSE  
## 10 Feb   2                4       1      2           Returning_~ FALSE   FALSE  
## # ... with 12,189 more rows

creating tables for bar plots.

# create tables of all categorical variables to be able to create bar plots with them
month_table <- table(df_dataset$Month)
os_table <- table(df_dataset$OperatingSystems)
browser_table <- table(df_dataset$Browser)
region_table <- table(df_dataset$Region)
traffic_table <- table(df_dataset$TrafficType)
visitor_table <- table(df_dataset$VisitorType)
weekend_table <- table(df_dataset$Weekend)
revenue_table <- table(df_dataset$Revenue)

adjusting plot size.

# function for adjusting plot size
set_plot_dimensions <- function(width_choice, height_choice) {
    options(repr.plot.width = width_choice, repr.plot.height = height_choice)
}
# barplot of Month
set_plot_dimensions(5, 4)
month_table
## 
##  Aug  Dec  Feb  Jul June  Mar  May  Nov  Oct  Sep 
##  433 1706  182  432  285 1853 3328 2983  549  448
barplot(month_table, ylab = "count", xlab="month", col="pink")

observation: May is the most frequently occurring month with February being the least frequently occurring.

# barplot of operating system
set_plot_dimensions(5, 4)
os_table
## 
##    1    2    3    4    5    6    7    8 
## 2548 6536 2530  478    6   19    7   75
barplot(os_table, ylab = "count", xlab="operating system type", col="sky blue")

observartion; Operating System 2 is the most widely used Operating System, followed by OS 1 and 3 which seem to be almost the same. OS 5 is the least used operating system.

# barplot of browser
set_plot_dimensions(5, 4)
browser_table
## 
##    1    2    3    4    5    6    7    8    9   10   11   12   13 
## 2426 7878  105  730  466  174   49  135    1  163    6   10   56
barplot(browser_table, ylab = "count", xlab="browser type", col="dark green")

observation: Browser 2 is the most widely used browser and it’s followed by Browser 1. Browsers 9, 11, and 12 appear to be the least used browsers.

# barplot of region
set_plot_dimensions(5, 4)
region_table
## 
##    1    2    3    4    5    6    7    8    9 
## 4711 1127 2382 1168  317  800  758  431  505
barplot(region_table, ylab = "count", xlab="region", col="orange")

observation: Region 1 is the most occurring region while Region 5 is the least occurring.

# barplot of traffic
set_plot_dimensions(5, 4)
traffic_table
## 
##    1    2    3    4    5    6    7    8    9   10   11   12   13   14   15   16 
## 2383 3907 2017 1066  260  443   40  343   41  450  247    1  728   13   36    3 
##   17   18   19   20 
##    1   10   17  193
barplot(traffic_table, ylab = "count", xlab="traffic type", col="black")

observation: Traffic Type 2 is the highest followed by Type 1 and Type 3. Type 12, 16, and 17 appear to be the least frequently occurring in the dataset.

# barplot of visitor
set_plot_dimensions(5, 4)
visitor_table
## 
##       New_Visitor             Other Returning_Visitor 
##              1693                81             10425
barplot(visitor_table, ylab = "count", xlab="visitor type", col="dark orange")

observation: Majority of the visitors are returning; they are not new to this business.

# barplot of weekend
set_plot_dimensions(5, 4)
weekend_table
## 
## FALSE  TRUE 
##  9343  2856
barplot(weekend_table, ylab = "count", xlab="day type", col="tomato")

observation: Weekdays outnumber weekends in this dataset.

# barplot of revenue
set_plot_dimensions(5, 4)
revenue_table 
## 
## FALSE  TRUE 
## 10291  1908
barplot(revenue_table,ylab = "count", xlab="revenue", col="brown" )

observation: There are more FALSE revenues than true ones by a huge margin.

3.2 Bivariate Analysis

# Administrative by Revenue
set_plot_dimensions(5, 4)
ggplot(df_dataset, aes(x = Administrative, fill = Revenue, color = Revenue)) +
geom_freqpoly(binwidth = 1) +
labs(title = "Administrative by Revenue")

observation: false revenue increases sharply upto the pick and eventually drops sharply upto about 100 where administrative cost is 2 and then start to drop gradually. true revenues increases slightly at first and then remains stagnant even as administrative cost increases.

# Administrative Duration by Revenue
set_plot_dimensions(5, 4)
ggplot(df_dataset, aes(x = Administrative_Duration, fill = Revenue, color = Revenue)) +
geom_histogram(binwidth = 1) +
labs(title = "Administrative Duration by Revenue")

True revenue remains the same irrespective of administrative duration.

# Informational by Revenue
set_plot_dimensions(5, 4)
ggplot(df_dataset, aes(x = Informational, fill = Revenue, color = Revenue)) +
geom_freqpoly(binwidth = 1) +
labs(title = "Informational by Revenu")

True revenues increases slightly and eventually drops to zero, it remains zero irrespective of an increase in information.

# Informational Duration by Revenue
set_plot_dimensions(5, 4)
ggplot(df_dataset, aes(x = Informational_Duration, fill = Revenue, color = Revenue)) +
geom_histogram(binwidth = 1) +
labs(title = "Informational Duration by Revenue")

True revenue remains the same irrespective of information duration.

# product related by Revenue
set_plot_dimensions(5, 4)
ggplot(df_dataset, aes(x = ProductRelated, fill = Revenue, color = Revenue)) +
geom_histogram(binwidth = 1) +
labs(title = "Product Related by Revenue")

true revenue remains low despite the product related increasing.

# product related duration by Revenue
set_plot_dimensions(5, 4)
ggplot(df_dataset, aes(x = ProductRelated_Duration, fill = Revenue, color = Revenue)) +
geom_histogram(binwidth = 1) +
labs(title = "Product Related Duration by Revenue")

true revenue remains low despite the product related duration increasing.

# bounce rates by Revenue
set_plot_dimensions(5, 4)
ggplot(df_dataset, aes(x = BounceRates, fill = Revenue, color = Revenue)) +
geom_freqpoly(binwidth = 1) +
labs(title = "Bounce Rates by Revenue")

bounce rates increases false revenue sharply fron negative to 0 then drop sharply to 1. true revenue also does the same but at lower rate compared to false positive.

# exit rates by Revenue
set_plot_dimensions(5, 4)
ggplot(df_dataset, aes(x = ExitRates, fill = Revenue, color = Revenue)) +
geom_freqpoly(binwidth = 1) +
labs(title = "Exit Rates by Revenue")

exit rates increases false revenue sharply from negative to 0 then drop sharply to 1. true revenue also does the same but at lower rate compared to false positive.

# Page Values by Revenue
set_plot_dimensions(5, 4)
ggplot(df_dataset, aes(x = PageValues, fill = Revenue, color = Revenue)) +
geom_histogram(binwidth = 1) +
labs(title = "Page Values by Revenue")

true revenue remains low despite the page values increasing.

# special day by Revenue
set_plot_dimensions(5, 4)
ggplot(df_dataset, aes(x = SpecialDay, fill = Revenue, color = Revenue)) +
geom_freqpoly(binwidth = 1) +
labs(title = "Special Day by Revenue")

exit rates increases false revenue sharply from negative to 0 then drop sharply to 1 then they start to reduce gradually. true revenue also does the same but at lower rate compared to false positive.

# plotting the distribution of Revenue per Month
set_plot_dimensions(6, 6)
rev_month <- table(df_dataset$Revenue, df_dataset$Month)
barplot(rev_month, main = "Revenue per Month", col = c("pink", "brown"), beside = TRUE, 
legend = rownames(rev_month), ylab="revenue", xlab = "Month")

observation: November returns the highest number of revenues while February returns the lowest.

# plotting the distribution of Revenue per Operating System
set_plot_dimensions(6, 6)
rev_os <- table(df_dataset$Revenue, df_dataset$OperatingSystems)
barplot(rev_os, main = "Revenue per Operating System", col = c("sky blue", "brown"), beside = TRUE, 
        legend = rownames(rev_os),ylab="revenue", xlab = "Operating System")

observation: Operating System 2 returns the highest number of revenue while OS 5, 6, and 7 return the lowest.

# plotting the distribution of Revenue per Browser
set_plot_dimensions(6, 6)
rev_browser <- table(df_dataset$Revenue, df_dataset$Browser)
barplot(rev_browser, main = "Revenue per Browser", col = c("dark green", "brown"), beside = TRUE, 
        legend = rownames(rev_browser),ylab="revenue", xlab = "Browser")

observation: browser 2 returns the highest number of revenue while 3, 7, 9, 11, and 12 return the lowest.

# plotting the distribution of Revenue per Region
set_plot_dimensions(6, 6)
rev_region <- table(df_dataset$Revenue, df_dataset$Region)
barplot(rev_region, main = "Revenue per Region", col = c("orange", "brown"), beside = TRUE, 
        legend = rownames(rev_region), ylab="revenue", xlab = "Region")

observation: region 1 returns the highest number of revenue, Region 5 and 8 returns the lowest.

# plotting the distribution of Revenue per Traffic Type
set_plot_dimensions(6,6)
rev_traffic <- table(df_dataset$Revenue, df_dataset$TrafficType)
barplot(rev_traffic, main = "Revenue per Traffic Type", col = c("black", "brown"), beside = TRUE, 
        legend = rownames(rev_traffic), ylab="revenue", xlab = "Traffic Type")

observation: Traffic 2 has the highest number of revenues, 12, 14, 16, 17, and 18 return the lowest.

# plotting the distribution of Revenue per Visitor Type
set_plot_dimensions(6, 6)
rev_visitor <- table(df_dataset$Revenue, df_dataset$VisitorType)
barplot(rev_visitor, main = "Revenue per Visitor Type", col = c("dark orange", "brown"), beside = TRUE, 
        legend = rownames(rev_visitor), ylab="revenue", xlab = "Visitor Type")

observation; returning visitors generated more revenue.

# plotting the distribution of Revenue per Weekend
set_plot_dimensions(6, 6)
rev_weekend <- table(df_dataset$Revenue, df_dataset$Weekend)
barplot(rev_weekend, main = "Revenue per Weekend", col = c("tomato", "brown"), beside = TRUE, 
        legend = rownames(rev_weekend),ylab="revenue", xlab = "Weekend")

observation: more revenue was generated during the weekdays than the weekends. This is to be expected since there are way more records of weekdays than of weekends.

plotting correlation of the numerical variables..

#install.packages("corrplot") 
library(corrplot)
## corrplot 0.88 loaded
#
## Let’s build a correlation matrix to understand the relation between each attributes
corrplot(cor(df_num), type = 'upper', method = 'number', tl.cex = 0.9)

observation: There is a strong linear correlation between a couple of variables.

  1. BounceRates and ExitRates are highly positive correlation of 0.9.

  2. Administrative and Administrative_Duration have a high positive correlation of 0.6.

  3. Informational and Informational_Duration high positive correlated of 0.62,

  4. ProductRelated and ProductRated_Duration have high positive correlation of 0.86.

Therefore, we will have to drop one variable of each of the highly correlated pairs to reduce dimensionality and redundancy.

We can model the relationship between these variables by fitting a linear equation

# Relationship between "BounceRates" and "ExitRates"
#

ggplot(df_num, aes(x = BounceRates, y =ExitRates)) +
  geom_point() +
  geom_smooth(method = 'lm', se = FALSE) +
  theme_bw()
## `geom_smooth()` using formula 'y ~ x'

# Relationship between "Administrative" and "Administrative_Duration"
#

ggplot(df_num, aes(x = Administrative, y =Administrative_Duration)) +
  geom_point() +
  geom_smooth(method = 'lm', se = FALSE) +
  theme_bw()
## `geom_smooth()` using formula 'y ~ x'

# Relationship between "Informational" and "Informational_Duration"
#

ggplot(df_num, aes(x = Informational, y =Informational_Duration)) +
  geom_point() +
  geom_smooth(method = 'lm', se = FALSE) +
  theme_bw()
## `geom_smooth()` using formula 'y ~ x'

# Relationship between "ProductRelated" and "ProductRated_Duration"
#

ggplot(df_num, aes(x = ProductRelated, y = ProductRelated_Duration
)) +
  geom_point() +
  geom_smooth(method = 'lm', se = FALSE) +
  theme_bw()
## `geom_smooth()` using formula 'y ~ x'

observation: from the 4 scatter plots above, there is a high positive correlation between the pairs, Therefore, we will have to drop one variable of each of the highly correlated pairs to reduce dimensionality and redundancy.

dropping the highly correlated columns

# selecting highly correlated columns to be dropped
to_drop <- c("Administrative_Duration", "Informational_Duration", "ProductRelated_Duration", "ExitRates")
#
#dropping the highly correlated colunms
#
df_dataset <- df_dataset[, !names(df_dataset) %in% to_drop]
head(df_dataset)
## # A tibble: 6 x 14
##   Administrative Informational ProductRelated BounceRates PageValues SpecialDay
##            <int>         <int>          <int>       <dbl>      <dbl>      <dbl>
## 1              0             0              1      0.2             0          0
## 2              0             0              2      0               0          0
## 3              0             0              1      0.2             0          0
## 4              0             0              2      0.05            0          0
## 5              0             0             10      0.02            0          0
## 6              0             0             19      0.0158          0          0
## # ... with 8 more variables: Month <fct>, OperatingSystems <fct>,
## #   Browser <fct>, Region <fct>, TrafficType <fct>, VisitorType <fct>,
## #   Weekend <fct>, Revenue <fct>

numerical colunms for after dropping highly correlated colunms

# getting the numerical columns from the new and revised dataframe
new_numeric <- df_dataset[,1:6]
head(new_numeric)
## # A tibble: 6 x 6
##   Administrative Informational ProductRelated BounceRates PageValues SpecialDay
##            <int>         <int>          <int>       <dbl>      <dbl>      <dbl>
## 1              0             0              1      0.2             0          0
## 2              0             0              2      0               0          0
## 3              0             0              1      0.2             0          0
## 4              0             0              2      0.05            0          0
## 5              0             0             10      0.02            0          0
## 6              0             0             19      0.0158          0          0

## Let’s build a correlation matrix to understand the relation between each attributes
corrplot(cor(new_numeric), type = 'upper', method = 'number', tl.cex = 0.9)

observation: As we can see, removing the highly correlated variables has reduced multicollinearity in our dataset. It also made it easier to proceed with the modelling.

##saving our new dataset

# save to csv 
write.csv(df_dataset, "customer_new.csv")

##. Modeling

Unsupervised Learning

Unsupervised learning requires data that has no labels. So we will create a new dataset that does not have the “Revenue” column.

prieveing the dataset to be used

#previewing the dataset
head(df_dataset)
## # A tibble: 6 x 14
##   Administrative Informational ProductRelated BounceRates PageValues SpecialDay
##            <int>         <int>          <int>       <dbl>      <dbl>      <dbl>
## 1              0             0              1      0.2             0          0
## 2              0             0              2      0               0          0
## 3              0             0              1      0.2             0          0
## 4              0             0              2      0.05            0          0
## 5              0             0             10      0.02            0          0
## 6              0             0             19      0.0158          0          0
## # ... with 8 more variables: Month <fct>, OperatingSystems <fct>,
## #   Browser <fct>, Region <fct>, TrafficType <fct>, VisitorType <fct>,
## #   Weekend <fct>, Revenue <fct>

removing the target/label variable “Revenue”

df_new <- df_dataset[, -14]
df_new.revenue <- df_dataset[, "Revenue"]
head(df_new)
## # A tibble: 6 x 13
##   Administrative Informational ProductRelated BounceRates PageValues SpecialDay
##            <int>         <int>          <int>       <dbl>      <dbl>      <dbl>
## 1              0             0              1      0.2             0          0
## 2              0             0              2      0               0          0
## 3              0             0              1      0.2             0          0
## 4              0             0              2      0.05            0          0
## 5              0             0             10      0.02            0          0
## 6              0             0             19      0.0158          0          0
## # ... with 7 more variables: Month <fct>, OperatingSystems <fct>,
## #   Browser <fct>, Region <fct>, TrafficType <fct>, VisitorType <fct>,
## #   Weekend <fct>

observation;the dataset to be used contains 13 colunms, this is after dropping the target variable.

# Previewing the revenue column
# ---
# 
head(df_new.revenue)
## # A tibble: 6 x 1
##   Revenue
##   <fct>  
## 1 FALSE  
## 2 FALSE  
## 3 FALSE  
## 4 FALSE  
## 5 FALSE  
## 6 FALSE

observation: this is the removed target variable.

converting factors to numerical for modeling

# convert the factors into numerics
df_new$Month <- as.numeric(df_new$Month)
df_new$OperatingSystems <- as.numeric(df_new$OperatingSystems)
df_new$Browser <- as.numeric(df_new$Browser)
df_new$Region <- as.numeric(df_new$Region)
df_new$TrafficType <- as.numeric(df_new$TrafficType)
df_new$VisitorType <- as.numeric(df_new$VisitorType)
df_new$Weekend <- as.numeric(df_new$Weekend)
## checking the new datatypes
#
str(df_new)
## tibble [12,199 x 13] (S3: tbl_df/tbl/data.frame)
##  $ Administrative  : int [1:12199] 0 0 0 0 0 0 0 1 0 0 ...
##  $ Informational   : int [1:12199] 0 0 0 0 0 0 0 0 0 0 ...
##  $ ProductRelated  : int [1:12199] 1 2 1 2 10 19 1 1 2 3 ...
##  $ BounceRates     : num [1:12199] 0.2 0 0.2 0.05 0.02 ...
##  $ PageValues      : num [1:12199] 0 0 0 0 0 0 0 0 0 0 ...
##  $ SpecialDay      : num [1:12199] 0 0 0 0 0 0 0.4 0 0.8 0.4 ...
##  $ Month           : num [1:12199] 3 3 3 3 3 3 3 3 3 3 ...
##  $ OperatingSystems: num [1:12199] 1 2 4 3 3 2 2 1 2 2 ...
##  $ Browser         : num [1:12199] 1 2 1 2 3 2 4 2 2 4 ...
##  $ Region          : num [1:12199] 1 1 9 2 1 1 3 1 2 1 ...
##  $ TrafficType     : num [1:12199] 1 2 3 4 4 3 3 5 3 2 ...
##  $ VisitorType     : num [1:12199] 3 3 3 3 3 3 3 3 3 3 ...
##  $ Weekend         : num [1:12199] 1 1 1 1 2 1 1 2 1 1 ...
##  - attr(*, "na.action")= 'omit' Named int [1:14] 1066 1133 1134 1135 1136 1137 1474 1475 1476 1477 ...
##   ..- attr(*, "names")= chr [1:14] "1066" "1133" "1134" "1135" ...

observation: now our dataset all datatypes are numerical and integers.

# checking for missing values
anyNA(df_new)
## [1] FALSE
# dataset summary
#
summary(df_new)
##  Administrative  Informational     ProductRelated    BounceRates     
##  Min.   : 0.00   Min.   : 0.0000   Min.   :  0.00   Min.   :0.00000  
##  1st Qu.: 0.00   1st Qu.: 0.0000   1st Qu.:  8.00   1st Qu.:0.00000  
##  Median : 1.00   Median : 0.0000   Median : 18.00   Median :0.00293  
##  Mean   : 2.34   Mean   : 0.5088   Mean   : 32.06   Mean   :0.02045  
##  3rd Qu.: 4.00   3rd Qu.: 0.0000   3rd Qu.: 38.00   3rd Qu.:0.01667  
##  Max.   :27.00   Max.   :24.0000   Max.   :705.00   Max.   :0.20000  
##    PageValues        SpecialDay          Month        OperatingSystems
##  Min.   :  0.000   Min.   :0.00000   Min.   : 1.000   Min.   :1.000   
##  1st Qu.:  0.000   1st Qu.:0.00000   1st Qu.: 6.000   1st Qu.:2.000   
##  Median :  0.000   Median :0.00000   Median : 7.000   Median :2.000   
##  Mean   :  5.952   Mean   :0.06197   Mean   : 6.168   Mean   :2.124   
##  3rd Qu.:  0.000   3rd Qu.:0.00000   3rd Qu.: 8.000   3rd Qu.:3.000   
##  Max.   :361.764   Max.   :1.00000   Max.   :10.000   Max.   :8.000   
##     Browser           Region       TrafficType      VisitorType   
##  Min.   : 1.000   Min.   :1.000   Min.   : 1.000   Min.   :1.000  
##  1st Qu.: 2.000   1st Qu.:1.000   1st Qu.: 2.000   1st Qu.:3.000  
##  Median : 2.000   Median :3.000   Median : 2.000   Median :3.000  
##  Mean   : 2.358   Mean   :3.153   Mean   : 4.075   Mean   :2.716  
##  3rd Qu.: 2.000   3rd Qu.:4.000   3rd Qu.: 4.000   3rd Qu.:3.000  
##  Max.   :13.000   Max.   :9.000   Max.   :20.000   Max.   :3.000  
##     Weekend     
##  Min.   :1.000  
##  1st Qu.:1.000  
##  Median :1.000  
##  Mean   :1.234  
##  3rd Qu.:1.000  
##  Max.   :2.000

observation. the above gives as an overview of our dataset, it show our datapoints are on different scales.

preparing our data for K-means clustering

let’s prepare our data to do the K means clustering

From the data summary, we have seen that there are variables who are on a different scale, we need to either scale the data or normalise it. We can normalise the data using the mean and standard deviation, also we can use scale function to normalise our data.

# normalizing our dataset by use of scale function.
#
library(dplyr)
df_Norm <- as.data.frame(scale(df_new))
#
#previewing the scaled dataset.
head(df_Norm)
##   Administrative Informational ProductRelated  BounceRates PageValues
## 1     -0.7025315    -0.3988128     -0.6963635  3.954699721 -0.3190356
## 2     -0.7025315    -0.3988128     -0.6739424 -0.450343788 -0.3190356
## 3     -0.7025315    -0.3988128     -0.6963635  3.954699721 -0.3190356
## 4     -0.7025315    -0.3988128     -0.6739424  0.650917089 -0.3190356
## 5     -0.7025315    -0.3988128     -0.4945739 -0.009839437 -0.3190356
## 6     -0.7025315    -0.3988128     -0.2927843 -0.102577188 -0.3190356
##   SpecialDay     Month OperatingSystems    Browser     Region TrafficType
## 1 -0.3103105 -1.333953       -1.2396607 -0.7939682 -0.8962939 -0.76562243
## 2 -0.3103105 -1.333953       -0.1371074 -0.2093703 -0.8962939 -0.51660683
## 3 -0.3103105 -1.333953        2.0679992 -0.7939682  2.4336556 -0.26759123
## 4 -0.3103105 -1.333953        0.9654459 -0.2093703 -0.4800502 -0.01857564
## 5 -0.3103105 -1.333953        0.9654459  0.3752276 -0.8962939 -0.01857564
## 6 -0.3103105 -1.333953       -0.1371074 -0.2093703 -0.8962939 -0.26759123
##   VisitorType    Weekend
## 1    0.409771 -0.5528638
## 2    0.409771 -0.5528638
## 3    0.409771 -0.5528638
## 4    0.409771 -0.5528638
## 5    0.409771  1.8086156
## 6    0.409771 -0.5528638

observation: our data is now scaled and is now on the same scale.

** Computing k-means clustering in R **

We can compute k-means in R with the kmeans function. Here will group the data into six clusters (centers = 7). The kmeans function also has an nstart option that attempts multiple initial configurations and reports on the best one. For example, adding nstart = 30 will generate 20 initial configurations and reports on the best one. For example, adding nstart=20 generates 30 initial configurations. This approach is often recommended.

set.seed(123)

df.new_K7 <- kmeans(df_Norm, centers = 7, nstart = 20)
print(df.new_K7)
## K-means clustering with 7 clusters of sizes 931, 675, 4299, 1672, 1871, 1129, 1622
## 
## Cluster means:
##   Administrative Informational ProductRelated BounceRates   PageValues
## 1    -0.37296277    -0.2093847    -0.11334354   0.1006824 -0.224186879
## 2    -0.69319120    -0.3930067    -0.67052116   3.7281786 -0.319035624
## 3    -0.20439364    -0.2226877    -0.14096360  -0.1874604 -0.062071805
## 4    -0.14481955    -0.2028599    -0.13939043  -0.2320146  0.021282281
## 5    -0.10529361    -0.1135239    -0.07088646  -0.2156894 -0.005720033
## 6     1.78302172     1.9692832     1.80470745  -0.3103087  0.191850307
## 7     0.07394066    -0.1567107    -0.31300751  -0.4084723  0.277085654
##     SpecialDay       Month OperatingSystems     Browser      Region TrafficType
## 1  3.171634556  0.26532058       0.04526982  0.01417090 -0.09823269  0.18470240
## 2  0.004218715 -0.09255934       0.08503666 -0.01190611  0.04410851  0.29463065
## 3 -0.281657728 -0.02576796      -0.03169932 -0.16095976 -0.49079761 -0.05228745
## 4 -0.262993221 -0.15358097       0.15567588  0.65948482  1.43711048  0.07033723
## 5 -0.310310494  0.04450174      -0.01925030 -0.11375995 -0.04356163 -0.01697853
## 6 -0.237574596  0.15864666      -0.00429320 -0.11254141 -0.20206284 -0.11187377
## 7 -0.281291931 -0.04891916      -0.11263644 -0.04682180  0.04833805 -0.06509335
##   VisitorType     Weekend
## 1   0.3137528 -0.15717012
## 2   0.2687929 -0.13654370
## 3   0.4060818 -0.55286376
## 4   0.3554440 -0.51190509
## 5   0.4074592  1.80861560
## 6   0.3842294 -0.09688281
## 7  -2.4720950  0.12122067
## 
## Clustering vector:
##     [1] 2 3 2 3 5 3 2 2 1 1 3 1 3 3 3 4 2 5 3 4 1 2 3 1 2 4 3 3 3 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cluster sum of squares by cluster:
## [1]  6949.579  5672.773 22257.998 18174.604 13032.406 17689.578 15588.958
##  (between_SS / total_SS =  37.3 %)
## 
## Available components:
## 
## [1] "cluster"      "centers"      "totss"        "withinss"     "tot.withinss"
## [6] "betweenss"    "size"         "iter"         "ifault"

##An Analyst always try to visualize the data and results, let’s visualize the cluster we have created, so far. # for visualization, istall library(“factoextra”) and library(“cluster”) packages

# for visualization, istall library("factoextra") and library("cluster") packages

library("factoextra")
## Welcome! Want to learn more? See two factoextra-related books at https://goo.gl/ve3WBa
library("cluster")
#visualize the cluster  so far
#
fviz_cluster(df.new_K7, data = df_Norm)

When we print the model we build (df.new_k2), it shows information like, number of clusters, centers of the clusters, size of the clusters and sum of square. we will now get these attributes of our model.

checking the records in clusters

# # previewing the number of records in each cluster
df.new_K7$cluster
##     [1] 2 3 2 3 5 3 2 2 1 1 3 1 3 3 3 4 2 5 3 4 1 2 3 1 2 4 3 3 3 3 4 5 3 3 3 4
##    [37] 5 1 1 3 4 1 3 1 3 3 3 3 3 2 2 3 1 3 1 2 2 3 4 1 1 3 6 5 2 1 3 2 4 2 2 4
##    [73] 1 3 3 3 3 1 1 2 5 1 3 3 2 2 3 3 1 3 3 2 3 7 1 3 3 1 1 3 3 1 1 1 3 2 1 3
##   [109] 1 6 1 2 2 3 3 5 1 3 3 4 4 1 1 3 3 2 3 4 1 2 5 3 2 1 1 3 4 3 1 3 2 4 3 2
##   [145] 3 1 3 3 3 1 3 2 4 3 3 5 2 1 2 1 5 5 1 1 3 3 3 4 1 1 3 1 2 1 3 4 3 1 5 2
##   [181] 2 1 6 3 3 6 4 3 2 6 3 3 5 3 7 3 7 7 5 5 7 3 3 7 7 7 7 3 3 4 4 5 3 3 4 3
##   [217] 3 3 4 3 3 7 3 5 3 3 3 3 5 3 5 5 5 6 5 5 5 3 3 3 4 5 4 3 4 3 6 5 5 3 2 3
##   [253] 5 3 3 4 3 7 5 2 5 3 4 5 4 3 3 5 5 2 7 3 5 4 5 4 3 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3 6 4 4 4 6 6 3 3 7 6
## [11989] 2 4 3 3 5 7 6 5 3 3 3 3 7 6 5 6 5 6 7 3 3 3 4 3 5 6 7 5 3 3 7 3 6 7 3 7
## [12025] 6 7 3 6 4 3 7 4 3 4 3 4 3 3 3 3 5 6 5 3 3 2 2 7 7 6 6 3 6 5 6 5 3 6 5 6
## [12061] 6 5 3 5 3 5 2 7 7 2 3 5 5 3 3 4 4 3 4 7 7 3 5 3 3 6 7 7 3 2 6 7 3 6 3 3
## [12097] 4 3 3 3 5 4 6 7 3 6 3 4 3 4 4 3 4 6 3 3 3 3 7 3 7 4 3 5 5 3 5 3 7 6 5 4
## [12133] 3 3 5 3 3 4 3 5 3 5 5 4 4 7 3 6 5 4 4 3 4 5 6 3 6 3 5 5 3 3 3 4 3 7 7 3
## [12169] 3 4 2 5 4 5 3 4 3 5 3 4 6 6 3 4 5 3 7 5 3 3 2 3 3 3 5 5 5 3 7

checking clusters

# previewing the cluster centers 
df.new_K7$centers
##   Administrative Informational ProductRelated BounceRates   PageValues
## 1    -0.37296277    -0.2093847    -0.11334354   0.1006824 -0.224186879
## 2    -0.69319120    -0.3930067    -0.67052116   3.7281786 -0.319035624
## 3    -0.20439364    -0.2226877    -0.14096360  -0.1874604 -0.062071805
## 4    -0.14481955    -0.2028599    -0.13939043  -0.2320146  0.021282281
## 5    -0.10529361    -0.1135239    -0.07088646  -0.2156894 -0.005720033
## 6     1.78302172     1.9692832     1.80470745  -0.3103087  0.191850307
## 7     0.07394066    -0.1567107    -0.31300751  -0.4084723  0.277085654
##     SpecialDay       Month OperatingSystems     Browser      Region TrafficType
## 1  3.171634556  0.26532058       0.04526982  0.01417090 -0.09823269  0.18470240
## 2  0.004218715 -0.09255934       0.08503666 -0.01190611  0.04410851  0.29463065
## 3 -0.281657728 -0.02576796      -0.03169932 -0.16095976 -0.49079761 -0.05228745
## 4 -0.262993221 -0.15358097       0.15567588  0.65948482  1.43711048  0.07033723
## 5 -0.310310494  0.04450174      -0.01925030 -0.11375995 -0.04356163 -0.01697853
## 6 -0.237574596  0.15864666      -0.00429320 -0.11254141 -0.20206284 -0.11187377
## 7 -0.281291931 -0.04891916      -0.11263644 -0.04682180  0.04833805 -0.06509335
##   VisitorType     Weekend
## 1   0.3137528 -0.15717012
## 2   0.2687929 -0.13654370
## 3   0.4060818 -0.55286376
## 4   0.3554440 -0.51190509
## 5   0.4074592  1.80861560
## 6   0.3842294 -0.09688281
## 7  -2.4720950  0.12122067

observation; these are the 7 clusters data point distribution.

# Cluster size
df.new_K7$size
## [1]  931  675 4299 1672 1871 1129 1622

observation: cluster 1 has 931 data point, cluster2 675 datapoints, cluster3 4299,cluster4 1672, cluster5 1872, cluster6 1129, and clsuter7 has 1622 data points.

# Between clusters sum of square
df.new_K7$betweenss
## [1] 59208.1

this shows some of square. between clusters.

# Within cluster sum of square
df.new_K7$withinss
## [1]  6949.579  5672.773 22257.998 18174.604 13032.406 17689.578 15588.958

observation: this is sum of squares with the cluster.

# Total with sum of square
df.new_K7$tot.withinss
## [1] 99365.9

This is the total number of the sum of squares within the cluster.

# Total sum of square
df.new_K7$totss
## [1] 158574

this is the total sum of all squares.

Because the number of clusters (k) must be set before we start the algorithm, it is often advantageous to use several different values of k and examine the differences in the results.

We can execute the same process for 2, 3, 4, 5 and 6 clusters, and the results are shown in the figure:

df.new_K2 <- kmeans(df_Norm, centers = 2, nstart = 20)
df.new_K3 <- kmeans(df_Norm, centers = 3, nstart = 20)
df.new_K4 <- kmeans(df_Norm, centers = 4, nstart = 20)
df.new_K5 <- kmeans(df_Norm, centers = 5, nstart = 20)
df.new_K6 <- kmeans(df_Norm, centers = 6, nstart = 20)

visualizing

library("factoextra")
library("cluster")
library(gridExtra) # for grid.arrange
## 
## Attaching package: 'gridExtra'
## The following object is masked from 'package:dplyr':
## 
##     combine
#We can plot these clusters for different K value to compare.
p1 <- fviz_cluster(df.new_K2, geom = "point", data = df_Norm) + ggtitle(" K = 2")
p2 <- fviz_cluster(df.new_K3, geom = "point", data = df_Norm) + ggtitle(" K = 3")
p3 <- fviz_cluster(df.new_K4, geom = "point", data = df_Norm) + ggtitle(" K = 4")
p4 <- fviz_cluster(df.new_K5, geom = "point", data = df_Norm) + ggtitle(" K = 5")
p5 <- fviz_cluster(df.new_K6, geom = "point", data = df_Norm) + ggtitle(" K = 6")

grid.arrange(p1, p2, p3, p4,p5, nrow = 2)

Determining the optimal number of cluster

Determining Optimal Clusters: K-means clustering requires that you specify in advance the number of clusters to extract. A plot of the total within-groups sums of squares against the number of clusters in a k-means solution can be helpful. A bend in the graph can suggest the appropriate number of clusters.

Below are the methods to determine the optimal number of clusters

Elbow method Silhouette method Gap statistic

elbow method

# Determining Optimal clusters (k) Using Elbow method
fviz_nbclust(x = df_Norm,FUNcluster = kmeans, method = 'wss' )

observation: elbow methods gives 3 as the optimal cluster, we will check other methods.

silhouette method

# Determining Optimal clusters (k) Using Average Silhouette Method

fviz_nbclust(x = df_Norm,FUNcluster = kmeans, method = 'silhouette' )

observation; silhouette method chooses 2 as optimal cluster.

There is another method called Gap-Static used for finding the optimal value of K.

library("factoextra")
library("cluster")
library(caret)
library(gridExtra) # for grid.arrange
# compute gap statistic
#set.seed(1234)
#gap_stat <- clusGap(x = df_Norm, FUN = kmeans, K.max = 8, nstart = 25,iter.max=50)

# Print the result
#print(gap_stat, method = "firstmax")

note: this code keeps on crashing the program thus i will not run it.

The below codes can be used to get the optimal k if thest code was to run without any issue.

#visualizing to get the optimal cluster

# plot the result to determine the optimal number of clusters.
##fviz_gap_stat(gap_stat)

We can chose the k that most of these approaches suggest as the number of optimal clusters, we can perform the final analysis and extract the results using optimal clusters.

For my case, the third method of choosing optimal is crashing. i have elbow method suggesting k=3 as optimal cluster and silhouette method giving 2 as optimal cluster.

i will go with elbow method suggestion.

# Compute k-means clustering with k = 3, optimal cluster
set.seed(123)
final <- kmeans(df_Norm, centers = 3, nstart = 25)
print(final)
## K-means clustering with 3 clusters of sizes 8564, 1742, 1893
## 
## Cluster means:
##   Administrative Informational ProductRelated BounceRates PageValues
## 1    -0.34106429    -0.2749808     -0.2307625   0.1363908 -0.1149003
## 2     0.04871678    -0.1639393     -0.3236744  -0.3400093  0.3185973
## 3     1.49815634     1.3948854      1.3418334  -0.3041495  0.2266295
##    SpecialDay       Month OperatingSystems      Browser       Region
## 1  0.08025934 -0.01555918      -0.01119696 -0.003081778 -0.005190229
## 2 -0.21372987 -0.08281177       0.06732698  0.124541821  0.118748122
## 3 -0.16641500  0.14659637      -0.01130102 -0.100665347 -0.085795091
##   TrafficType VisitorType     Weekend
## 1  0.01463032   0.4055620 -0.03280887
## 2  0.04946766  -2.4200735  0.09918651
## 3 -0.11170984   0.3922528  0.05715388
## 
## Clustering vector:
##     [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
##    [37] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 3 1 1 1 1 1 1 1 1 1
##    [73] 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1
##   [109] 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
##   [145] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
##   [181] 1 1 3 1 1 3 3 3 1 3 1 1 1 1 2 1 2 2 1 1 2 1 1 2 2 2 2 1 1 1 1 1 1 1 1 1
##   [217] 1 1 1 1 1 2 1 1 3 1 1 1 1 1 1 1 1 3 1 1 1 1 3 1 1 1 1 1 1 1 3 1 1 1 1 1
##   [253] 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 3 1
##   [289] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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3 3 1 3 2 1 1 1 1 3 1 3 2 3 1 1 2 1 3 2 1 2
## [12025] 3 2 1 3 2 1 2 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 2 2 3 3 1 3 1 3 1 1 3 3 3
## [12061] 3 1 1 1 1 1 1 2 2 1 1 1 1 3 1 1 1 1 3 2 2 1 1 1 1 3 2 2 1 1 3 2 1 3 1 1
## [12097] 1 1 1 1 1 1 3 2 3 3 1 1 1 1 1 1 2 3 1 1 3 1 2 1 2 1 1 1 3 1 1 1 2 3 1 1
## [12133] 1 1 3 3 1 1 1 1 1 3 1 1 1 2 1 3 1 1 3 1 1 1 3 1 3 1 1 1 1 1 1 1 1 2 2 1
## [12169] 1 1 1 1 1 1 1 1 3 1 1 1 3 3 3 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 2
## 
## Within cluster sum of squares by cluster:
## [1] 80208.04 23451.01 28017.69
##  (between_SS / total_SS =  17.0 %)
## 
## Available components:
## 
## [1] "cluster"      "centers"      "totss"        "withinss"     "tot.withinss"
## [6] "betweenss"    "size"         "iter"         "ifault"

We can visualize the results using the below code.

fviz_cluster(final, data = df_Norm)

these are the 3 optimal clusters.

# showing how the clusters respond to the revenue variable
table(final$cluster, df_dataset$Revenue)
##    
##     FALSE TRUE
##   1  7614  950
##   2  1301  441
##   3  1376  517

this is how the 3 clusters responds to the revenue variable that was dropped.

We can extract the clusters and add to our initial data to do some descriptive statistics at the cluster level

df_Norm %>% 
  mutate(Cluster = final$cluster) %>%
  group_by(Cluster) %>%
  summarize_all('median')
## # A tibble: 3 x 14
##   Cluster Administrative Informational ProductRelated BounceRates PageValues
##     <int>          <dbl>         <dbl>          <dbl>       <dbl>      <dbl>
## 1       1         -0.703        -0.399         -0.382      -0.329     -0.319
## 2       2         -0.102        -0.399         -0.427      -0.450     -0.319
## 3       3          1.40          1.17           0.851      -0.355     -0.223
## # ... with 8 more variables: SpecialDay <dbl>, Month <dbl>,
## #   OperatingSystems <dbl>, Browser <dbl>, Region <dbl>, TrafficType <dbl>,
## #   VisitorType <dbl>, Weekend <dbl>

these are median of variables in our clusters.

summary: Find optimal number of clusters to be 3 using Elbow method, Silhouette method and Gap-Static method. and Partited the data using the optimal number of clustering to get the final result.

Hierarchical clustering

# Before hierarchical clustering, we can compute some descriptive statistics
# ---
# 
desc_stats <- data.frame(
  Min = apply(df_Norm, 2, min),    # minimum
  Med = apply(df_Norm, 2, median), # median
  Mean = apply(df_Norm, 2, mean),  # mean
  SD = apply(df_Norm, 2, sd),      # Standard deviation
  Max = apply(df_Norm, 2, max)     # Maximum
)
desc_stats <- round(desc_stats, 1)
head(desc_stats)
##                 Min  Med Mean SD  Max
## Administrative -0.7 -0.4    0  1  7.4
## Informational  -0.4 -0.4    0  1 18.4
## ProductRelated -0.7 -0.3    0  1 15.1
## BounceRates    -0.5 -0.4    0  1  4.0
## PageValues     -0.3 -0.3    0  1 19.1
## SpecialDay     -0.3 -0.3    0  1  4.7

observation: the variable has low mean and variance since they are already standardized.

Agglomerative Nesting (Hierarchical Clustering) using euclidean

we will use the rescaled dataset df_Norm for hierarchical clustering.

library(cluster)
# First we use the dist() function to compute the Euclidean distance between observations, 
# res.hc will be the first argument in the hclust() function dissimilarity matrix
# ---
# first we compute the euclidean distance using euclidean metric
eucl_dist<- dist(df_Norm, method = "euclidean")
# checking euclidean distance in matrix form 
as.matrix(eucl_dist)[1:6, 1:6]
##          1         2        3        4        5         6
## 1 0.000000 4.5852261 4.719874 4.105005 5.303062 4.2929926
## 2 4.585226 0.0000000 5.979944 1.688103 2.758299 0.5729153
## 3 4.719874 5.9799443 0.000000 4.585254 5.921832 5.7373501
## 4 4.105005 1.6881034 4.585254 0.000000 2.561322 1.4710291
## 5 5.303062 2.7582994 5.921832 2.561322 0.000000 2.6917079
## 6 4.292993 0.5729153 5.737350 1.471029 2.691708 0.0000000

this is the euclidean distance of our dataset.

# then we compute hierarchical clustering using the Ward method
res_hcl <- hclust(eucl_dist, method =  "ward.D2")
res_hcl
## 
## Call:
## hclust(d = eucl_dist, method = "ward.D2")
## 
## Cluster method   : ward.D2 
## Distance         : euclidean 
## Number of objects: 12199

we plot the dendogram

# Lastly, we plot the obtained dendrogram
# ---
# 
plot(res_hcl, cex = 0.6, hang = -1)

since there is no method to determine the optimal number of cluster, we can decide on our own assessment.

we will now introduce the number of cluster we want.

##Cut the dendrogram into different groups One of the problems with hierarchical clustering is that, it does not tell us how many clusters there are, or where to cut the dendrogram to form clusters.

You can cut the hierarchical tree at a given height in order to partition your data into clusters. The R base function cutree() can be used to cut a tree, generated by the hclust() function, into several groups either by specifying the desired number of groups or the cut height. It returns a vector containing the cluster number of each observation.

# Cut the tree visualizing
# we will get 10 clusters
# fviz_dend(res_hcl, cex = 0.5, k = 10, rect = TRUE, color_labels_by_k = TRUE)

note: it is taking long to run, thus i will use the below method

# Cut tree into 60 groups
grp <- cutree(res_hcl, k = 10)
head(grp, n = 10)
##  [1] 1 2 1 2 3 2 4 1 4 4
# Number of data points in each cluster
table(grp)
## grp
##    1    2    3    4    5    6    7    8    9   10 
##  532 4246 1759 1099  652  715 1380  841  882   93

the above reflects the number of datapoints in each of the 10 clusters.

Agglomerative (Hierarchical Clustering) using manhattan method

# We now use the R function hclust() for hierarchical clustering
# ---
# 

# First we use the dist() function to compute the Euclidean distance between observations, 
# d will be the first argument in the hclust() function dissimilarity matrix
# ---
# first we compute the manhattan distance using manhattan metric
#
man_distance <-dist(df_Norm,method= "manhattan")
#
as.matrix(man_distance)[1:6, 1:6]
##           1          2         3        4         5          6
## 1  0.000000  6.3636314  7.135641 7.279199 10.649157  6.6460385
## 2  6.363631  0.0000000 10.796134 3.118089  5.166535  0.9779403
## 3  7.135641 10.7961342  0.000000 8.176076 12.378522 10.5805102
## 4  7.279199  3.1180891  8.176076 0.000000  4.202446  2.9024650
## 5 10.649157  5.1665346 12.378522 4.202446  0.000000  4.5921735
## 6  6.646038  0.9779403 10.580510 2.902465  4.592174  0.0000000
# We then hierarchical clustering using the Ward's method
# ---
# 
man_hc <- hclust(man_distance)
man_hc
## 
## Call:
## hclust(d = man_distance)
## 
## Cluster method   : complete 
## Distance         : manhattan 
## Number of objects: 12199
# Lastly, we plot the obtained dendrogram
# ---
# 
plot(man_hc, cex = 0.6, hang = -1)

### Enhanced Visualization of Dendrogram

# Cut the tree

library(factoextra)
library("ggplot2")

##fviz_dend(man_hc, cex = 0.5, k = 10,color_labels_by_k = TRUE)

note: taking long to load, thus i could not persue further. however, we have insights below.

# Cut tree into 25 groups
grp <- cutree(man_hc, k = 10)
head(grp, n = 10)
##  [1] 1 2 1 2 2 2 1 1 3 3
# Number of data points in each cluster
table(grp)
## grp
##    1    2    3    4    5    6    7    8    9   10 
##  610 9101  878  622  851   12   68    1   53    3

this is the number of data points when we use manhattan

conclusion: the methods of Agglomerate hirarchy yields difference number of datapoints in each clusters. this is because euclidean uses squared errors where as manhattan looks at absolute values.

there is also another type of hirarchical clustering called Disisive Analysis clustering. This is the opposite of Agglomerativetype.

I will not work it out for now.