This PR allows specifying an argument ratio for attacker.edge_flips(), and attacker.feat_flips(), which determines how many generated perturbations were used for further evaluation/visualization. Correspondingly, attacker.data() holds edge_ratio and feat_ratio for these two methods when constructing perturbed graph.
This PR allows specifying an argument
ratio
forattacker.edge_flips()
, andattacker.feat_flips()
, which determines how many generated perturbations were used for further evaluation/visualization. Correspondingly,attacker.data()
holdsedge_ratio
andfeat_ratio
for these two methods when constructing perturbed graph.Case1: Only 50% of generated edge perturbations were used
trainer.evaluate(attacker.data(edge_ratio=0.5), mask=...)
Case2: Only 50% of generated feature perturbations were used
trainer.evaluate(attacker.data(feat_ratio=0.5), mask=...)
NOTE: both arguments can be used simultaneously