-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
lbechberger
committed
Oct 12, 2021
1 parent
428e765
commit dcd00f9
Showing
5 changed files
with
77 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
#$ -N classifier | ||
#$ -l mem=2G | ||
#$ -cwd | ||
#$ -pe default 2 | ||
#$ -o $HOME | ||
#$ -e $HOME | ||
#$ -l h=*cippy* | ||
|
||
export PATH="$HOME/miniconda/bin:$PATH" | ||
eval "$(conda shell.bash hook)" | ||
conda activate MLinPractice | ||
|
||
# train classifier on training set | ||
echo " training" | ||
python -m code.classification.run_classifier data/dimensionality_reduction/training.pickle -e $* | ||
|
||
# evaluate classifier on validation set | ||
echo " validation" | ||
python -m code.classification.run_classifier data/dimensionality_reduction/validation.pickle -i $* | ||
|
||
conda deactivate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
mkdir -p data/classification | ||
|
||
# specify hyperparameter values | ||
values_of_k=("1 2 3 4 5 6 7 8 9 10") | ||
|
||
|
||
# different execution modes | ||
if [ $1 = local ] | ||
then | ||
echo "[local execution]" | ||
cmd="code/classification/classifier.sge" | ||
elif [ $1 = grid ] | ||
then | ||
echo "[grid execution]" | ||
cmd="qsub code/classification/classifier.sge" | ||
else | ||
echo "[ERROR! Argument not supported!]" | ||
exit 1 | ||
fi | ||
|
||
# do the grid search | ||
for k in $values_of_k | ||
do | ||
echo $k | ||
$cmd 'data/classification/clf_'"$k"'.pickle' --knn $k -s 42 --accuracy --kappa | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.