rise_tabular
RISE tabular explainer.
Classes
RISE explainer for tabular data. |
Module Contents
- class rise_tabular.RISETabular(training_data: numpy.array, mode: str = 'classification', feature_names: List[str] = None, categorical_features: List[int] = None, n_masks: int = 1000, feature_res: int = 8, p_keep: float = 0.5, preprocess_function: callable | None = None, class_names=None, keep_masks: bool = False, keep_masked: bool = False, keep_predictions: bool = False)[source]
RISE explainer for tabular data.
- explain(model_or_function: str | callable, input_tabular: numpy.array, labels: Iterable[int] | None = None, mask_type: str | callable | None = 'most_frequent', batch_size: int | None = 100) numpy.array[source]
Run the RISE explainer.
- Parameters:
model_or_function – The function that runs the model to be explained or the path to a ONNX model on disk.
input_tabular – Data to be explained.
labels – Indices of classes to be explained.
num_samples – Number of samples
mask_type – Imputation strategy for masked features
batch_size – Number of samples to process by the model per batch
- Returns:
An Explanation object containing the LIME explanations for each class.
- Return type:
explanation