mistral-io-datasets/scripts/analyse-all.sh

42 lines
735 B
Bash
Executable File

#!/bin/bash
# call me from the parent directory
echo "This script performs the complete analysis steps"
CLEAN=0 # Set to 0 to make some update
function prepare(){
pushd datasets
./decompress.sh
popd
for I in datasets/*.csv ; do
if [ ! -e $(basename $I) ]; then
echo "Creating symlink $(basename $I)"
ln -s $I
fi
done
}
prepare
for I in job_similarities_*.csv ; do
rm *.png *.pdf
./scripts/plot.R $I > description.txt
OUT=${I%%.csv}-out
mkdir $OUT
if [[ $CLEAN != "0" ]] ; then
rm $OUT/*
mv description.txt $OUT
fi
mv *.png *.pdf $OUT
done
# analyze peformance data
for I in datasets/progress_*.csv ; do
OUT=fig/$(basename ${I%%.csv}-out)
./scripts/plot-performance.R $I $OUT
done