Skip to content

Commit

Permalink
Merge pull request #134 from samplchallenges/plot_update
Browse files Browse the repository at this point in the history
Plot update
  • Loading branch information
davidlmobley authored Apr 13, 2021
2 parents 4e9023e + b590e27 commit a6d71eb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
Binary file not shown.
Binary file not shown.
20 changes: 13 additions & 7 deletions physical_property/logP/analysis/logP_analysis2.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from matplotlib import cm
import joypy


# =============================================================================
# PLOTTING FUNCTIONS
# =============================================================================
Expand Down Expand Up @@ -410,6 +409,14 @@ def create_molecular_error_distribution_plots(collection_df, directory_path, fil
plt.savefig(directory_path + "/" + file_base_name +"_well_performing_methods.pdf")


def create_molecular_error_distribution_plots2(collection_df, directory_path, file_base_name):

# Ridge plot using all predictions
ridge_plot(df=collection_df, by = "Molecule ID", column = "$\Delta$logP error (calc - exp)", figsize=(4, 6), colormap=cm.plasma)
plt.savefig(directory_path + "/" + file_base_name +"_all_methods.pdf")
plt.savefig(directory_path + "/" + file_base_name +"_well_performing_methods.pdf")


def create_category_error_distribution_plots(collection_df, directory_path, file_base_name):

# Ridge plot using all predictions
Expand Down Expand Up @@ -529,12 +536,11 @@ def calculate_summary_statistics_of_top_methods_of_each_category(statistics_df,
file_base_name="molecular_MAE_comparison_between_method_categories")

# Create molecular error distribution ridge plots for all methods and a subset of well performing methods (found consistently in the top 15 across 4 metrics)
#well_performing_method_ids = ["4K631", "006AC", "43M66", "5W956", "847L9", "HC032", "7RS67", "D4406"]
well_performing_method_ids = ["Chemprop", "ClassicalGSG DB2", "ClassicalGSG DB3", "ClassicalGSG DB4",
"TFE MLR", "TFE-SM8-solvent-opt", "TFE-SM8-vacuum-opt"]
create_molecular_error_distribution_plots(collection_df=collection_data,
#well_performing_method_ids = ["Chemprop", "ClassicalGSG DB2", "ClassicalGSG DB3", "ClassicalGSG DB4",
# "TFE MLR", "TFE-SM8-solvent-opt", "TFE-SM8-vacuum-opt"]
create_molecular_error_distribution_plots2(collection_df=collection_data,
directory_path=molecular_statistics_directory_path,
subset_of_method_ids=well_performing_method_ids,
#subset_of_method_ids=well_performing_method_ids,
file_base_name="molecular_error_distribution_ridge_plot")

# Compare method categories
Expand Down Expand Up @@ -608,7 +614,7 @@ def calculate_summary_statistics_of_top_methods_of_each_category(statistics_df,
# (found consistently in the top 10 across 4 metrics)
#well_performing_method_ids = ["4K631", "006AC", "43M66", "5W956", "847L9", "HC032", "7RS67", "D4406"]
well_performing_method_ids = ["Chemprop", "ClassicalGSG DB3", "COSMO-RS",
"MD (CGenFF/TIP3P)", "TFE MLR"]
"TFE-NHLBI-TZVP-QM", "TFE MLR"]
create_molecular_error_distribution_plots(collection_df=collection_data,
directory_path=molecular_statistics_directory_path,
subset_of_method_ids=well_performing_method_ids,
Expand Down

0 comments on commit a6d71eb

Please sign in to comment.