gpboost.get_nested_categories

gpboost.get_nested_categories(outer_var, inner_var)[source]

Auxiliary function to create categorical variables for nested grouped random effects.

Parameters:
  • outer_var (list, numpy array or pandas Series with numeric or string data) – A categorical grouping variable within which the inner_var is nested in.

  • inner_var (list, numpy array or pandas Series with numeric or string data) – The inner nested categorical grouping variable

Returns:

  • nested_var (numpy array) – A categorical variable such that inner_var is nested in outer_var

  • Authors: – Fabio Sigrist