Skip to content
Snippets Groups Projects
Commit f9933398 authored by Julien Breton's avatar Julien Breton
Browse files

refactor project

parent 75a0d586
No related branches found
No related tags found
No related merge requests found
Showing
with 10 additions and 10 deletions
...@@ -4,10 +4,10 @@ import json ...@@ -4,10 +4,10 @@ import json
import numpy as np import numpy as np
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
title = "" title = "Zero-shot predicate extraction"
bars1_path = "../../results/GPT-4/GPT-4_zero_shot_results.json" bars1_path = "../../results/LLM/GPT-4/GPT-4_zero_shot_results.json"
bars2_path = "../../results/Mixtral-8x7b/MIXTRAL_zero_shot_results.json" bars2_path = "../../results/LLM/Mixtral-8x7b/MIXTRAL_zero_shot_results.json"
bars3_path = "../../results/Mistral-7b/MISTRAL_zero_shot_results.json" bars3_path = "../../results/LLM/Mistral-7b/MISTRAL_zero_shot_results.json"
paths = [bars1_path, bars2_path, bars3_path] paths = [bars1_path, bars2_path, bars3_path]
bars = [[], [], []] bars = [[], [], []]
...@@ -47,9 +47,9 @@ plt.bar(r3, bars[2], color='#5619d8', width=barWidth, edgecolor='white', label=' ...@@ -47,9 +47,9 @@ plt.bar(r3, bars[2], color='#5619d8', width=barWidth, edgecolor='white', label='
# Add xticks on the middle of the group bars # Add xticks on the middle of the group bars
plt.ylabel('Number of predicate') plt.ylabel('Number of predicate')
plt.xlabel('Zero-shot predicate extraction', fontweight='bold') plt.xlabel(title, fontweight='bold')
plt.xticks([r + barWidth for r in range(len(bars[0]))], ['Perfect equals', 'Subpart', 'Miss classification', 'Hallucination']) plt.xticks([r + barWidth for r in range(len(bars[0]))], ['Perfect equals', 'Subpart', 'Miss classification', 'Hallucination'])
# Create legend & Show graphic # Create legend & Show graphic
plt.legend() plt.legend()
plt.savefig("test.png") plt.savefig("../../results/LLM/breakdown_classification_figure.png")
import json import json
data_path = "../../results/GPT-4/GPT-4_zero_shot_answers.json" data_path = "../../results/LLM/GPT-4/GPT-4_zero_shot_answers.json"
result_path="../../results/GPT-4/GPT-4_zero_shot_results.json" result_path= "../../results/LLM/GPT-4/GPT-4_zero_shot_results.json"
#data_path = "../../results/Mixtral-8x7b/MIXTRAL_zero_shot_cleaned.json" #data_path = "../../results/Mixtral-8x7b/MIXTRAL_zero_shot_cleaned.json"
#result_path="../../results/Mixtral-8x7b/MIXTRAL_zero_shot_results.json" #result_path="../../results/Mixtral-8x7b/MIXTRAL_zero_shot_results.json"
......
import json, re import json, re
input_path = "../../results/Mistral-7b/MISTRAL_zero_shot_raw_answers.json" input_path = "../../results/LLM/Mistral-7b/MISTRAL_zero_shot_raw_answers.json"
output_path = "../../results/Mistral-7b/MISTRAL_zero_shot_cleaned.json" output_path = "../../results/LLM/Mistral-7b/MISTRAL_zero_shot_cleaned.json"
#input_path = "../../results/Mixtral-8x7b/MIXTRAL_zero_shot_raw_answers.json" #input_path = "../../results/Mixtral-8x7b/MIXTRAL_zero_shot_raw_answers.json"
#output_path = "../../results/Mixtral-8x7b/MIXTRAL_zero_shot_cleaned.json" #output_path = "../../results/Mixtral-8x7b/MIXTRAL_zero_shot_cleaned.json"
......
results/LLM/breakdown_classification_figure.png

23.7 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment