alibi_detect.od.base

FittedTransformProtocol

Inherits from: TransformProtocol, Protocol, Generic

Protocol for fitted transformer objects.

This protocol models the joint interface of the :py:obj:~alibi_detect.od.pytorch.ensemble.BaseTransformTorch class and the :py:obj:~alibi_detect.od.pytorch.ensemble.FitMixinTorch class. These objects are transforms that require to be fit.

Methods

check_fitted

check_fitted()

fit

fit(x_ref)
Name
Type
Default
Description

x_ref

set_fitted

set_fitted()

TransformProtocol

Inherits from: Protocol, Generic

Protocol for transformer objects.

The :py:obj:~alibi_detect.od.pytorch.ensemble.BaseTransformTorch object provides abstract methods for objects that map between torch tensors. This protocol models the interface of the BaseTransformTorch class.

Constructor

TransformProtocol(self, *args, **kwargs)

Methods

transform

transform(x)
Name
Type
Default
Description

x

Functions

get_aggregator

get_aggregator(aggregator: Union[alibi_detect.od.base.TransformProtocol, Literal[TopKAggregator, AverageAggregator, MaxAggregator, MinAggregator]]) -> alibi_detect.od.base.TransformProtocol
Name
Type
Default
Description

aggregator

Union[alibi_detect.od.base.TransformProtocol, Literal[TopKAggregator, AverageAggregator, MaxAggregator, MinAggregator]]

Returns

  • Type: alibi_detect.od.base.TransformProtocol

get_normalizer

get_normalizer(normalizer: Union[alibi_detect.od.base.TransformProtocol, alibi_detect.od.base.FittedTransformProtocol, Literal[PValNormalizer, ShiftAndScaleNormalizer]]) -> alibi_detect.od.base.TransformProtocol
Name
Type
Default
Description

normalizer

Union[alibi_detect.od.base.TransformProtocol, alibi_detect.od.base.FittedTransformProtocol, Literal[PValNormalizer, ShiftAndScaleNormalizer]]

Returns

  • Type: alibi_detect.od.base.TransformProtocol

Last updated

Was this helpful?