MMD#
- class frouros.detectors.data_drift.batch.distance_based.MMD(kernel: ~typing.Callable = <function rbf_kernel>, chunk_size: ~typing.Optional[int] = None, callbacks: ~typing.Optional[~typing.Union[~frouros.callbacks.batch.base.BaseCallbackBatch, ~typing.List[~frouros.callbacks.batch.base.BaseCallbackBatch]]] = None)#
MMD (Maximum Mean Discrepancy) [gretton2012kernel] detector.
- References:
[gretton2012kernel]Gretton, Arthur, et al. “A kernel two-sample test.” The Journal of Machine Learning Research 13.1 (2012): 723-773.
- property chunk_size: Optional[int]#
Chunk size property.
- Returns:
chunk size to use
- Return type:
int
- property kernel: Callable#
Kernel property.
- Returns:
kernel function to use
- Return type:
Callable
- 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_kwargs: Dict[str, Any]#
Statistical kwargs property.
- Returns:
statistical kwargs
- Return type:
Dict[str, Any]
- property statistical_method: Callable#
Statistical method property.
- Returns:
statistical method
- Return type:
Callable
- property statistical_type: BaseStatisticalType#
Statistical type property.
- Returns:
statistical type
- Return type:
BaseStatisticalType