Untitled

mail@pastecode.io avatar
unknown
powershell
a year ago
981 B
5
Indexable
Never
set -e
# student_id=P86114165
student_id=P76114511
min_conf=0.05
min_sup=0.05

mkdir -p "2024-dm/execution_logs/${student_id}"
for i in {1..10}
do
    timeout 300s python3 2024-dm/${student_id}_DM_Project1/main.py \
        --min_sup=${min_sup} \
        --min_conf=${min_conf} \
        --dataset="project1_testcase${i}.txt" \
        > "2024-dm/execution_logs/${student_id}/testcase${i}.log" 2>&1
    if [ $? -eq 124 ]; then
        echo "Command timed out for testcase(${i})."
    fi
done

mkdir -p "2024-dm/grading_logs/${student_id}"

for i in {1..10}
do
    for algo in apriori fp_growth
    do
        python3 2024-dm/grading.py \
            --reference_path="2024-dm/testcase_output/ref_project1_testcase${i}-${algo}-${min_sup}-${min_conf}.csv" \
            --file_path="2024-dm/${student_id}_DM_Project1/outputs/project1_testcase${i}-${algo}-${min_sup}-${min_conf}.csv" \
            --log_path="2024-dm/grading_logs/${student_id}/testcase${i}-${algo}.log"
    done
done