alibi_detect.utils.discretizer
Discretizer
DiscretizerConstructor
Discretizer(self, data: numpy.ndarray, categorical_features: List[int], feature_names: List[str], percentiles: List[int] = [25, 50, 75]) -> NoneName
Type
Default
Description
data
numpy.ndarray
Data to discretize
categorical_features
List[int]
List of indices corresponding to the categorical columns. These features will not be discretized. The other features will be considered continuous and therefore discretized.
feature_names
List[str]
List with feature names
percentiles
List[int]
[25, 50, 75]
Percentiles used for discretization
Methods
bins
binsbins(data: numpy.ndarray) -> List[numpy.ndarray]Parameters
data Data to discretize
Name
Type
Default
Description
data
numpy.ndarray
Data to discretize
Returns
Type:
List[numpy.ndarray]
discretize
discretizediscretize(data: numpy.ndarray) -> numpy.ndarrayParameters
data Data to discretize
Name
Type
Default
Description
data
numpy.ndarray
Data to discretize
Returns
Type:
numpy.ndarray
Last updated
Was this helpful?

