class sakkara.model.composable.hierarchical.base.HierarchicalComponent(name: str | None, group: str | Tuple[str, ...] | None, subcomponents: Dict[str, T])#

Base class for hierarchical components, i.e., components that may be defined on one or several column, composed by other ModelComponent objects

Parameters:
  • name – Name of the corresponding variable to register in PyMC.

  • group – Group of which the component is defined for.

  • members – Subset of members of column the component is defined for.

  • subcomponents – Dict of underlying ModelComponent objects.

build_representation(groupset: GroupSet)#

Build the group of this component, performed after prebuild.

Parameters:

groupset – Groups to be used for building all components of the model.

prebuild(groupset: GroupSet) None#

All operations to be performed before building group and variable, e.g., building the underlying components.

Parameters:

groupset – Groups to be used for building all components of the model.