class sakkara.model.base.ModelComponent#

Abstract class for all model components

build(groupset: GroupSet) None#

Method to call for building variables from the component. Will chronological order call ModelComponent.prebuild(), ModelComponent.build_representation(), and ModelComponent.build_variable()

abstract build_representation(groupset: GroupSet) None#

Build the group of this component, performed after prebuild.

Parameters:

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

abstract build_variable() None#

Build the variable, performed after prebuild and build_group.

abstract clear() None#

Clear variable and group for this and underlying components

abstract 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.

abstract retrieve_groups() Set[str]#

Retrieve group names for this and underlying components

abstract to_minibatch(batch_size: int, group: str) ModelComponent#

Convert the component to counterpart suitable for mini-batches