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.
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,
scale.CI = FALSE,
sort = NULL,
decreasing = FALSE,
main = NULL
)ggplot object.
ciu object as created with ciu function (not to be confused
with CIU object as created by ciu.new).
Input values for the instance to explain. Should be a
data.frame even though a vector or matrix might work too if input
names and other needed metadata can be deduced from the dataset or other
parameters given to ciu.new.
Indices of input features to explain (the set {i} in CIU formulae)
Vector with names of outputs to include. If NULL (default), then include all.
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.
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.
Indicates when the Contextual Utility is considered to be "negative". The default value of 0.5 seems quite logical for most cases.
Include input values after input labels or not. Default is TRUE.
List of input feature concepts to explain, as defined
by vocabulary provided as argument to ciu.new. If ind.inputs=NULL,
then use concepts.to.explain instead. If both are NULL, then use all inputs.
If provided, then calculate CIU of inputs
ind.inputs.to.explain relative to the given concept rather than
relative to the actual output(s). ind.inputs.to.explain should
normally be a subset (or all) of the inputs that target.concept
consists of, even though that not required by the CIU calculation.
If a target.ciu is provided, then the target.concept doesn't have to
be included in the vocabulary gives as parameter to ciu.new
(at least for the moment).
ciu.result object previously calculated for
target.concept. If a target.concept is provided but target.ciu=NULL,
then target.ciu is estimated by a call to ciu.explain with the
n.samples value given as a parameter to this call. It may be useful
to provide target.ciu if it should be estimated using some other
(typically greater) value for n.samples than the default one, or if it
has already been calculated for some reason.
If given, then use existing ciu.meta.result rather
than calling ciu.meta.explain.
"overlap" or "colour_cu". Default is "colour_cu".
Colours to use for CI part in "overlap" mode. Three values required: fill colour, border colour, alpha. Default is c("aquamarine", "aquamarine3", "0.3").
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".
Colour to use for CU=0
Colour to use for CU=Neutral.CU
Colour to use for CU=1
Plot using "influence" rather than CIU, i.e. a LIME-like barplot. Default is FALSE.
Scale x-axis according to maximal CI value.
NULL, "CI" or "CU".
Set to TRUE for decreasing sort.
Text to use as main title.
Kary Främling