alibi_detect.utils.prediction module¶
-
alibi_detect.utils.prediction.
predict_batch
(model, X, batch_size=10000000000, proba=False, return_class=False, n_categories=None, shape=None, dtype=numpy.float32)[source]¶ Make batch predictions on a model.
- Parameters
model (
Union
[Model
,Callable
,AE
,AEGMM
,Seq2Seq
,VAE
,VAEGMM
]) – tf.keras model or one of the other permitted types defined in Data.X (
ndarray
) – Batch of instances.batch_size (
int
) – Batch size used during prediction.proba (
bool
) – Whether to return model prediction probabilities.return_class (
bool
) – Whether to return model class predictions.n_categories (
Optional
[int
]) – Number of prediction categories. Can also be inferred from the model.shape (
Optional
[tuple
]) – Optional shape or tuple with shapes of the model predictions.dtype (
type
) – Output type.
- Return type
- Returns
Numpy array with predictions.