# /* vim: set filetype=sh : */ make -s prep Dir=../../cocomo/data Data=nasa93.csv Tmp=`mktemp -d` #trap "rm -rf $Tmp" 0 1 2 3 15 (printf "=" cat ${Dir}/${Data} | cut -d, -f8- ) > $Tmp/$0.in head -1 ${Dir}/${Data} > $Tmp/head cd $Tmp main() { echo "---| $2 |----------------------" coc1nums -s $0.in \ | near -n 20 $2 > $0.tmp for((i=1;i<=10;i++)) do R=$RANDOM randomize Seed=$R $0.tmp lc Seed=$R Pred=30 Pass=1 train.arff Pass=2 test.arff > ${1}$i.out done (echo "#!,a,b,mmre,pred(30)" fgrep \! ${1}*.out | sort -t, -n +3 ) | malign echo "" return 1 (cut -d, -f 8-22 head gawk -F, ' function mean(sumX,n) {return sumX/n} function sd(sumSq,sumX,n) {return sqrt((sumSq-((sumX*sumX)/n))/(n-1))} /=/ { q=","; key=$3 q $4 q $5 q $6 q $7 q $8 q $9 q \ $10 q $11 q $12 q $13 q $14 q $15 q $16 q $17 val=$NF; s[ key] += val; s2[key] += val * val; n[key]++ } END { OFS=","; OFMT="%.0f"; for(i in s) { mn = mean(s[i],n[i]); stdev = sd(s2[i],s[i],n[i]) print i , "|", mn, stdev, 100*stdev/mn } } ' ${1}*.out ) | malign -g 1 } main d "-z acap=1 " main b "-z vexp=1.21 -z tool=0.83" main c "-z time=1.1 -z rely=1.2" cd