#! /bin/bash # ./effort $Filename $Path $Learner $TestFile $TrainFile $TargetEMs $LogFile # Arguments Filename=$1 Path=$2 Learner=$3 TestFile=$4 TrainFile=$5 TargetEMs=$6 LogFile=$7 gawk -f simpleLC.awk Pass=1 TargetEMs=$TargetEMs $TrainFile Pass=2 TargetEMs=$TargetEMs $TestFile > $LogFile Stats=$(./calc $LogFile) #TrainingCount=$(gawk 'END{print NR;}' $TrainFile) if [ $Learner == "attrLC" ] ; then #Calculate Standard Deviation of Attribute AttrDev=$(gawk -f columnStDev.awk Columns=$TargetEMs $Filename) #Calculate Entropy of Attribute (using discrete formula because the effort multipliers are discrete) AttrEntropy=$(gawk -f columnEntropy.awk Columns=$TargetEMs $Filename) AvgCorr=$(echo $Stats | gawk 'BEGIN{FS=","} NR==1{print $4}') echo $TargetEMs","$AvgCorr","$AttrDev","$AttrEntropy fi if [ $Learner == "simpleLC" ] ; then echo $Stats","$TargetEMs fi