adjust for new graphic
This commit is contained in:
parent
7e48504bab
commit
89f25b07d4
12
flake.nix
12
flake.nix
|
@ -189,10 +189,20 @@
|
|||
text = builtins.readFile ./scripts/sc-batch.sh;
|
||||
};
|
||||
|
||||
decode-result-folder = pkgs.writeShellApplication {
|
||||
name = "decode-result-folder";
|
||||
runtimeInputs = [
|
||||
pkgs.python3
|
||||
];
|
||||
text = ''
|
||||
python3 ${./scripts/decode-result-folder.py}
|
||||
'';
|
||||
};
|
||||
|
||||
aspforaba = pkgs.callPackage ./nix/packages/aspforaba.nix {inherit (self'.packages) clingo;};
|
||||
in
|
||||
{
|
||||
inherit validate aba2sat aspforaba sc-batch;
|
||||
inherit validate aba2sat aspforaba sc-batch decode-result-folder;
|
||||
default = aba2sat;
|
||||
clingo = pkgs.callPackage ./nix/packages/clingo.nix {};
|
||||
}
|
||||
|
|
|
@ -47,7 +47,8 @@ def run():
|
|||
"assumption_ratio": assumption_ratio,
|
||||
"max_rules_per_head": max_rules_per_head,
|
||||
"max_rule_size": max_rule_size,
|
||||
"time": aba2sat["mean"],
|
||||
"time_ours": aba2sat["mean"],
|
||||
"time_theirs": aspforaba['mean'],
|
||||
"stddev": aba2sat['stddev'],
|
||||
"speedup": speedup,
|
||||
})
|
||||
|
|
|
@ -11,32 +11,48 @@ def read_and_visualize(csv_file):
|
|||
# Display the first few rows of the dataframe
|
||||
print(df.head())
|
||||
|
||||
# Identify all the properties (assuming they are all columns except for some timings)
|
||||
properties = [col for col in df.columns if col != 'speedup' and col != 'time' and col != 'stddev']
|
||||
plt.figure(figsize=(8,8))
|
||||
scatterplot = sns.scatterplot(x="time_ours", y="time_theirs", hue="atom_count", data=df)
|
||||
scatterplot.set(xscale='log', yscale='log')
|
||||
min_val = min(df['time_ours'].min(), df['time_theirs'].min())
|
||||
max_val = max(df['time_ours'].max(), df['time_theirs'].max())
|
||||
plt.plot([min_val, max_val], [min_val, max_val], 'r--')
|
||||
# ax = plt.gca()
|
||||
# ax.set_xscale('log')
|
||||
# ax.set_yscale('log')
|
||||
|
||||
# Pairplot to see general pairwise relationships, may help to understand the overall relationship between properties and runtime
|
||||
sns.pairplot(df)
|
||||
plt.suptitle('Pairplot of Properties and Runtime', y=1.02)
|
||||
plt.xlabel("aba2sat")
|
||||
plt.ylabel("ASPforABA")
|
||||
|
||||
plt.legend()
|
||||
plt.show()
|
||||
|
||||
# Create scatter plots for each property against runtime
|
||||
for prop in properties:
|
||||
plt.figure(figsize=(10, 6))
|
||||
sns.scatterplot(x=df[prop], y=df['speedup'])
|
||||
plt.title(f'Impact of {prop} on Speedup')
|
||||
plt.xlabel(prop)
|
||||
plt.ylabel('Speedup')
|
||||
# # Identify all the properties (assuming they are all columns except for some timings)
|
||||
# properties = [col for col in df.columns if col != 'speedup' and col != 'time_ours' and col != 'time_theirs' and col != 'stddev']
|
||||
|
||||
# Create box plots for categorical properties if any (e.g., difficulty level or type) against runtime
|
||||
for prop in properties:
|
||||
if df[prop].dtype == 'object':
|
||||
plt.figure(figsize=(10, 6))
|
||||
sns.boxplot(x=df[prop], y=df['speedup'])
|
||||
plt.title(f'Impact of {prop} on Speedup')
|
||||
plt.xlabel(prop)
|
||||
plt.ylabel('Speedup')
|
||||
# # Pairplot to see general pairwise relationships, may help to understand the overall relationship between properties and runtime
|
||||
# sns.pairplot(df)
|
||||
# plt.suptitle('Pairplot of Properties and Runtime', y=1.02)
|
||||
# plt.show()
|
||||
|
||||
plt.show()
|
||||
# # Create scatter plots for each property against runtime
|
||||
# for prop in properties:
|
||||
# plt.figure(figsize=(10, 6))
|
||||
# sns.scatterplot(x=df[prop], y=df['speedup'])
|
||||
# plt.title(f'Impact of {prop} on Speedup')
|
||||
# plt.xlabel(prop)
|
||||
# plt.ylabel('Speedup')
|
||||
|
||||
# # Create box plots for categorical properties if any (e.g., difficulty level or type) against runtime
|
||||
# for prop in properties:
|
||||
# if df[prop].dtype == 'object':
|
||||
# plt.figure(figsize=(10, 6))
|
||||
# sns.boxplot(x=df[prop], y=df['speedup'])
|
||||
# plt.title(f'Impact of {prop} on Speedup')
|
||||
# plt.xlabel(prop)
|
||||
# plt.ylabel('Speedup')
|
||||
|
||||
# plt.show()
|
||||
|
||||
# Example usage
|
||||
csv_file = 'all.csv' # Replace with your actual CSV file path
|
||||
|
|
Loading…
Reference in a new issue