This article introduces a case study in which hierarchical cluster analysis using spatial metrics was used to classify defect patterns on a wafer map through a trial and error process.
In the wafer map below, blue indicates normal parts and red indicates defects for each die (chip).

The figure below shows an example of defect pattern classification for nine wafer maps.
Ring : Defects distributed around the circumference, Center : Defects distributed near the center
Donut : Defects are distributed in a donut shape, Scratch : Defects are distributed in a straight line

This type of classification can be done by human intuition, but when there are a large number of wafer maps, we consider using cluster analysis to automatically classify them into several patterns.
Cluster analysis using spatial indices
Cluster analysis is a method of grouping rows with similar values (in this example, "wafers") into several groups based on multivariate data.
In the case of data composed of XY coordinates, such as a wafer map, cluster analysis is usually performed by converting it into one-dimensional coordinate data as shown below.
In this data, the column names indicate (X coordinate, Y coordinate), with normal being 0 and defective being 1. For example, the column "1 21" contains the normal/abnormal values for the position where the X coordinate is 1 and the Y coordinate is 21 on each wafer.

However, when converted to one-dimensional coordinates, the spatial relationship of two-dimensional coordinates is lost , such as when defects occur when nearby points are adjacent to each other or when defects occur in a specific direction.
In JMP, in addition to coordinate data, you can also perform cluster analysis using spatial indicators such as the following:

In the case of wafer maps, there are cases where defects occur on the same radius, cases where defects occur at a certain angle from the center, cases where defects are lined up in a line, etc. In such cases, it is expected that the defect pattern can be more appropriately classified by including spatial indicators.
Wafer map data to be used
We use data from 332 wafer maps, each with one of the seven defect patterns listed below.

Hierarchical Cluster Analysis with Spatial Indicators in JMP
To perform hierarchical cluster analysis including spatial indices in JMP, you need to prepare the data in a stacked format as shown below. For each wafer, it consists of a Y coordinate, an X coordinate, and a Defect (a value of 0 if normal at that coordinate, and a value of 1 if defective). Therefore, for each wafer, there are as many data rows as there are coordinates (2061 in this example).

If you check "Calculate spatial indices", you can perform cluster analysis using spatial indices (sector angle, circle radius, vein angle, vein position) as variables in addition to one-dimensional coordinate information (attributes).

Below are the results when we set the number of clusters to 20 and run the "Cluster Summary" option.

The "Cluster Summary" allows you to check the wafer map patterns for each of the 20 clusters. From this result, you can see that shapes such as Center, Donut, Loc, Edge_Ring, and Normal can be further classified.
However, we can also see that the defect pattern of Scratch has not been detected at this point.
To detect Scratch
So let's check the JMP help to understand what spatial indices mean.
| Sector angle |
This is an indicator that the distribution is fan-shaped or hemispherical. |
| Circle radius |
This is an indicator that shows a circular (donut-shaped) distribution. |
| Muscle angle |
This is an indicator that represents lines (straight lines) that are the same angle. |
| Muscle location |
This is an indicator that represents lines (straight lines) that are the same distance apart. |
From JMP Help
Scratches are thin, linear scratches that occur during the wafer manufacturing process. The angle and position of the lines appear to be important in detecting these linear patterns.
Therefore, we set the weights of muscle angle and muscle position to very large values (=1000) and show the results of clustering.

Finally, we can check the shape of the scratch. In this example, we increased the weight of related indicators to make it easier to detect straight lines, but other defect patterns such as Center and Donut can be properly detected.
Clustering results summary
The following figure shows the results when adjusting the weights. The vertical axis shows the actual defect patterns (labels), and the horizontal axis shows the 20 clusters classified by cluster analysis. The group of black dots on each coordinate represents the magnitude of the frequency.

These results show that the defect patterns are generally classified well.
Reference: About Hough transform
The spatial indices "streak angle" and "streak position" are related to a method of detecting straight lines in space called the Hough transform.

In the Hough transform, two-dimensional coordinates (x, y) are transformed into the (θ, r) space using the transformation formula r = x cos(θ) + y sin(θ). At this time,When multiple points lie on the same line in (x,y) space, there will be a point where the curves intersect in (θ,r) space. This mechanism uses this property to detect a group of points that lie on a line.
A JMP add-in is also available that allows you to understand this concept interactively.
Data Source
GitHub - Junliangwangdhu/WaferMap
JMP Add-In: Hough Transform Demo
Line Hough Transform Demo - JMP User Community
Reference paper: Applying the Hough transform to semiconductor wafer defect classification
White, K. P., Jr., Kundu, B., and Mastrangelo, C. M. (2008). “Classification of Defect Clusters on Semiconductor Wafers Via the Hough Transform.” IEEE Transactions on Semiconductor Manufacturing 21:272–278.
by Naohiro Masukawa (JMP Japan)
Naohiro Masukawa - JMP User Community