Skip to content
Permalink
d8bd3d98ca
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
35 lines (25 sloc) 926 Bytes
#!/usr/bin/env bash
IN_DIRECT=$1
#/GW/D5data-5/gadelrab/yago3/spmf/out_LIFT_PM
OUT_DIRCT=$IN_DIRECT/DLV_1000
MAPPING_DIRCT=$2
FILES=$(ls $IN_DIRECT/*.tsv.dlv)
for i in `seq 1 5`;
do
TOPK=$(perl -w -e "use POSIX; print ceil($i * 200 ), qq{\n}")
SUMMARY_FILE=$OUT_DIRCT/summary.top$TOPK
> $SUMMARY_FILE
for FILE in $IN_DIRECT/*.tsv.dlv; do
INPUT_FILE_NAME=$(basename $FILE)
#FILE_SIZE=$(wc -l < $FILE)
# TOPK=$(perl -w -e "use POSIX; print ceil($i * 0.1 * $FILE_SIZE), qq{\n}")
echo "$i $TOPK $FILE Start"
./predict_dlv.sh $TOPK $FILE $OUT_DIRCT $MAPPING_DIRCT
echo "$i $TOPK $FILE Done!"
STATS=$(sed -n 2p $OUT_DIRCT/$INPUT_FILE_NAME.predictions.top$TOPK.stats)
echo $STATS $INPUT_FILE_NAME>>$SUMMARY_FILE
# echo $(($i * 0.1 * $FILE_SIZE))
done
done
echo "Summary and Plot"
sh summary_plot_conflict.sh $OUT_DIRCT