#! /bin/bash # Example of running cocomin: simply give it the train and test file names. # It expects to have data preprocessed like this. # This is simply an example so I'm using the same file twice, but please try with others. # Create tmp directory if necessary if [ ! -d /tmp/$USER ] then mkdir "/tmp/$USER" fi MyRoot="../../../trunk/" cd .. Train=eg/test_file #Train="/tmp/$USER/nasa93_all.csv.numeric" #Test="/tmp/$USER/nasa93_all.csv.numeric" # Preprocess the data #echo "Preprocessing nasa93.csv" #gawk -f $MyRoot"baker_lc/convertcsv.awk" Method="COC81" Style="precise" $MyRoot"data/nasa93.csv" > $Train #echo "Preprocessed data stored at "$Train # Run cocomin #./cocomin $Train $Test #! /bin/bash #MyRoot="../../../trunk/" Path="/tmp/$USER" #Train=$1 #Test=$2 ConvertedFile=$Train Search="forward" Horizon="16" Ranker="correlation" Eval="mmre" RankingFile=$Path"/cocomin.ranking" RankingLogFile=$Path"/cocomin_ranking.log" LogFile=$Path"/cocomin.log" SortFile=$Path"/cocomin.sort" #./attr_ranking $ConvertedFile $Path "attrLC" $Train $Train "-" $RankingLogFile > $RankingFile #Native ordering ./attr2 $Train $Path $Ranker $Train $LogFile $Horizon $RankingFile $SortFile $Eval $Search #TargetEMs=$(./attr2 $Train $Path $Ranker $Train $LogFile $Horizon $RankingFile $SortFile $Eval $Search) #echo "#Forward COCOMIN chose: "$TargetEMs #TargetEMs=$(./attr2 $Train $Path $Ranker $Train $LogFile $Horizon $RankingFile $SortFile $Eval backward) #echo "#Backward COCOMIN chose: "$TargetEMs #echo "#Estimate,Actual,MRE" #gawk -f $MyRoot"baker_lc/lc.awk" Pass=1 TargetEMs=$TargetEMs $Train Pass=2 Mode=2 TargetEMs=$TargetEMs $Test