lace.Codebook.from_df
- classmethod Codebook.from_df(name: str, df: DataFrame | DataFrame, cat_cutoff: int = 20, no_hypers: bool = False)
Infer a codebook from a DataFrame.
- Parameters:
name (str) – The name of the engine
df (pandas.DataFrame or polars.DataFrame) – The data that will be used to create the engine. Note that polars DataFrame must have an ID or Index column.
cat_cutoff (int, optional) – The maximum value an unsigned integer may take on before its column is considered Count type. Default is 20.
no_hypers (bool, optional) – If True, disable hyper prior inference. Priors will be derived from the data and will remain static.