Skip to content

Instantly share code, notes, and snippets.

@kusal1990
Created June 24, 2022 06:39
Show Gist options
  • Save kusal1990/ce00b4efc75d10b2d450799fe3c99c0c to your computer and use it in GitHub Desktop.
Save kusal1990/ce00b4efc75d10b2d450799fe3c99c0c to your computer and use it in GitHub Desktop.
def Answer_graph(type_):
print(type_+" dataset Analysis ...............")
plt.figure(figsize=(16,4.5))
for i,env in enumerate(["Train","Test","Dev"],start = 1):
Answers = eval(env+"_multiple_main_"+type_+"[\'AnswerKey\'].value_counts().to_dict()")
plt.subplot(1,3,i)
plt.title(env+"_Answers Options vs Frequency("+type_+")")
sns.barplot([i for i in Answers.keys()],[i for i in Answers.values()])
plt.xlabel("Answer Options")
plt.ylabel("Frequency")
@kusal1990
Copy link
Author

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment