#!/bin/bash # $1 - Learner # $2 - Train file # $3 - Test file # $4 - Stem to use to get data file specific properties # $5 - Bin number train=$2; test=$3; trainStem=`basename $train .arff`; testStem=`basename $test .arff`; false=`grep $4 howToUseNewScripts | gawk 'BEGIN{FS=OFS=" ";} {print $3;}'`; true=`grep $4 howToUseNewScripts | gawk 'BEGIN{FS=OFS=" ";} {print $4;}'`; falses=`./getClassCount class=$false $test`; trues=`./getClassCount class=$true $test`; locAtt=`./getLocAtt $4`; tLoc=`./totalLoc locAtt=$locAtt $test`; effortFile=$1"_"$testStem".effort"; rm $effortFile; echo "0 0" > $effortFile; ./$1p $train $test $locAtt | gawk '{gsub(/[\(\)]/, "" ); print;}' | sort -g -k 5 > tmp.txt; ./evalWeka tLoc=$tLoc trues=$trues falses=$falses effortFile=$effortFile tmp.txt;