Source: https://www.jmlr.org/papers/volume12/jenatton11a/jenatton11a.pdf