encode_names
- pyoptex.utils.model.encode_names(col_names, effect_types)[source]
Encodes the column names according to the categorical expansion of the factors.
For example, if there is one categorical factor with three levels ‘A’ and one continuous factor, the encoded names are [‘A_0’, ‘A_1’, ‘B’].
Parameters
- col_nameslist(str)
The base column names
- effect_typesnp.array(1d)
An array indicating whether the effect is continuous (=1) or categorical (with >1 levels).
Returns
- enc_nameslist(str)
The list of encoded column names.