ChiSquareTest#

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

ChiSquareTest (Chi-square test) [pearson1900x] detector.

References:

[pearson1900x]

Pearson, Karl. “X. On the criterion that a given system of deviations from the probable in the case of a correlated system of variables is such that it can be reasonably supposed to have arisen from random sampling.” The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science 50.302 (1900): 157-175.

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