decode_term
- pyoptex.utils.model.decode_term(term, model, factors)[source]
Decodes the encoded terms (the encoded categorical variables). For example, ‘y ~ A_0 + A_1 + B * A_0’ is decoded to ‘y ~ A + B * A’ according to the given model matrix.
Parameters
- termnp.array(1d)
The encoded term.
- modelnp.array(2d) or pd.DataFrame
The model.
- factorslist(
Factor) The list of factors in the design. This parameter is used to determine whether the factor is continuous or categorical (and required decoding).
Returns
- decoded_termnp.array(1d)
The decoded term.