viadee / anchorsOnR

Implementation of the Anchors algorithm: Explain black-box ML models
BSD 3-Clause "New" or "Revised" License
15 stars 5 forks source link

Streamlined explanations / More print options #48

Open thllwg opened 5 years ago

thllwg commented 5 years ago

If multiple cases are explained, there should be a possibility to streamline explanations printouts. For instance, if several 'setosa' instances are explained, the resulting anchors - if similar/identical could be unified.

Example: ====Result==== IF Petal.Length IN [1,2.63333333333333) (ADDED PRECISION: 1, ADDED COVERAGE: -0.509) THEN PREDICT 'setosa' WITH PRECISION 1 AND COVERAGE 0.491 ====For Explained Instances 15, 18 ==== ====15==== Sepal.Length = 5.8 Sepal.Width = 4 Petal.Length = 1.2 Petal.Width = 0.2 WITH LABEL = 'setosa' ====18==== Sepal.Length = 5.8 Sepal.Width = 4 Petal.Length = 1.2 Petal.Width = 0.2 WITH LABEL = 'setosa'

Another nice-to-have would be the possibility to just print the rules without the instance details, e.g. via a verbosity parameter?

TobiasGoerke commented 5 years ago

+1 for printing explanations only. IMO we should split the method into printInstance and printExplanation.

Also, limit decimal precision

TobiasGoerke commented 5 years ago

Also, output predicates should be sorted by their precision contribution

TobiasGoerke commented 5 years ago

For discretization printing has some smaller errors. E.g. 'xx IN >= 20'. In those cases only 'IN' or a comparison sign should be used

thllwg commented 5 years ago

The new base rule feature makes it harder to understand the print output. Example: ====Explained Instance 14 ==== Sepal.Length = 4.3 Sepal.Width = 3 Petal.Length = 1.1 Petal.Width = 0.1 WITH LABEL Species = 'setosa' ====Result==== IF Petal.Length IN [1,2.633333) (ADDED PRECISION: 29%, ADDED COVERAGE: -66.1%) THEN PREDICT 'setosa' WITH PRECISION 100%, AND COVERAGE 33.9%

For someone unfamiliar with anchors, it remains unclear how a precision of 100% can be reached if Petal.Length only adds 29%.

TobiasGoerke commented 5 years ago

So, is this issue closable or should we wait until the empty rule's precision is included?