This information is already available from formulaic directly. When design is your design matrix, there is
design.model_spec.variable_terms
and
design.model_spec.term_variables
to map from variables to formulae terms and vice versa.
Originally posted by @grst in #181 (comment)
The complex logic used to handle interaction terms could indeed be simplified (as long as this logic is still needed).
This information is already available from formulaic directly. When
designis your design matrix, there isand
to map from variables to formulae terms and vice versa.
Originally posted by @grst in #181 (comment)
The complex logic used to handle interaction terms could indeed be simplified (as long as this logic is still needed).