Last active
April 8, 2022 20:33
-
-
Save yuchenlin/7307941b86340c441e0458175d9e75e6 to your computer and use it in GitHub Desktop.
561-hw3-grading.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
acc = float(sys.argv[1]) # mnist acc | |
ta_acc = float(sys.argv[2]) # ta acc | |
t1=50.00 | |
t2=90.00 | |
tt1=30.0 | |
tt2=60.0 | |
score_acc = 0 | |
score_ta_acc = 0 | |
if (acc >= t2): | |
score_acc = 100 | |
elif (acc < t1): | |
score_acc = 0 | |
else: | |
score_acc = (acc-t1)/(t2-t1)*100 | |
if (ta_acc >= tt2): | |
score_ta_acc = 100 | |
elif (ta_acc < tt1): | |
score_ta_acc = 0 | |
else: | |
score_ta_acc = (ta_acc-tt1)/(tt2-tt1)*100 | |
# print("score_acc: ", score_acc) | |
# print("score_ta_acc: ", score_ta_acc) | |
# print("score: ",score_acc*0.6+score_ta_acc*0.4) | |
print(score_acc*0.6+score_ta_acc*0.4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment