seqgra attribution

seqgra attribution: Obtain feature attribution/evidence for selected examples across multiple grammars, models, evaluators

usage: seqgraa [-h] [-v] -a ANALYSIS_ID -d GRAMMAR_IDS [GRAMMAR_IDS ...] -m MODEL_DEF_FILES [MODEL_DEF_FILES ...] -o
               OUTPUT_DIR -i EXAMPLES_FILE -j ANNOTATIONS_FILE [-e EVALUATORS [EVALUATORS ...]] [-t TARGET]
               [--eval-sis-predict-threshold EVAL_SIS_PREDICT_THRESHOLD]
               [--eval-grad-importance-threshold EVAL_GRAD_IMPORTANCE_THRESHOLD] [--eval-suppress-plots] [-g GPU]

Named Arguments

-v, --version

show program’s version number and exit

-a, --analysis-id

analysis ID (used for script file name and comparator folders)

-d, --grammar-ids

list of grammar IDs or data folders (inside output-dir/input)

-m, --model-def-files

list of paths to the seqgra XML model definition files

-o, --output-dir

output directory of previous seqgra calls with subdirectories input (simulated and experimental data) and models (trained models); subdirectories are created for attribution analysis

-i, --examples-file

path to file containing examples for feature importance evaluators

-j, --annotations-file

path to file containing annotations of examples for feature importance evaluators

-e, --evaluators

feature importance evaluator ID or IDs: contrastive-excitation-backprop, deconv, deep-lift, excitation-backprop, feedback, grad-cam, gradient, gradient-x-input, guided-backprop, integrated-gradients, nonlinear-integrated-gradients, saliency, sis, smooth-grad

Default: frozenset({‘gradient-x-input’, ‘deconv’, ‘deep-lift’, ‘guided-backprop’, ‘saliency’, ‘gradient’, ‘integrated-gradients’})

-t, --target

target label for which evidence/attribution should be generated, either ‘y’ for ground truth label or ‘y-hat’ for predicted label, defaults to ‘y’

Default: “y”

--eval-sis-predict-threshold

prediction threshold for Sufficient Input Subsets; this evaluator argument is only visible to the SIS evaluator

Default: 0.5

--eval-grad-importance-threshold

feature importance threshold for gradient-based feature importance evaluators; this parameter only affects thresholded grammar agreement plots, not the feature importance measures themselves; this evaluator argument is only visible to gradient-based feature importance evaluators (defaults to 0.01)

Default: 0.01

--eval-suppress-plots

if this flag is set, plots are suppressed globally; this evaluator argument will be passed to all evaluators

Default: False

-g, --gpu

ID of GPU used by TensorFlow and PyTorch (defaults to GPU ID 0); CPU is used if no GPU is available or GPU ID is set to -1

Default: 0