1 of 19

Descriptive Data Mining

Clustering

1

Business Analytics

Lecture # 08

2 of 19

TOPICS to be COVERED

01

Cluster Analysis

02

Measuring Similarity Between Observations

03

Types Of Clustering

04

Hierarchical Clustering

© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use.

3 of 19

CLUSTER ANALYSIS

  • It Used to classify objects (cases) into homogeneous groups called clusters.
  • Objects in each cluster tend to be similar and dissimilar to objects in the other clusters

  • The goal of clustering is to segment observations into similar groups based on the observed variables. Clustering can be employed during the data-preparation step to identify variables or observations that can be aggregated or removed from consideration.

3

© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use.

4 of 19

CLUSTER ANALYSIS continued.…

  • Cluster analysis is commonly used in marketing to divide consumers into different homogeneous groups, a process known as market segmentation.

4

© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use.

5 of 19

An Ideal Clustering Situation

Variable 2

Variable 1

© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use.

6 of 19

Example

  • we consider the use of cluster analysis to assist a company called Know Thy Customer (KTC), a financial advising company that provides personalized financial advice to its clients

  • Age = age of the customer in whole years
  • Female = 1 if female, 0 if not
  • Income = annual income in dollars
  • Married = 1 if married, 0 if not
  • Children = number of children
  • Loan = 1 if customer has a car loan, 0 if not
  • Mortgage = 1 if customer has a mortgage, 0 if not

6

© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use.

7 of 19

Measuring Similarity Between Observations

  • we need explicit measurements of similarity or, conversely, dissimilarity.
  • Some metrics track similarity between observations, and a clustering method using such a metric would seek to maximize the similarity between observations.
  • Other metrics measure dissimilarity, or distance, between observations, and a clustering method using one of these metrics would seek to minimize the distance between observations in a cluster.

7

© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use.

8 of 19

Euclidean Distance

  • Euclidean distance is the most common method to measure dissimilarity between observations.
  • Let observations
  • u =(u1,u2 ,…,uq) and v = (v1, v2 ,…, vq) each comprise measurements of q variables. The Euclidean distance between observations u and v is

8

© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use.

9 of 19

Matching Coefficient

  • When clustering observations solely on the basis of categorical variables encoded as 0–1 (or dummy variables), a better measure of similarity between two observations can be achieved by counting the number of variables with matching values.
  • The simplest overlap measure is called the matching coefficient and is computed as follows:

9

© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use.

10 of 19

10

© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use.

11 of 19

11

© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use.

12 of 19

Weakness of SMC

  • One weakness of the matching coefficient is that if two observations both have a 0 entry for a categorical variable, this is counted as a sign of similarity between the two observations.

  • However, matching 0 entries do not necessarily imply similarity. For instance, if the categorical variable is Own A Minivan, then a 0 entry in two different observations does not mean that these two people own the same type of car; it means only that neither owns a minivan.

12

© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use.

13 of 19

Jaccard’s Coefficient

  • To avoid this similarity due to the absence of a feature,
  • a similarity measure called Jaccard’s coefficient does not count matching zero entries and is computed as follows:

13

© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use.

14 of 19

14

© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use.

15 of 19

15

© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use.

16 of 19

Types of clustering

  • Hierarchical clustering
  • k-mean clustering

16

© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use.

17 of 19

Hierarchical Clustering

  • Hierarchical clustering consider bottom-up approach that starts with each observation belonging to its own cluster and then sequentially merges the most similar clusters to create a series of nested clusters.

17

© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use.

18 of 19

Hierarchical Clustering

18

b

d

c

e

a

a b

d e

c d e

a b c d e

Step 0

Step 1

Step 2

Step 3

Step 4

bottom-up

Initialization:

Each object is a cluster

Iteration:

Merge two clusters which are

most similar to each other;

Until all objects are merged

into a single cluster

© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use.

19 of 19

Thank You !

© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use.