diff --git a/pyhealth/interpret/methods/baseline.py b/pyhealth/interpret/methods/baseline.py index 67629c516..8c00570c1 100644 --- a/pyhealth/interpret/methods/baseline.py +++ b/pyhealth/interpret/methods/baseline.py @@ -44,7 +44,7 @@ class RandomBaseline(BaseInterpreter): Examples: >>> import torch >>> from pyhealth.datasets import create_sample_dataset, get_dataloader - >>> from pyhealth.interpret.methods.baseline import Random + >>> from pyhealth.interpret.methods import RandomBaseline >>> from pyhealth.models import MLP >>> >>> samples = [ @@ -64,7 +64,7 @@ class RandomBaseline(BaseInterpreter): >>> model.eval() >>> test_loader = get_dataloader(dataset, batch_size=1, shuffle=False) >>> - >>> rand_interp = Random(model, random_seed=42) + >>> rand_interp = RandomBaseline(model, random_seed=42) >>> batch = next(iter(test_loader)) >>> attributions = rand_interp.attribute(**batch) >>> print({k: v.shape for k, v in attributions.items()}) diff --git a/pyhealth/interpret/methods/ensemble_crh.py b/pyhealth/interpret/methods/ensemble_crh.py index 2a901eb9b..a8889c841 100644 --- a/pyhealth/interpret/methods/ensemble_crh.py +++ b/pyhealth/interpret/methods/ensemble_crh.py @@ -47,8 +47,8 @@ class CrhEnsemble(BaseInterpreterEnsemble): between successive iterations is below this value. Example: - >>> from pyhealth.interpret.methods import GradientShap, IntegratedGradients, Saliency - >>> experts = [GradientShap(model), IntegratedGradients(model), Saliency(model)] + >>> from pyhealth.interpret.methods import DeepLift, IntegratedGradients, LimeExplainer + >>> experts = [IntegratedGradients(model), DeepLift(model), LimeExplainer(model)] >>> ensemble = CrhEnsemble(model, experts, n_iter=30) >>> attrs = ensemble.attribute(**batch) """