Skip to content

Commit 4aa89eb

Browse files
authored
Merge pull request #23 from multipaths/ltoo_validation
Add diffuse(train) dimension in metrics results
2 parents ced6bd2 + 52a524a commit 4aa89eb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/diffupath/ltoo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def ltoo_by_method(
2323
k=100
2424
):
2525
"""Cross validation by method."""
26-
auroc_metrics = defaultdict(lambda: defaultdict(list))
27-
auprc_metrics = defaultdict(lambda: defaultdict(list))
26+
auroc_metrics = defaultdict(lambda: defaultdict(lambda: defaultdict(list)))
27+
auprc_metrics = defaultdict(lambda: defaultdict(lambda: defaultdict(list)))
2828

2929
for _ in tqdm(range(k)):
3030
for entity in mapping_input:
@@ -61,8 +61,8 @@ def ltoo_by_method(
6161
auroc, auprc = (0, 0)
6262
print(f'ROC AUC unable to calculate for {validation_set}')
6363

64-
auroc_metrics[entity_label][method].append(auroc)
65-
auprc_metrics[entity_label][method].append(auprc)
64+
auroc_metrics[entity][entity_label][method].append(auroc)
65+
auprc_metrics[entity][entity_label][method].append(auprc)
6666

6767
return auroc_metrics, auprc_metrics
6868

0 commit comments

Comments
 (0)