LinMixin.mappings#
- property LinMixin.mappings: dict[str, CategoryMapping]#
A dictionary of label-integer mappings for all categorical variables in this term.
Examples
>>> import pandas as pd >>> import liesel_gam as gam >>> df = pd.DataFrame({"cat": ["a", "b", "a"]}) >>> term = gam.TermBuilder.from_df(df).lin("cat") >>> term.mappings["cat"].labels_to_integers(["b"]).tolist() [1]