Adds logit/probit transformation to tree explainer and closes #56 #84
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Logit/Probit Transform
Adds the logit/probit transformation to tree explainer. If a classification tree is passed as the model to explain the user can either explain its "raw" output (default for regression trees) or the user can make a choice between probability space (preferred) or logit space. This might be important for some users but can me numerically unclean: Sometimes a probability of$p = 0$ or $p= 1$ gets transformed to -inf and +inf, respectively, in logit space. This creates numerical inconsistencies, which is why logits are clipped to $[-14,14]$ . In this case a UserWarning is thrown.
InteractionValues
The
InteractionValues
object now is an itterable which makes it usable for the standardsum
function. With this it is easy to compute the sum of all interaction values stored inInteractionValues.values