-
Notifications
You must be signed in to change notification settings - Fork 0
/
learn
executable file
·63 lines (57 loc) · 1.13 KB
/
learn
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#! /bin/sh
# learn <version> <sample> <dfa> <output>
case $# in
4) ;;
*) echo "Usage: learn <version> <sample> <resultdfa> <output>" 1>&2
exit 1
;;
esac
version=$1
sample=$2
resultdfa=$3
output=$4
app=DfaInference.MDLFold
ARGS=
case $version in
EDSM)
ARGS="$ARGS -DIncrementalCounts"
ARGS="$ARGS -DUseProductive"
app=DfaInference.EdFold
;;
V1)
ARGS="$ARGS -DIncrementalCounts"
ARGS="$ARGS -DUseProductive"
;;
V2)
ARGS="$ARGS -DIncrementalCounts"
ARGS="$ARGS -DUseProductive"
ARGS="$ARGS -DNegatives"
;;
V3)
ARGS="$ARGS -DIncrementalCounts"
ARGS="$ARGS -DUseProductive"
ARGS="$ARGS -DComplement"
;;
V4)
ARGS="$ARGS -DUseProductive"
ARGS="$ARGS -DRefinedMDL"
;;
V5)
ARGS="$ARGS -DUseProductive"
ARGS="$ARGS -DRefinedMDL"
ARGS="$ARGS -DNegatives"
;;
Fisher)
ARGS="$ARGS -DIncrementalCounts"
ARGS="$ARGS -DUseProductive"
ARGS="$ARGS -DChiSquare"
ARGS="$ARGS -DUniqueSamples=false"
ARGS="$ARGS -DNegatives"
;;
*)
echo "Unrecognized version: $version" 1>&2
exit 1
;;
esac
exec bin/satin-run -server -Xmx512M $ARGS $app \
-input $sample -output $resultdfa > $output 2>&1