-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_evaluation.bash
More file actions
40 lines (31 loc) · 933 Bytes
/
Copy pathrun_evaluation.bash
File metadata and controls
40 lines (31 loc) · 933 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source "$SCRIPT_DIR/common.bash"
EXPLAINER_TYPES=("pg_explainer" "tgnnexplainer" "greedy" "cody")
function evaluate() {
for explainer in "${EXPLAINER_TYPES[@]}"; do
case "$explainer" in
pg_explainer|tgnnexplainer)
bash "$SCRIPT_DIR/evaluate.bash" "$1" "$explainer"
;;
*)
bash "$SCRIPT_DIR/evaluate.bash" "$1" "$explainer" "all"
;;
esac
done
}
function show_help() {
echo -e "
Script for evaluating all explainer models on one dataset
Usage: bash $SCRIPT_DIR/run_evaluation.bash ${RED}DATASET-NAME${NC}
For the ${RED}DATASET-NAME${NC} parameter provide the name of any of the preprocessed datasets.
Possible values: ${CYAN}[${DATASET_NAMES[*]}]${NC}
"
exit 1
}
if [ $# -eq 0 ]; then
show_help
else
test_exists "$1" "${DATASET_NAMES[@]}"
evaluate "$1"
fi