AndersonDarlingTest#

class frouros.detectors.data_drift.batch.statistical_test.AndersonDarlingTest(callbacks: Optional[Union[BaseCallbackBatch, List[BaseCallbackBatch]]] = None)#

Anderson-Darling test [scholz1987k] detector.

Note:

p-values are bounded between 0.001 and 0.25 according to scipy documentation [1]_.

References:

[scholz1987k]
Scholz, Fritz W., and Michael A. Stephens.

“K-sample Anderson–Darling tests.” Journal of the American Statistical Association 82.399 (1987): 918-924.

[1] https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.anderson_ksamp.html # noqa: E501 # pylint: disable=line-too-long

property X_ref: Optional[ndarray]#

Reference data property.

Returns:

reference data

Return type:

Optional[numpy.ndarray]

property callbacks: Optional[List[BaseCallback]]#

Callbacks property.

Returns:

callbacks

Return type:

Optional[List[BaseCallback]]

compare(X: ndarray, **kwargs) Tuple[ndarray, Dict[str, Any]]#

Compare values.

Parameters:

X (numpy.ndarray) – feature data

Returns:

compare result and callbacks logs

Return type:

Tuple[numpy.ndarray, Dict[str, Any]]

property data_type: BaseDataType#

Data type property.

Returns:

data type

Return type:

BaseDataType

fit(X: ndarray, **kwargs) Dict[str, Any]#

Fit detector.

Parameters:

X (numpy.ndarray) – feature data

Returns:

callbacks logs

Return type:

Dict[str, Any]

reset() None#

Reset method.

property statistical_type: BaseStatisticalType#

Statistical type property.

Returns:

statistical type

Return type:

BaseStatisticalType