reddmetrics/forma-clj — pull request #48 by robinkraft (2012-06-04 18:51:17+00:00)
Title: Drop pixels with neighbors on coast (coast pixels dist2border = 1)

Dropping all pixels that are adjacent to water (dist2border = 1) and pixels whose neighbors are adjacent to water (dist2border = 2). The idea is that the centroid of a pixel could be on the beach, which means it's half water, half land, and therefore messy. The next pixel inland (dist2border = 2) would have this water pixel as its neighbor, so that muddies the signal as well (no pun intended).

Neighborhoods are determined prior to screening, so a pixel with dist2border = 3 would still contain the information from its nearly coastal neighbor with dist2border = 2. But the pixel with dist2border = 2 would not be used to calculate the beta vector.