Search This Blog

24.1.11

Methods of Clustering Data in SPSS- Nandan Shah (12148)


Clustering is a method of identifying groups of individuals or objects that are similar to each other but different from individuals in other groups can be intellectually satisfying, profitable, or sometimes both.

Clustering helps to take advantage of these similarities to target offers to subgroups that are most likely to be receptive to them thereby making the process more effective & cost efficient.

SPSS has three different procedures that can be used to cluster data:

Hierarchical Cluster

K-Means Cluster

Two-Step Cluster


Hierarchical Cluster

Hierarchical clustering is used if the data set is small & one wants to easily examine solutions with increasing numbers of clusters.

Hierarchical clustering is one of the most straightforward methods. It can be either agglomerative or divisive.

Agglomerative hierarchical clustering begins with every case being a cluster unto itself. At successive steps, similar clusters are merged. The algorithm ends with everybody in one single cluster. It is a 'bottom up' approach. Divisive clustering starts with everybody in one cluster and ends up with everyone in individual clusters. It is a 'top down" approach.


In agglomerative clustering, once a cluster is formed, it cannot be split; it can only be combined with other clusters. Agglomerative hierarchical clustering doesn’t let cases separate from clusters that they’ve joined.

To form clusters using a hierarchical cluster analysis, one must select:

· A criterion for determining similarity or distance between cases

· A criterion for determining which clusters are merged at successive steps

· The number of clusters you need to represent your data


Similarity or Distance Between Cases

Because the goal of this cluster analysis is to form similar groups one has to decide on the criterion to be used for measuring similarity or distance. Distance is a measure of how far apart two objects are, while similarity measures how similar two objects are. For cases that are alike, distance measures are small and similarity measures are large. There are many different definitions of distance and similarity. Some, like the Euclidean distance, are suitable for only continuous variables, while others are suitable for only categorical variables. There are also many specialized measures for binary variables.

Standardizing the Variable

If variables are measured on different scales, variables with large values contribute more to the distance measure than variables with small values. Hence the variables need to be standardised.

How Should Clusters Be Combined?

Agglomerative hierarchical clustering starts with each being a cluster. At the next step, the two items who have the smallest value for the distance measure (or largest value if you are using similarities) are joined into a single cluster. At the second step, either a third case is added to the cluster that already contains two cases or two other cases are merged into a new cluster. At every step, either individual cases are added to existing clusters, two individuals are combined, or two existing clusters are combined.


K-Means Cluster

K-Means clustering doesn't require computation of all possible distances unlike in the case of Hierarchical clustering that requires a distance or similarity matrix between all pairs of cases. Thus if the number of clusters is known & the data is moderately sized, one can use k-means clustering.

K-Means clustering differs from hierarchical clustering in several ways. One has to know in advance the number of clusters one wants. One can’t get solutions for a range of cluster numbers unless one reruns the analysis for each different number of clusters. The algorithm repeatedly reassigns cases to clusters, so the same case can move from cluster to cluster during the analysis. In agglomerative hierarchical clustering, on the other hand, cases are added only to existing clusters. They’re forever captive in their cluster, with a widening circle of neighbours.

The algorithm is called k-means, where k is the number of clusters required, since a case is assigned to the cluster for which its distance to the cluster mean is the smallest. The action in the algorithm centers around finding the k-means. One starts out with an initial set of means and classify cases based on their distances to the centers. Next, step is to compute the cluster means again, using the cases that are assigned to the cluster; then, reclassify all cases based on the new set of means. This step is repeated until cluster means don’t change much between successive steps. Finally,the means of the clusters are calculated once again and the cases are assigned to their permanent clusters.

Initial Cluster Centers

The first step in k-means clustering is finding the k centers. This is done iteratively. Start with an initial set of centers and then modify them until the change between two iterations is small enough. If one has good guesses for the centers, one can use those as initial starting points; otherwise, one can let SPSS find k cases that are well-separated and use these values as initial cluster centers.

After the initial cluster centers have been selected, each case is assigned to the closest cluster, based on its distance from the cluster centers. After all of the cases have been assigned to clusters, the cluster centers are recomputed, based on all of the cases in the cluster. Case assignment is done again, using these updated cluster centers. One has to keep assigning cases and recomputing the cluster centers until no cluster center changes appreciably or the maximum number of iterations (10 by default) is reached.

Final Cluster Centers

After iteration stops, all cases are assigned to clusters, based on the last set of cluster centers. After all of the cases are clustered, the cluster centers are computed one last time. Using the final cluster centers, you can describe the clusters.


Two-Step Cluster

If the data file is large or a mixture of continuous and categorical variables, SPSS two-step procedure can be used. It requires only one pass of data (which is important for very large data files), and it can produce solutions based on mixtures of continuous and categorical variables and for varying numbers of clusters.

The Two-Step Cluster Analysis procedure is an exploratory tool designed to reveal natural groupings (or clusters) within a data set that would otherwise not be apparent.

The algorithm employed by this procedure has several features that differentiate it from traditional clustering techniques:

The ability to create clusters based on both categorical and continuous variables.

Automatic selection of the number of clusters.

The ability to analyze large data files efficiently.


Step 1: Preclustering: Making Little Clusters

The goal of preclustering is to reduce the size of the matrix that contains distances between all possible pairs of cases. Preclusters are just clusters of the original cases that are used in place of the raw data in the hierarchical clustering. As a case is read, the algorithm decides, based on a distance measure, if the current case should be merged with a previously formed precluster or start a new precluster. When preclustering is complete, all cases in the same precluster are treated as a single entity. The size of the distance matrix is no longer dependent on the number of cases but on the number of preclusters.

Step 2: Hierarchical Clustering of Pre-clusters

In the second step, SPSS uses the standard hierarchical clustering algorithm on the preclusters. It takes sub-clusters resulting from the first step as input and then groups them into the desired number of clusters. Since the number of sub-clusters is much less than the number of original records, you can use traditional clustering methods effectively. SPSS uses the agglomerative hierarchical clustering method primarily because it works well with the auto-cluster procedure.


References:

http://www.resample.com/xlminer/help/HClst/HClst_intro.htm

http://en.wikipedia.org/wiki/Cluster_analysis

http://www.spss.ch/upload/1122644952_The%20SPSS%20TwoStep%20Cluster%20Component.pdf


Submitted By:

Nandan Shah
Roll Number: 12148
Finance Batch of 2009-11
SIBM Bangalore.



No comments:

Post a Comment