Skip to content

Commit

Permalink
Fixed the accuracy_table scrip and added a main. (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
strsamue authored Jun 25, 2024
1 parent ea59b39 commit 5841ec5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ scratch/
dataset/
plots/
data/
metrics/

docs/source

Expand Down
9 changes: 6 additions & 3 deletions scripts/analysis/accuracy_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

def create_accuracy_table(one_target_path):
one_target_df = pd.read_csv(one_target_path)

targets = ["metal", "E_ligand", "X3_ligand"]
results = []

Expand All @@ -14,14 +13,14 @@ def create_accuracy_table(one_target_path):
(one_target_df["target"] == target)
& (one_target_df["model"] == "random_forest")
& (one_target_df["dataset_fraction"] == 1.0)
& (one_target_df["nmr_only"] is False)
& (one_target_df["nmr_only"] == False)
]

without_ligands = one_target_df[
(one_target_df["target"] == target)
& (one_target_df["model"] == "random_forest")
& (one_target_df["dataset_fraction"] == 1.0)
& (one_target_df["nmr_only"] is True)
& (one_target_df["nmr_only"] == True)
]

if not with_ligands.empty:
Expand All @@ -46,3 +45,7 @@ def create_accuracy_table(one_target_path):
)
print(results_df)
return results_df


if __name__ == "__main__":
create_accuracy_table("metrics/results_one_target.csv")

0 comments on commit 5841ec5

Please sign in to comment.