pasteur.table.AttributeEncoderHolder#

class pasteur.table.AttributeEncoderHolder(encoder, **kwargs)[source]#

Receives tables that have been encoded by the base transformers and have attributes, and reformats them to fit a specific model.

Attributes

Methods

decode(data)

encode(tables, ctx, ids)

fit(attrs, tables, ctx_attrs, ctx, ids)

get_factory(*args, **kwargs)

Returns a factory that registers this module to the system.

get_metadata()

ctx_encoders: dict[str, dict[str, dict[str | tuple[str, ...], AttributeEncoder[TypeVar(META)]]]]#
decode(data)[source]#
encode(tables, ctx, ids)[source]#
fit(attrs, tables, ctx_attrs, ctx, ids)[source]#
classmethod get_factory(*args, **kwargs)#

Returns a factory that registers this module to the system.

Any *args and **kwargs passed to this function will be saved and passed to the module’s __init__() method when calling build().

get_metadata()[source]#
Return type:

dict[str, dict[str | tuple[str, ...], TypeVar(META)]]

name: str = ''#
postprocess_enc: Optional[PostprocessEncoder[TypeVar(META), Any]]#
table_encoders: dict[str, dict[str | tuple[str, ...], AttributeEncoder[TypeVar(META)]]]#