-
Notifications
You must be signed in to change notification settings - Fork 0
/
classificar
executable file
·45 lines (38 loc) · 1.15 KB
/
classificar
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
#!/bin/bash
APP_HOME=`pwd`
CLASS_PATH=$APP_HOME/weka.jar:$APP_HOME/src
usage() {
echo -e 'Utilização: classificar [-options] TecnicaClassificacao dirTreino dirTeste\n'
echo -e 'Técnicas de classificação: '
echo -e 'NaiveBayes \t\t\t-- Naive Bayes Classifier'
echo -e 'NNge \t\t\t\t-- Nearest Neighbor Classifier'
echo -e 'DecisionStump \t\t\t-- Decision Stump Classifier'
echo -e 'MultilayerPerceptron \t\t-- Sigmoid Neural Network Classifier'
echo -e 'ClassificationViaClustering \t\t-- Clustering Classifier\n'
}
function run () {
if [ $2 ] && [ $3 ] && [ $4 ]
then java -Xmx1024m -cp $CLASS_PATH ImagesClassifier ""$1 ""$2 ""$3 ""$4
else usage
exit 1
fi
}
cd $APP_HOME/src
if [ ! -f ImagesClassifier.class ] ; then
echo "Compilando projeto..."
javac -cp $CLASS_PATH ImagesClassifier.java
fi
while getopts "hv" arg; do
case $arg in
h)
usage
exit 0;;
v)
run "true" $2 $3 $4
exit 0;;
*)
echo "Digite: -h para ajuda or -v para verbose"
exit 1;;
esac
done
run "false" $1 $2 $3