alibi_detect.utils.saving module¶
-
alibi_detect.utils.saving.
init_ad_vae
(state_dict, vae, model)[source]¶ Initialize AdversarialVAE.
- Parameters
state_dict (
Dict
) – Dictionary containing the parameter values.vae (tensorflow.keras.Model) – Loaded VAE.
model (tensorflow.keras.Model) – Loaded classification model.
- Return type
- Returns
Initialized AdversarialVAE instance.
-
alibi_detect.utils.saving.
init_od_aegmm
(state_dict, aegmm)[source]¶ Initialize OutlierAEGMM.
- Parameters
state_dict (
Dict
) – Dictionary containing the parameter values.aegmm (tensorflow.keras.Model) – Loaded AEGMM.
- Return type
- Returns
Initialized OutlierAEGMM instance.
-
alibi_detect.utils.saving.
init_od_mahalanobis
(state_dict)[source]¶ Initialize Mahalanobis.
- Parameters
state_dict (
Dict
) – Dictionary containing the parameter values.- Return type
- Returns
Initialized Mahalanobis instance.
-
alibi_detect.utils.saving.
init_od_prophet
(state_dict)[source]¶ Initialize OutlierProphet.
- Parameters
state_dict (
Dict
) – Dictionary containing the parameter values.- Return type
- Returns
Initialized OutlierProphet instance.
-
alibi_detect.utils.saving.
init_od_sr
(state_dict)[source]¶ Initialize spectral residual detector.
- Parameters
state_dict (
Dict
) – Dictionary containing the parameter values.- Return type
- Returns
Initialized SpectralResidual instance.
-
alibi_detect.utils.saving.
init_od_vae
(state_dict, vae)[source]¶ Initialize OutlierVAE.
- Parameters
state_dict (
Dict
) – Dictionary containing the parameter values.vae (tensorflow.keras.Model) – Loaded VAE.
- Return type
- Returns
Initialized OutlierVAE instance.
-
alibi_detect.utils.saving.
init_od_vaegmm
(state_dict, vaegmm)[source]¶ Initialize OutlierVAEGMM.
- Parameters
state_dict (
Dict
) – Dictionary containing the parameter values.vaegmm (tensorflow.keras.Model) – Loaded VAEGMM.
- Return type
- Returns
Initialized OutlierVAEGMM instance.
-
alibi_detect.utils.saving.
load_detector
(filepath)[source]¶ Load outlier or adversarial detector.
- Parameters
filepath (
str
) – Load directory.- Return type
Union
[BaseDetector
,AdversarialVAE
,IForest
,Mahalanobis
,OutlierAEGMM
,OutlierProphet
,OutlierVAE
,OutlierVAEGMM
,SpectralResidual
]- Returns
Loaded outlier or adversarial detector object.
-
alibi_detect.utils.saving.
save_detector
(detector, filepath)[source]¶ Save outlier or adversarial detector.
- Parameters
detector (
Union
[BaseDetector
,AdversarialVAE
,IForest
,Mahalanobis
,OutlierAEGMM
,OutlierProphet
,OutlierVAE
,OutlierVAEGMM
,SpectralResidual
]) – Detector object.filepath (
str
) – Save directory.
- Return type
None
-
alibi_detect.utils.saving.
save_tf_aegmm
(od, filepath)[source]¶ Save TensorFlow components of OutlierAEGMM.
- Parameters
od (
OutlierAEGMM
) – Outlier detector object.filepath (
str
) – Save directory.
- Return type
None
-
alibi_detect.utils.saving.
save_tf_model
(model, filepath)[source]¶ Save TensorFlow model.
- Parameters
model (tensorflow.keras.Model) – A tf.keras Model.
filepath (
str
) – Save directory.
- Return type
None
-
alibi_detect.utils.saving.
save_tf_vae
(detector, filepath)[source]¶ Save TensorFlow components of OutlierVAE or AdversarialVAE.
- Parameters
detector (
Union
[OutlierVAE
,AdversarialVAE
]) – Outlier or adversarial detector object.filepath (
str
) – Save directory.
- Return type
None
-
alibi_detect.utils.saving.
save_tf_vaegmm
(od, filepath)[source]¶ Save TensorFlow components of OutlierVAEGMM.
- Parameters
od (
OutlierVAEGMM
) – Outlier detector object.filepath (
str
) – Save directory.
- Return type
None
-
alibi_detect.utils.saving.
state_adv_vae
(ad)[source]¶ AdversarialVAE parameters to save.
- Parameters
ad (
AdversarialVAE
) – Adversarial detector object.- Return type
-
alibi_detect.utils.saving.
state_aegmm
(od)[source]¶ OutlierAEGMM parameters to save.
- Parameters
od (
OutlierAEGMM
) – Outlier detector object.- Return type
-
alibi_detect.utils.saving.
state_mahalanobis
(od)[source]¶ Mahalanobis parameters to save.
- Parameters
od (
Mahalanobis
) – Outlier detector object.- Return type
-
alibi_detect.utils.saving.
state_prophet
(od)[source]¶ OutlierProphet parameters to save.
- Parameters
od (
OutlierProphet
) – Outlier detector object.- Return type
-
alibi_detect.utils.saving.
state_sr
(od)[source]¶ Spectral residual parameters to save.
- Parameters
od (
SpectralResidual
) – Outlier detector object.- Return type
-
alibi_detect.utils.saving.
state_vae
(od)[source]¶ OutlierVAE parameters to save.
- Parameters
od (
OutlierVAE
) – Outlier detector object.- Return type
-
alibi_detect.utils.saving.
state_vaegmm
(od)[source]¶ OutlierVAEGMM parameters to save.
- Parameters
od (
OutlierVAEGMM
) – Outlier detector object.- Return type