POSSMExtractor#

class ts3.models.transductive.POSSMExtractor(*args, normalize='none', **kwargs)[source]#

Bases: ts3.models.transductive.base.TransductiveExtractor

POSSM’s unit_emb rows, optionally length-matched to the pretrain part.

normalize="scale_only" multiplies the eval part by one scalar so its mean vector length matches the pretrain part’s. Every eval vector keeps its direction and the eval cloud keeps its shape; only its radius moves.

property name: str#

Names the embeddings file, so two runs of one model do not overwrite each other.

encode(regime)[source]#

Embeddings and uids for every unit of regime this extractor can represent.

Returns (N, D) and (N,) in matching order. Units the extractor cannot represent may be omitted: the probe join drops anything TS3 does not score, and insists separately that the eval side is complete.

Return type:

tuple[Tensor, ndarray]

read(state_dict, dataset, uids)[source]#

Embeddings for uids out of one checkpoint’s weights, and the uids they match.

Return type:

tuple[Tensor, ndarray]