Median Polish


Example: Median Polish Algorithm

Iterative algorithm for removing any trends by computing medians for various coordinates on the spatial domain D.

The median polish algorithm assumes: m(s) = grand effect + row(s) + column(s)

Steps in Algorithm:

1. Take the median of each row and record the value to the side of the row. Subtract the row median from each point in that particular row.

2. Compute the median of the row medians, and record the value as the grand effect. Subtract this grand effect from each of the row medians.

3. Take the median of each column and record the value beneath the column. Subtract the column median from each point in that particular column.

4. Compute the median of the column medians, and add the value to the current grand effect. Subtract this addition to the grand effect from each of the column medians.

5. Repeat steps 1-4 until no changes occur with the row or column medians.