neuralset.extractors.base.BaseStatic

pydantic model neuralset.extractors.base.BaseStatic[source][source]

Base class for extractors that produce one feature vector per event.

Subclasses implement get_static() instead of the full dynamic pipeline. frequency defaults to 0 (no time axis).

Fields:
field frequency: float = 0.0[source]
get_static(event: Event) Tensor[source][source]

Return a single feature vector for the given event.

Override this method in subclasses to produce a static (non-temporal) embedding for one event. The returned tensor should have no time dimension — temporal wrapping is handled by BaseStatic automatically.

Parameters:

event (Event) – The event to extract a feature from.

Returns:

A tensor of shape (*feature_shape,) (no time axis).

Return type:

torch.Tensor

requirements: tp.ClassVar[tuple[str, ...]] = ()[source]