SubsetRepresentation
- class SubsetRepresentation(max_id, base=None, base_kwargs=None, shape=None, **kwargs)[source]
Bases:
Representation
A representation module, which only exposes a subset of representations of its base.
Initialize the representations.
- Parameters
max_id (
int
) – the maximum number of relations.base (
Union
[str
,Representation
,Type
[Representation
],None
]) – the base representations. have to have a sufficient number of representations, i.e., at least max_id.base_kwargs (
Optional
[Mapping
[str
,Any
]]) – additional keyword arguments for the base representationshape (
Union
[int
,Sequence
[int
],None
]) – The shape of an individual representation.kwargs – additional keyword-based parameters passed to super.__init__
- Raises
ValueError – if
max_id
is larger than the base representation’s mad_id