pasteur.table.SeqTransformerWrapper#

class pasteur.table.SeqTransformerWrapper(modules, parent=None, seq=None, ctx=None, seq_col=None, ctx_to_ref=None, order=None, max_len=None, first_seq_ref_itself=False, ref=None, **kwargs)[source]#

Attributes

deterministic

For a given output, the input is the same.

lossless

The decoded output equals the input.

name

stateful

Transformer fits variables.

mode

Methods

fit(table, data, ref, ids[, seq_val, seq])

Fits to the provided data

fit_transform(table, data[, ref, ids, ...])

get_attributes()

get_factory(*args, **kwargs)

Returns a factory that registers this module to the system.

get_seq_value()

reduce(other)

reverse(data, ctx, ref, ids)

When reversing, the data column contains encoded data, whereas the ref column contains decoded/original data.

transform(data, ref, ids[, seq])

deterministic = True#

For a given output, the input is the same.

fit(table, data, ref, ids, seq_val=None, seq=None)[source]#

Fits to the provided data

Return type:

tuple[SeqValue, Series] | None

fit_transform(table, data, ref=None, ids=None, seq_val=None, seq=None)#
Return type:

tuple[DataFrame, dict[str, DataFrame]] | tuple[DataFrame, dict[str, DataFrame], Series]

get_attributes()[source]#
Return type:

tuple[Mapping[str | tuple[str, ...], Attribute], dict[str, Mapping[str | tuple[str, ...], Attribute]]]

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_seq_value()[source]#
Return type:

SeqValue | None

lossless = True#

The decoded output equals the input.

mode: Literal['dual', 'single', 'notrn']#
name: str = 'seq'#
reduce(other)[source]#
reverse(data, ctx, ref, ids)[source]#

When reversing, the data column contains encoded data, whereas the ref column contains decoded/original data. Therefore, the referred columns have to be decoded first.

Return type:

DataFrame

stateful = False#

Transformer fits variables.

transform(data, ref, ids, seq=None)[source]#
Return type:

tuple[DataFrame, dict[str, DataFrame]] | tuple[DataFrame, dict[str, DataFrame], Series]