marcotcr / anchor

Code for "High-Precision Model-Agnostic Explanations" paper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Filtering candidate anchors by coverage

DaveDe opened this issue · comments

I noticed in anchor_base.py line 305, newly generated candidate anchors are filtered out if they don't have a larger coverage than the previous best candidate whose precision is large enough. But these new candidates are larger, and will always have coverage at most as large as the previous valid candidate. Would it be equivalent if we check if best_coverage == -1 as the first line in the while loop on line 302, and break if best_coverage is not -1 (meaning we select the best coverage anchor with high enough precision from the previous round, and not try making new candidates as their coverage can't possibly be larger)?

Let me know if I'm missing something when you get the chance. Thanks.

I think what you are saying is true if beam_size=1, but not otherwise. You can have an anchor of size 1 with super low coverage and high precision in your beam , and later on find an anchor of size 3 and higher coverage / same precision.

Please reopen if this didn't make sense or if I'm wrong.

Thanks, I understand now. I previously hadn't considered the case where an anchor from a different beam can be larger and have greater coverage.