Build the Whole Pipeline First, Then Study Where the Boxes Connect

Young scientists often struggle to develop and validate a large-scale project efficiently. Most real projects have several steps. You might segment images, extract features from the segmentations, and then associate those features with an outcome, such as a prognostic or therapy-response model.

I think of each step as a box, and of whatever passes between boxes as an interface: the data itself, its format, and the assumptions the receiving step makes about it.

Some interfaces are internal. Segmentation masks feed your feature extraction code, and the feature table feeds your outcome model. Others are external, and easy to overlook. Your raw dataset is an interface between the sampling mechanism (say, the clinic that collected the patients) and your pipeline. Who ended up in the dataset, which scanner and stain were used, and which outcomes are missing or censored are all things your pipeline silently assumes about the world. When the clinic’s sampling doesn’t match what your pipeline expects, the problem has nothing to do with any single algorithm or step. It lives at the boundary, just like the internal ones.

The natural instinct is to do each box as well as you possibly can before moving to the next.

That instinct is a trap.

Continue reading Build the Whole Pipeline First, Then Study Where the Boxes Connect →