Description Usage Arguments Value
Tests that the sum of values from the shapley algorithm converges against the difference of the mean of data and the prediction for the given observation. Supported tasks are classification, clustering and regression. Note that only for regression it is possible to choose to plot the result. For classification and clustering tasks, the predicted class (chosen with row.nr) is marked like this: >>ClassName<< . The result should show that this class was chosen most often.
1 2 3 | convergence.shapley(row.nr, convergence.iterations = 30, iterations = 50,
task = bh.task, model = train(makeLearner("regr.lm"), bh.task),
return.value = "plot")
|
row.nr |
Index for one observation of interest (not possible to choose a range of rows). Input must be numeric. |
convergence.iterations |
Amount of calls of the shapley function. Input must be one numeric. |
iterations |
Amount of the iterations within the shapley function. Input must be one numeric. |
return.value |
You can choose between plotting results or getting a data frame with "plot" or "values". |
shapley values as a data.frame or a plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.