JS#
- class frouros.detectors.data_drift.batch.distance_based.JS(num_bins: int = 10, callbacks: Optional[Union[BaseCallbackBatch, List[BaseCallbackBatch]]] = None, **kwargs)#
JS (Jensen-Shannon distance) [lin1991divergence] detector.
- References:
[lin1991divergence]Lin, Jianhua. “Divergence measures based on the Shannon entropy.” IEEE Transactions on Information theory 37.1 (1991): 145-151.
- property num_bins: int#
Number of bins property.
- Returns:
number of bins in which to divide probabilities
- Return type:
int
- 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