great code (as what you doing )
"An important feature is that dummy variables are handled properly, so that for instance powers of a dummy variable do not exist as duplicates of the original."
just clarifying
given categorical data
f1 f2 f3
a c u
b g x
a k y
after features interaction will it be for row N1 ?
f1 f2 f3 f1 f2 f3 f1 f2 f1f3 f2f3 f1f2f3
a c u => a c u ac au cu acu
to make sure
there will not be ua, ca , ... uca , etc