#! /bin/bash Method="COC81" Style="precise" DoStratify=1 Path="/var/CocomostV3_Experiment" rm -r $Path mkdir -p $Path"/log" mkdir -p $Path"/data/test" mkdir -p $Path"/data/train" DataPath=$Path"/data" mkdir $Path"/data/v_test" mkdir $Path"/data/v_train" # output the first line of the csv output describing the field names echo "#FILENAME,I,SEED,LEARNER,SUBSET,ESTIMATE,ACTUAL,MRE" # Preprocess the full coc81 and nasa93 datasets cp data/coc81modeTypeLangType.csv $DataPath"/coc81_all.csv" gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/coc81_all.csv" > $DataPath"/coc81_all.csv.numeric" cp data/nasa93.csv $DataPath"/nasa93_all.csv" gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/nasa93_all.csv" > $DataPath"/nasa93_all.csv.numeric" if (($DoStratify==1)) then #Make the subsets of coc81 data gawk -f CSVsubset.awk Col="kind" Want="min" data/coc81modeTypeLangType.csv > $DataPath"/coc81_kind_min.csv" gawk -f CSVsubset.awk Col="lang" Want="ftn" data/coc81modeTypeLangType.csv > $DataPath"/coc81_lang_ftn.csv" gawk -f CSVsubset.awk Col="mode" Want="e" data/coc81modeTypeLangType.csv > $DataPath"/coc81_mode_e.csv" gawk -f CSVsubset.awk Col="kind" Want="max" data/coc81modeTypeLangType.csv > $DataPath"/coc81_kind_max.csv" gawk -f CSVsubset.awk Col="mode" Want="org" data/coc81modeTypeLangType.csv > $DataPath"/coc81_mode_org.csv" gawk -f CSVsubset.awk Col="lang" Want="mol" data/coc81modeTypeLangType.csv > $DataPath"/coc81_lang_mol.csv" #Convert the subsets of coc81 data to numbers gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/coc81_kind_min.csv" > $DataPath"/coc81_kind_min.csv.numeric" gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/coc81_lang_ftn.csv" > $DataPath"/coc81_lang_ftn.csv.numeric" gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/coc81_mode_e.csv" > $DataPath"/coc81_mode_e.csv.numeric" gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/coc81_kind_max.csv" > $DataPath"/coc81_kind_max.csv.numeric" gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/coc81_mode_org.csv" > $DataPath"/coc81_mode_org.csv.numeric" gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/coc81_lang_mol.csv" > $DataPath"/coc81_lang_mol.csv.numeric" #Make the subsets of nasa93 data gawk -f CSVsubset.awk Col="projectname" Want="gro" data/nasa93.csv > $DataPath"/nasa93_project_gro.csv" gawk -f CSVsubset.awk Col="cat2" Want="missionplanning" data/nasa93.csv > $DataPath"/nasa93_cat2_missionplanning.csv" gawk -f CSVsubset.awk Col="cat2" Want="avionicsmonitoring" data/nasa93.csv > $DataPath"/nasa93_cat2_avionicsmonitoring.csv" gawk -f CSVsubset.awk Col="mode" Want="semidetached" data/nasa93.csv > $DataPath"/nasa93_mode_semidetached.csv" gawk -f CSVsubset.awk Col="projectname" Want="sts" data/nasa93.csv > $DataPath"/nasa93_project_sts.csv" gawk -f CSVsubset.awk Col="forg" Want="g" data/nasa93.csv > $DataPath"/nasa93_forg_g.csv" gawk -f CSVsubset.awk Col="center" Want="5" data/nasa93.csv > $DataPath"/nasa93_center_5.csv" gawk -f CSVsubset.awk Col="year" Want="1975" data/nasa93.csv > $DataPath"/nasa93_year_1975.csv" gawk -f CSVsubset.awk Col="year" Want="1980" data/nasa93.csv > $DataPath"/nasa93_year_1980.csv" gawk -f CSVsubset.awk Col="mode" Want="embedded" data/nasa93.csv > $DataPath"/nasa93_mode_embedded.csv" gawk -f CSVsubset.awk Col="center" Want="2" data/nasa93.csv > $DataPath"/nasa93_center_2.csv" #Convert the subsets of nasa93 data to numbers gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/nasa93_project_gro.csv" > $DataPath"/nasa93_project_gro.csv.numeric" gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/nasa93_cat2_missionplanning.csv" > $DataPath"/nasa93_cat2_missionplanning.csv.numeric" gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/nasa93_cat2_avionicsmonitoring.csv" > $DataPath"/nasa93_cat2_avionicsmonitoring.csv.numeric" gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/nasa93_mode_semidetached.csv" > $DataPath"/nasa93_mode_semidetached.csv.numeric" gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/nasa93_project_sts.csv" > $DataPath"/nasa93_project_sts.csv.numeric" gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/nasa93_forg_g.csv" > $DataPath"/nasa93_forg_g.csv.numeric" gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/nasa93_center_5.csv" > $DataPath"/nasa93_center_5.csv.numeric" gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/nasa93_year_1975.csv" > $DataPath"/nasa93_year_1975.csv.numeric" gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/nasa93_year_1980.csv" > $DataPath"/nasa93_year_1980.csv.numeric" gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/nasa93_mode_embedded.csv" > $DataPath"/nasa93_mode_embedded.csv.numeric" gawk -f convertCSV.awk Method=$Method Style=$Style $DataPath"/nasa93_center_2.csv" > $DataPath"/nasa93_center_2.csv.numeric" fi # try runLearners on full datasets ./runLearners $Path "coc81_all.csv" ./runLearners $Path "nasa93_all.csv" if (($DoStratify==1)) then # runLearners on coc81 data subsets ./runLearners $Path "coc81_kind_min.csv" ./runLearners $Path "coc81_lang_ftn.csv" ./runLearners $Path "coc81_mode_e.csv" ./runLearners $Path "coc81_kind_max.csv" ./runLearners $Path "coc81_mode_org.csv" ./runLearners $Path "coc81_lang_mol.csv" # runLearners on nasa93 data subsets ./runLearners $Path "nasa93_project_gro.csv" ./runLearners $Path "nasa93_cat2_missionplanning.csv" ./runLearners $Path "nasa93_cat2_avionicsmonitoring.csv" ./runLearners $Path "nasa93_mode_semidetached.csv" ./runLearners $Path "nasa93_project_sts.csv" ./runLearners $Path "nasa93_forg_g.csv" ./runLearners $Path "nasa93_center_5.csv" ./runLearners $Path "nasa93_year_1975.csv" ./runLearners $Path "nasa93_year_1980.csv" ./runLearners $Path "nasa93_mode_embedded.csv" ./runLearners $Path "nasa93_center_2.csv" fi