- class sakkara.model.DataComponent(data: ndarray[Any, dtype[ScalarType]] | float | int, group: str | Tuple[str, ...], name: str | None = None)#
Wrap data into a component
- Parameters:
data – Array of data to wrap.
group – Group(s) of which the component is defined for. The number of elements should correspond to the order of the data array.
name – Name of the component.
- 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.
- build_variable() None#
Build the variable, performed after prebuild and build_group.
- to_minibatch(batch_size: int, group: str) ModelComponent#
Convert the component to counterpart suitable for mini-batches