Lesson 8 of 20
Same rate, different picture — scattered versus clumped
what one number erases
So far we have been turning one map into one number. A picture of 136,517 cells became the single line "45.66%". What disappeared along the way?
Where things are disappeared.
Lymphocytes spread evenly through the tumour, and lymphocytes piled into one corner. A pathologist would never call those two pictures the same, and yet they get the same number.
And yet the cluster counts are 235 against 2. Completely different pictures.
Python
Runs in your browser
How do you count clusters? With a very simple algorithm called
connected-component labelling: group touching red cells into one blob and
number them. One line of scipy.ndimage.label().
One stomach cancer slide — its red cells are scattered across hundreds of small clusters.
Python
Runs in your browser
Each cancer type has its own character of scattering — texture the infiltration rate alone never showed.
Python
Runs in your browser
🤔 Check yourself
Two slides have the same infiltration rate but very different cluster counts. Which is true?
Answer The rate only counts how many cells are red. It says nothing about how those cells are arranged. The two values are different pieces of information.
🤔 Check yourself
Why impose a minimum size like '5 tiles or more' when counting clusters?
Answer When the CNN slips, a lone cell turns red. Count those as clusters and 'cluster count' quietly becomes a count of false positives.