Skip to contents

Parse the data returned from iml::Shapley into a single single. Explanations are sorted by importance, filtered by filter, the top n are collected and formatted into a single string.

Usage

parse_shapley(explanation, filter = "=0|=NA", n = 3)

Arguments

explanation

data.frame of explanations as returned by iml::Shapley

filter

character(1) regular expression of feature/value combinations to exclude

n

integer(1) maximum number of explanatory features to return

Value

string explaining the feature values