I agree the example would probably make a better notebook, but I don't think that actuallly applies very well to this particular bit:   I have purposely generalised this calculation (slightly), and put into a separate function, *for clarity alone*.
If you cut this calculation into chunks in a notebook, it might help to explain the details, but you would lose the generality of the description and I think it this case it would actually give *less* insight into how the features function.

As regards the density of comments:  If this were Iris code, I would be writing it for an audience of "developer capability", and I certainly wouldn't repeat things that are clearly explained in the documentation of the classes it is using.  However, this code is a very different thing for a different audience, and I think its necessary to include extra explanations so you can read through this without needing to know a lot of other stuff already (or be constantly looking things up).