0880e905186997ec6545a65c277a4848e0505eed,examples/ppi.py,,test,#Any#,59
Before Change
with torch.no_grad():
out = model(data.x.to(device), data.edge_index.to(device))
pred = (out > 0).float().cpu()
micro_f1 = metrics.f1_score(data.y, pred, average="micro")
total_micro_f1 += micro_f1 * data.num_graphs
return total_micro_f1 / len(loader.dataset)
for epoch in range(1, 101):
After Change
out = model(data.x.to(device), data.edge_index.to(device))
preds.append((out > 0).float().cpu())
y, pred = torch.cat(ys, dim=0), torch.cat(preds, dim=0)
if pred.sum().item() > 0:
return metrics.f1_score(y.numpy(), pred.numpy(), average="micro")
else:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: rusty1s/pytorch_geometric
Commit Name: 0880e905186997ec6545a65c277a4848e0505eed
Time: 2019-04-08
Author: matthias.fey@tu-dortmund.de
File Name: examples/ppi.py
Class Name:
Method Name: test
Project Name: ANSSI-FR/SecuML
Commit Name: c8acb227237610d0dc3c74b0d6bb0cf07070e9a3
Time: 2019-09-03
Author: anael.beaugnon@ssi.gouv.fr
File Name: secuml/core/classif/monitoring/perf/binary_indicators.py
Class Name: BinaryIndicators
Method Name: compute_precision_recall_fscore
Project Name: rusty1s/pytorch_geometric
Commit Name: 0880e905186997ec6545a65c277a4848e0505eed
Time: 2019-04-08
Author: matthias.fey@tu-dortmund.de
File Name: examples/ppi.py
Class Name:
Method Name: test
Project Name: rusty1s/pytorch_geometric
Commit Name: 49675c507e5afa9165e378fd738a15a16f323078
Time: 2019-06-13
Author: matthias.fey@tu-dortmund.de
File Name: examples/geniepath.py
Class Name:
Method Name: test