#!/bin/bash DESTDIR=${DESTDIR=""} MyHome=${MyHome=${DESTDIR}${HOME}} #Safe=${Safe=/srv/bronze/stuff/dj/var/weka} Safe=${Safe=${MyHome}/var/weka} #outDir=${outDir=/srv/bronze/stuff/dj/var/classifierComparison} outDir=${outDir=${MyHome}/var/classifierComparison} Data=${Data=${MyHome}/var/data/discrete} #Datas=${Datas="a2b/agaricus-lepiota a2b/anneal a2b/audiology a2b/auto-mpg # a2b/breast-cancer a2b/breast-cancer-wisconsin # c2d/credit-a c2d/diabetes e2i/ecoli e2i/flag e2i/hayes-roth # e2i/heart-c e2i/heart-h e2i/hepatitis e2i/imports-85 # e2i/iris j2p/kr-vs-kp j2p/letter j2p/mushroom # q2s/segment q2s/sick q2s/splice q2s/soybean t2z/vowel # t2z/wine t2z/wdbc t2z/waveform-5000"} Datas=${Datas="a2b/auto-mpg c2d/diabetes e2i/iris j2p/kr-vs-kp q2s/segment t2z/waveform-5000"} #Learners=${Learners="j48 bayes nbk nbcd"} Learners=${Learners="bayes nbk nbcd"} jAode() { wttp $1 $2 $wAode | gotwant ; } j48() { wttp $1 $2 $wJ48 | gotwant ; } bayes() { wttp $1 $2 $wBayes | gotwant ; } nbk() { wttp $1 $2 $wNbk | gotwant ; } oneR() { wttp $1 $2 $wOneR | gotwant ; } nbcd() { nbcdtree Mode=1 $1 Mode=2 $2 | gotwant; } [ -f "$Functions" ] && . $Functions Preps=${Preps="cat tbin fayyadIrani"} disctree() { dtree2 Pass=1 $1 Pass=2 $1; } tbin() { tenbins Pass=1 $1 Pass=2 $1 Pass=3 $1; } Repeats=${Repeats=5} Bins=${Bins=5} mkdir -p $Safe # ensure safe place exists Tmp=`mktemp -d` # make a sandbox where only you will play trap "rm -rf $Tmp" 0 1 2 3 15 # leave nothing behind when you quit cd $Tmp # go to the sandbox main() { set -x for data in $Datas do echo `date` Data=${Data} \ Datums=$data \ Learners=${Learners} \ Preps=${Preps} \ Repeats=${Repeats} \ Bins=${Bins} \ crossval > ${outDir}/${data##*/}crossvalresult1.csv date echo `date` File=`tail -1 ${outDir}/${data##*/}crossvalresult1.csv` doExtras $File | malign > ${outDir}/${data##*/}crossvalresult.csv rm ${outDir}/${data##*/}crossvalresult1.csv deltas Data=1 Rx="2,3" Effect=9 Fields=15 ${outDir}/${data##*/}crossvalresult.csv > ${outDir}/${data##*/}crossvalaccdeltas.csv cat ${outDir}/${data##*/}crossvalaccdeltas.csv | deltas2bars | malign > ${outDir}/${data##*/}crossvalaccbars.csv cat ${outDir}/${data##*/}crossvalaccdeltas.csv | winloss | malign > ${outDir}/${data##*/}crossvalaccwinloss.csv deltas Data=1 Rx="2,3" Effect=14 Fields=15 ${outDir}/${data##*/}crossvalresult.csv > ${outDir}/${data##*/}crossvalfmeasdeltas.csv cat ${outDir}/${data##*/}crossvalfmeasdeltas.csv | deltas2bars | malign > ${outDir}/${data##*/}crossvalfmeasbars.csv cat ${outDir}/${data##*/}crossvalfmeasdeltas.csv | winloss | malign > ${outDir}/${data##*/}crossvalfmeaswinloss.csv deltas Data=1 Rx="2,3" Effect=15 Fields=15 ${outDir}/${data##*/}crossvalresult.csv > ${outDir}/${data##*/}crossvalbaldeltas.csv cat ${outDir}/${data##*/}crossvalbaldeltas.csv | deltas2bars | malign > ${outDir}/${data##*/}crossvalbalbars.csv cat ${outDir}/${data##*/}crossvalbaldeltas.csv | winloss | malign > ${outDir}/${data##*/}crossvalbalwinloss.csv deltas Data=1 Rx="2,3" Effect=13 Fields=15 ${outDir}/${data##*/}crossvalresult.csv > ${outDir}/${data##*/}crossvalnpfdeltas.csv cat ${outDir}/${data##*/}crossvalnpfdeltas.csv | deltas2bars | malign > ${outDir}/${data##*/}crossvalnpfbars.csv cat ${outDir}/${data##*/}crossvalnpfdeltas.csv | winloss | malign > ${outDir}/${data##*/}crossvalnpfwinloss.csv mv ${outDir}/*.csv ${HOME}/work/wisp/var/dj/rbst/classifierComparison/JustBayes/. echo `date` done; } Log=$$ echo `date` (main)# | tee $Safe/xval.$Log ) 2> $Safe/xval.err.$Log echo `date` #echo $Safe/xval.$Log