Skip to content

Commit

Permalink
equality checks on bash
Browse files Browse the repository at this point in the history
  • Loading branch information
FedericoAureliano committed Oct 14, 2020
1 parent ae7d563 commit 70f3e90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
7 changes: 2 additions & 5 deletions runlearner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@ for seed in 0 1; do
if [ $2 == exp3a ]
then
learnconfig="exp3 --gamma 0.07"
elif [ $2 == exp3b ]
elif [ $2 = exp3b ]
then
learnconfig="exp3 --gamma 0.1"
elif [ $2 == exp3c ]
elif [ $2 = exp3c ]
then
learnconfig="exp3 --gamma 0.25"
elif [ $2 == exp3d ]
then
learnconfig="exp3 --gamma 0.5"
else
learnconfig=$2
fi
Expand Down
11 changes: 4 additions & 7 deletions runmedley.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
for seed in 0 1; do
for learner in thompson neighbor knearest random MLP linear exp3a exp3b exp3c exp3d; do
if [ $learner == exp3a ]
for learner in thompson neighbor knearest random MLP linear exp3a exp3b exp3c; do
if [ $learner = exp3a ]
then
learnconfig="exp3 --gamma 0.07"
elif [ $learner == exp3b ]
elif [ $learner = exp3b ]
then
learnconfig="exp3 --gamma 0.1"
elif [ $learner == exp3c ]
elif [ $learner = exp3c ]
then
learnconfig="exp3 --gamma 0.25"
elif [ $learner == exp3d ]
then
learnconfig="exp3 --gamma 0.5"
else
learnconfig=$learner
fi
Expand Down

0 comments on commit 70f3e90

Please sign in to comment.