MODULE REFERENCE
capabilities
anomx.base.capabilitiesCapability declarations for pipeline components.
Two complementary mechanisms live here:
Capabilitymixins express *what a normality model can do* (predict, reconstruct, embed, estimate densities or boundaries). They are composed onto implementations, e.g.class TemporalFusionTransformer(NormalityModel, Predictive, Representational).ComponentCapabilitiesexpresses *what data a component handles*, validated against observation-set characteristics before execution.
BoundaryEstimating
BoundaryEstimatingBases: Capability
The model can estimate a decision boundary around normal data.
Members
capability_keyattribute
capability_key = 'boundary_estimating'decision_functionmethod
decision_function(data: Any) -> AnyReturn signed distances to the normality boundary.
| Parameter | Type | Default |
|---|---|---|
data | Any | required |
Returns Any
Inherited members
Capability
CapabilityMarker base for model capability mixins.
Members
capability_keyattribute
capability_key: ClassVar[str] = ''get_capability_keyclassmethod
ComponentCapabilities
ComponentCapabilities(supports_unordered_samples: bool = True, supports_sequences: bool = False, supports_streaming: bool = False, supports_multivariate: bool = True, supports_variable_length: bool = True, supports_irregular_sampling: bool = True, supports_missing_values: bool = False, supports_graphs: bool = False, supports_hierarchies: bool = False, requires_regular_sampling: bool = False, requires_fixed_length: bool = False, requires_training: bool = True, requires_labels: bool = False, batch_fit: bool = True, incremental_fit: bool = False, batch_inference: bool = True, streaming_inference: bool = False)What a component supports and what it requires from its input.
| Parameter | Type | Default |
|---|---|---|
supports_unordered_samples | bool | True |
supports_sequences | bool | False |
supports_streaming | bool | False |
supports_multivariate | bool | True |
supports_variable_length | bool | True |
supports_irregular_sampling | bool | True |
supports_missing_values | bool | False |
supports_graphs | bool | False |
supports_hierarchies | bool | False |
requires_regular_sampling | bool | False |
requires_fixed_length | bool | False |
requires_training | bool | True |
requires_labels | bool | False |
batch_fit | bool | True |
incremental_fit | bool | False |
batch_inference | bool | True |
streaming_inference | bool | False |
Members
supports_unordered_samplesattribute
supports_unordered_samples: bool = Truesupports_sequencesattribute
supports_sequences: bool = Falsesupports_streamingattribute
supports_streaming: bool = Falsesupports_multivariateattribute
supports_multivariate: bool = Truesupports_variable_lengthattribute
supports_variable_length: bool = Truesupports_irregular_samplingattribute
supports_irregular_sampling: bool = Truesupports_missing_valuesattribute
supports_missing_values: bool = Falsesupports_graphsattribute
supports_graphs: bool = Falsesupports_hierarchiesattribute
supports_hierarchies: bool = Falserequires_regular_samplingattribute
requires_regular_sampling: bool = Falserequires_fixed_lengthattribute
requires_fixed_length: bool = Falserequires_trainingattribute
requires_training: bool = Truerequires_labelsattribute
requires_labels: bool = Falsebatch_fitattribute
batch_fit: bool = Trueincremental_fitattribute
incremental_fit: bool = Falsebatch_inferenceattribute
batch_inference: bool = Truestreaming_inferenceattribute
streaming_inference: bool = Falsevalidate_againstmethod
validate_against(characteristics: DataCharacteristics) -> list[str]Return human-readable problems, empty when the pipeline is valid.
| Parameter | Type | Default |
|---|---|---|
characteristics | DataCharacteristics | required |
Returns list[str]
to_dictmethod
Distributional
DistributionalBases: Capability
The model can estimate densities or likelihoods.
Members
capability_keyattribute
capability_key = 'distributional'log_likelihoodmethod
log_likelihood(data: Any) -> AnyReturn per-observation log likelihoods.
| Parameter | Type | Default |
|---|---|---|
data | Any | required |
Returns Any
Inherited members
Predictive
PredictiveBases: Capability
The model can forecast expected future values.
Members
capability_keyattribute
capability_key = 'predictive'forecastmethod
forecast(data: Any, horizon: int) -> AnyForecast horizon future steps.
| Parameter | Type | Default |
|---|---|---|
data | Any | required |
horizon | int | required |
Returns Any
Inherited members
Reconstructive
ReconstructiveBases: Capability
The model can reconstruct its input from a compressed representation.
Members
capability_keyattribute
capability_key = 'reconstructive'reconstructmethod
reconstruct(data: Any) -> AnyReturn the reconstruction of the input.
| Parameter | Type | Default |
|---|---|---|
data | Any | required |
Returns Any
Inherited members
Representational
RepresentationalBases: Capability
The model can embed observations into a latent representation.
Members
capability_keyattribute
capability_key = 'representational'embedmethod
embed(data: Any) -> AnyReturn latent embeddings for the input.
| Parameter | Type | Default |
|---|---|---|
data | Any | required |
Returns Any
Inherited members
collect_capability_keys
collect_capability_keys(component_class: type) -> list[str]Collect the capability keys mixed into a component class.
| Parameter | Type | Default |
|---|---|---|
component_class | type | required |
Returns list[str]