viadee / javaAnchorExplainer

Explains machine learning models fast using the Anchor algorithm originally proposed by marcotcr in 2018
BSD 3-Clause "New" or "Revised" License
15 stars 3 forks source link

CandidateGeneration generates redundant rules #6

Closed TobiasGoerke closed 5 years ago

TobiasGoerke commented 5 years ago

When generating multi-ary candidates, the same rule might be created twice or even more. E.g. [0,1] and [1,0] with B=2. While this is the approach that was initially proposed, its meaningfulness is to be doubted. Can probably be fixed by implementing equals and hashCode. Check if this causes any side-effects.

TobiasGoerke commented 5 years ago

See https://github.com/viadee/javaAnchorExplainer/commit/80dd44c05c6d17afb952291dfdcb88b0acbb62c9

Introduced new Map checking for canonicalFeatures' existence in resultSet as not to introduce unforseen side-effects by implementing equals´or hashCode