/
TrainEnsembles.sh
46 lines (39 loc) · 1.34 KB
/
TrainEnsembles.sh
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
41
42
43
44
45
46
#!/bin/bash
usage() { echo "Usage: $0 [-p <Dataset Name>] [-c <EE|LbEE|FastEE|ApproxEE>] [-d <Dataset Directory>] [-o <Output Directory>] [-s <Number of Samples>]" 1>&2; exit; }
PROJECTDIR=$PWD/
OUTPUTDIR=$PWD"/output/Ensemble/"
DATASETDIR="/home/ubuntu/workspace/Dataset/TSC_Problems/"
if [ ! -d "$DATASETDIR" ]; then
DATASETDIR="/mnt/c/Users/cwtan/workspace/Dataset/TSC_Problems/"
fi
if [ ! -d "$DATASETDIR" ]; then
DATASETDIR="/mnt/lustre/projects/ud82/changt/workspace/Dataset/TSC_Problems/"
fi
PROBLEM="ArrowHead"
CLASSIFIER="FastEE"
NSAMPLES=2
while getopts p:c:d:o:s:h: option; do
case "${option}" in
p) PROBLEM=${OPTARG};;
c) CLASSIFIER=${OPTARG};;
d) DATASETDIR=${OPTARG};;
o) OUTPUTDIR=${OPTARG};;
s) NSAMPLES=${OPTARG};;
h) usage;;
esac
done
shift $((OPTIND-1))
if [ ! -d bin ]; then
mkdir bin
fi
javac -sourcepath src -d bin -cp $PWD/lib/*: src/**/*.java
cd bin
echo Current Directory: $PWD
echo Dataset Directory: $DATASETDIR
echo Output Directory: $OUTPUTDIR
echo Problem: $PROBLEM
echo Classifier: $CLASSIFIER
echo nSamples: $NSAMPLES
echo nRuns: $NRUNS
echo
java -Xmx14g -Xms14g -cp $PROJECTDIR/lib/*: experiments.TrainElasticEnsembles $OUTPUTDIR $DATASETDIR $PROBLEM $CLASSIFIER $NSAMPLES