ciu.ggplot.col {ciu} | R Documentation |
CIU feature importance/utility plot using ggplot.
Description
Create a barplot showing CI as the length of the bar and CU on color scale from red to green, via yellow, for the given inputs and the given output.
Usage
ciu.ggplot.col(
ciu,
instance = NULL,
ind.inputs = NULL,
output.names = NULL,
in.min.max.limits = NULL,
n.samples = 100,
neutral.CU = 0.5,
show.input.values = TRUE,
concepts.to.explain = NULL,
target.concept = NULL,
target.ciu = NULL,
ciu.meta = NULL,
plot.mode = "colour_cu",
ci.colours = c("aquamarine", "aquamarine3", "0.3"),
cu.colours = c("darkgreen", "darkgreen", "0.8"),
low.color = "red",
mid.color = "yellow",
high.color = "darkgreen",
use.influence = FALSE,
sort = NULL,
decreasing = FALSE,
main = NULL
)
Arguments
ciu |
|
instance |
Input values for the instance to explain. Should be a
data.frame even though a |
ind.inputs |
Indices of input features to explain (the set i in CIU formulae) |
output.names |
Vector with names of outputs to include. If NULL (default), then include all. |
in.min.max.limits |
data.frame or matrix with one row per output and two columns, where the first column indicates the minimal value and the second column the maximal value for that output. ONLY NEEDED HERE IF not given as parameter to ciu.new or if the limits are different for this specific instance than the default ones. |
n.samples |
How many instances to generate for estimating CI and CU. For inputs of type factor, all possible combinations of input values are generated, so this parameter only influences how many instances are (at least) generated for continuous-valued inputs. |
neutral.CU |
Indicates when the Contextual Utility is considered to be "negative". The default value of 0.5 seems quite logical for most cases. |
show.input.values |
Include input values after input labels or not. Default is TRUE. |
concepts.to.explain |
List of input feature concepts to explain, as defined
by vocabulary provided as argument to ciu.new. If |
target.concept |
If provided, then calculate CIU of inputs
|
target.ciu |
|
ciu.meta |
If given, then use existing |
plot.mode |
"overlap" or "colour_cu". Default is "colour_cu". |
ci.colours |
Colours to use for CI part in "overlap" mode. Three values required: fill colour, border colour, alpha. Default is c("aquamarine", "aquamarine3", "0.3"). |
cu.colours |
Colours to use for CU part in "overlap" mode. Three values required: fill colour, border colour, alpha. Default is c("darkgreen", "darkgreen", "0.8"). If it is set to NULL, then the same colour palette is used as for "colour_cu". |
low.color |
Colour to use for CU=0 |
mid.color |
Colour to use for CU=Neutral.CU |
high.color |
Colour to use for CU=1 |
use.influence |
Plot using "influence" rather than CIU, i.e. a LIME-like barplot. Default is FALSE. |
sort |
NULL, "CI" or "CU". |
decreasing |
Set to TRUE for decreasing sort. |
main |
Text to use as main title. |
Value
ggplot object.
Author(s)
Kary Främling