#! /bin/bash #this file runs competing learners on the given subset of data Path=$1 Filename=$2 RankingFile=$Path"/attribute_ranking.tmp" SeedFile=$Path"/"$Filename".seed" ConvertedFile=$Path"/data/"$Filename".numeric" Iterations=30 TestSets=10 SearchSet="forward backward" HorizonSet="0 1 2 4 8 16" #RankerSet="correlation variance_high variance_low entropy_high entropy_low" RankerSet="correlation" EvalSet="mmre sd_mre pred30 correlation" #Run the algorithm many times for ((i=1;i<=$Iterations;i++)) do #Randomize Data TestFile=$Path"/data/test/"$Filename".numeric."$i TrainFile=$Path"/data/train/"$Filename".numeric."$i Seed=$RANDOM gawk -f randomize.awk -v Seed=$Seed -v TestSets=$TestSets -v TrainFile=$TrainFile -v TestFile=$TestFile $ConvertedFile # basic Local Calibration #LogFile=$Path"/log/LC/"$Filename"."$i LogFile=$Path"/log/"$Filename".LC."$i echo -n $Filename","$i",LC,N/A,N/A,N/A,N/A," ./effort $ConvertedFile $Path "simpleLC" $TestFile $TrainFile "-1-2-3-4-5-6-7-8-9-10-11-12-13-14-15-" $LogFile # Rank the Attributes RankingFile=$Path"/ranking/"$i".ranking" LogFile=$Path"/log/"$Filename".AttrRanking."$i #./attr_ranking $ConvertedFile $Path "attrLC" $TestFile $TrainFile "-" $LogFile> $RankingFile ./attr_ranking $ConvertedFile $Path "attrLC" $TrainFile $TrainFile "-" $LogFile> $RankingFile # Try Local Calibration using the Best Evaluated Subset of Attributes Learner="attr" for Search in $SearchSet do for Horizon in $HorizonSet do for Ranker in $RankerSet do for Eval in $EvalSet do #FILENAME,I,LEARNER,SEARCH,HORIZON,RANKER,EVAL,MMRE,SD(MRE),PRED30,CORR,COLUMNS LogFile=$Path"/log/"$Search"_"$Horizon"_"$Ranker"_"$Eval"_"$i"_"$Filename"."$Learner SortFile=$Path"/ranking/sorted/"$Search"_"$Horizon"_"$Ranker"_"$Eval"_"$i"_"$Filename"."$Learner echo -n $Filename","$i","$Learner","$Search","$Horizon","$Ranker","$Eval"," ./attr $ConvertedFile $Path $Ranker $TestFile $TrainFile $LogFile $Horizon $RankingFile $SortFile $Eval $Search done done done done echo $Seed >> $SeedFile done