class sakkara.relation.group.Group(name: str, members: ndarray[Any, dtype[Any]])#

Class corresponding to a data frame column, with capabilities of handling relations to other groups.

Parameters:
  • name – Name of the group, should be same as the column

  • members – The names of the unique column values, the members, ordered by their first appearance.

add_child(child: Group) None#

Add a child relation to this group

Parameters:

child – The child group

add_parent(parent: Group, parent_mapping: ndarray[Any, dtype[int]]) None#

Add a parent relation to this group

Parameters:
  • parent – The parent group

  • parent_mapping – Indices of parent members (of the parent group), ordered by the corresponding member of this group

add_twin(twin: Group) None#

Add a twin relation to this group

Parameters:

twin – The twin group

clear_minibatch() None#

Reset the minibatch variable of this group.

get_minibatch(batch_size) TensorVariable#

Get a PyMC minibatch variable created from this group. Creates a new instance if not already created.