convergence.shapley: Tests that the shapley algorithm converges.

Description Usage Arguments Value

Description

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.

Usage

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")

Arguments

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".

Value

shapley values as a data.frame or a plot


redichh/ShapleyR documentation built on May 28, 2019, 7:49 a.m.